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