From ebe8f644e751c1b2115301c1a961bef14d2cce89 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Thu, 18 Nov 2010 22:11:06 +0100 Subject: Added test for the recursive code path. --- test/git/test_submodule.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'test/git/test_submodule.py') diff --git a/test/git/test_submodule.py b/test/git/test_submodule.py index dbc2ef08..b2b61f39 100644 --- a/test/git/test_submodule.py +++ b/test/git/test_submodule.py @@ -394,7 +394,8 @@ class TestSubmodule(TestBase): #================ nsmn = "newsubmodule" nsmp = "submrepo" - nsm = Submodule.add(rwrepo, nsmn, nsmp, url=join_path_native(self.rorepo.working_tree_dir, rsms[0].path, rsms[1].path)) + async_url = join_path_native(self.rorepo.working_tree_dir, rsms[0].path, rsms[1].path) + nsm = Submodule.add(rwrepo, nsmn, nsmp, url=async_url) csmadded = rwrepo.index.commit("Added submodule") nsm.set_parent_commit(csmadded) assert nsm.module_exists() @@ -466,8 +467,16 @@ class TestSubmodule(TestBase): assert nsmmh.ref.tracking_branch() is not None assert not nsmmh.is_detached - # recursive update # ================= # finally we recursively update a module, just to run the code at least once + # remove the module so that it has more work + assert len(nsm.children()) == 1 + assert nsm.exists() and nsm.module_exists() and len(nsm.children()) == 1 + # assure we pull locally only + nsmc = nsm.children()[0] + nsmc.config_writer().set_value('url', async_url) + rm.update(recursive=True) + + assert len(nsm.children()) == 1 and nsmc.module_exists() -- cgit v1.2.3