Make the open test tell the injected git from the real one
This commit is contained in:
@@ -95,11 +95,11 @@ class Pruned(unittest.TestCase):
|
||||
self.assertEqual(len(self.kept()), 3)
|
||||
|
||||
def test_an_open_prunes_and_a_save_does_not(self):
|
||||
run = self.listed("/code/acme-item-5")
|
||||
run = self.listed("/code/acme", "/code/acme-item-5")
|
||||
self.assertEqual(main.performed(self.config, "save", "goals-and-audience", self.home, run), "/code/acme-item-5/README.md is the record itself, so nothing is left to store.")
|
||||
self.assertEqual(len(self.kept()), 3)
|
||||
self.assertEqual(main.performed(self.config, "open", "goals-and-audience", self.home, run), "/code/acme-item-5/README.md")
|
||||
self.assertEqual(self.kept(), {main.worktree_folder(pathlib.Path("/code/acme-item-5"))})
|
||||
self.assertEqual(self.kept(), {main.worktree_folder(pathlib.Path(top)) for top in ("/code/acme", "/code/acme-item-5")})
|
||||
|
||||
def test_does_nothing_where_the_project_has_no_copies(self):
|
||||
main.pruned(worktree_config("/code/acme"), self.home / "elsewhere", self.listed("/code/acme"))
|
||||
|
||||
Reference in New Issue
Block a user