Esempio n. 1
0
 def test_finalize_with_delete(self):
     config = _common.iconfig(self.lib, delete=True)
     applyc = importer.apply_choices(config)
     applyc.next()
     finalize = importer.finalize(config)
     finalize.next()
     _call_apply([applyc, finalize], [self.i], self.info)
     self.assertNotExists(self.srcpath)
Esempio n. 2
0
 def test_finalize_with_delete(self):
     config = _common.iconfig(self.lib, delete=True)
     applyc = importer.apply_choices(config)
     applyc.next()
     finalize = importer.finalize(config)
     finalize.next()
     _call_apply([applyc, finalize], [self.i], self.info)
     self.assertNotExists(self.srcpath)
Esempio n. 3
0
 def test_apply_with_move_prunes_empty_directory(self):
     config = _common.iconfig(self.lib, move=True)
     applyc = importer.apply_choices(config)
     applyc.next()
     finalize = importer.finalize(config)
     finalize.next()
     _call_apply([applyc], [self.i], self.info, self.srcdir)
     self.assertNotExists(os.path.dirname(self.srcpath))
Esempio n. 4
0
 def test_finalize_with_delete_prunes_directory_empty(self):
     config = _common.iconfig(self.lib, delete=True)
     applyc = importer.apply_choices(config)
     applyc.next()
     finalize = importer.finalize(config)
     finalize.next()
     _call_apply([applyc, finalize], [self.i], self.info, self.srcdir)
     self.assertNotExists(os.path.dirname(self.srcpath))
Esempio n. 5
0
 def test_apply_with_move(self):
     config = _common.iconfig(self.lib, move=True)
     applyc = importer.apply_choices(config)
     applyc.next()
     finalize = importer.finalize(config)
     finalize.next()
     _call_apply([applyc], [self.i], self.info)
     self.assertExists(list(self.lib.items())[0].path)
     self.assertNotExists(self.srcpath)