Exemplo n.º 1
0
def _flush():
    """
    Clean our previous practice aggregates
    """
    with DEST:
        for datafile in DEST:
            ffs.rm(datafile)
Exemplo n.º 2
0
def _flush():
    """
    Clean this month.
    """
    if MONTHDIR:
        ffs.rm(MONTHDIR, recursive=True)
    MONTHDIR.mkdir()
    CCGS.mkdir()
    PRACTICES.mkdir()
    return
Exemplo n.º 3
0
 def test_rm_many(self):
     "Remove many files"
     with patch.object(ffs.os, 'remove') as prm:
         ffs.rm('this.py', 'that.py')
         prm.assert_any_call('this.py')
         prm.assert_any_call('that.py')
Exemplo n.º 4
0
 def test_rm(self):
     "Simple case removing a file"
     with patch.object(ffs.os, 'remove') as prm:
         ffs.rm('this.py')
         prm.assert_called_once_with('this.py')
Exemplo n.º 5
0
 def tearDown(self):
     rm(self.tmpath)
     rm(self.tdir, force=True, recursive=True)
Exemplo n.º 6
0
def _flush(dest):
    if not dest:
        return
    with dest:
        for datafile in dest:
            ffs.rm(datafile)
Exemplo n.º 7
0
 def test_rm_many(self):
     "Remove many files"
     with patch.object(ffs.os, 'remove') as prm:
         ffs.rm('this.py', 'that.py')
         prm.assert_any_call('this.py')
         prm.assert_any_call('that.py')
Exemplo n.º 8
0
 def test_rm(self):
     "Simple case removing a file"
     with patch.object(ffs.os, 'remove') as prm:
         ffs.rm('this.py')
         prm.assert_called_once_with('this.py')