def test_finish(self):
     """finish: mark request finished, and write dd.done if all complete"""
     todo = self.tmpdir+'/dd_todo'
     done = self.tmpdir+'/dd.done'
     requests = ['one', 'two', 'final thingy']
     with open(todo, 'w') as outf:
         outf.write(''.join(r+'\n' for r in requests))
     for r in reversed(requests):
         print("marking %s" % r)
         self.assertFalse(os.path.exists(done))
         finish(r, topdir=self.tmpdir)
     self.assertTrue(os.path.exists(done))
 def test_finish(self):
     """finish: mark request finished, and write dd.done if all complete"""
     todo = self.tmpdir + '/dd_todo'
     done = self.tmpdir + '/dd.done'
     requests = ['one', 'two', 'final thingy']
     with open(todo, 'w') as outf:
         outf.write(''.join(r + '\n' for r in requests))
     for r in reversed(requests):
         print("marking %s" % r)
         self.assertFalse(os.path.exists(done))
         finish(r, topdir=self.tmpdir)
     self.assertTrue(os.path.exists(done))