Example #1
0
 def test_all_finished(self):
     """all_finished: True if all lines from dd_todo are in dd_finished"""
     todo = self.tmpdir+'/dd_todo'
     requests = ['one', 'two', 'final thingy']
     with open(todo, 'w') as outf:
         outf.write(''.join(r+'\n' for r in requests))
     self.assertEqual(set(read_lines(todo)), set(requests))
     for r in reversed(requests):
         self.assertFalse(all_finished(topdir=self.tmpdir))
         mark_finished(r, topdir=self.tmpdir)
     self.assertTrue(all_finished(topdir=self.tmpdir))
Example #2
0
 def test_all_finished(self):
     """all_finished: True if all lines from dd_todo are in dd_finished"""
     todo = self.tmpdir + '/dd_todo'
     requests = ['one', 'two', 'final thingy']
     with open(todo, 'w') as outf:
         outf.write(''.join(r + '\n' for r in requests))
     self.assertEqual(set(read_lines(todo)), set(requests))
     for r in reversed(requests):
         self.assertFalse(all_finished(topdir=self.tmpdir))
         mark_finished(r, topdir=self.tmpdir)
     self.assertTrue(all_finished(topdir=self.tmpdir))
Example #3
0
 def test_extra_finished(self):
     """all_finished: True if dd_finished has more items than dd_todo"""
     self.test_all_finished()
     mark_finished("BONUS", topdir=self.tmpdir)
     self.assertTrue(all_finished(topdir=self.tmpdir))
Example #4
0
 def test_extra_finished(self):
     """all_finished: True if dd_finished has more items than dd_todo"""
     self.test_all_finished()
     mark_finished("BONUS", topdir=self.tmpdir)
     self.assertTrue(all_finished(topdir=self.tmpdir))