def _flush(): """ Clean our previous practice aggregates """ with DEST: for datafile in DEST: ffs.rm(datafile)
def _flush(): """ Clean this month. """ if MONTHDIR: ffs.rm(MONTHDIR, recursive=True) MONTHDIR.mkdir() CCGS.mkdir() PRACTICES.mkdir() return
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')
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')
def tearDown(self): rm(self.tmpath) rm(self.tdir, force=True, recursive=True)
def _flush(dest): if not dest: return with dest: for datafile in dest: ffs.rm(datafile)