summaryrefslogtreecommitdiff
path: root/test/git/test_submodule.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2010-11-18 22:11:06 +0100
committerSebastian Thiel <byronimo@gmail.com>2010-11-18 22:11:06 +0100
commitebe8f644e751c1b2115301c1a961bef14d2cce89 (patch)
treeb454eca66fb4561fdd582786041eca46b57263a3 /test/git/test_submodule.py
parent3f2d76ba8e6d004ff5849ed8c7c34f6a4ac2e1e3 (diff)
downloadgitpython-ebe8f644e751c1b2115301c1a961bef14d2cce89.tar.gz
Added test for the recursive code path.
Diffstat (limited to 'test/git/test_submodule.py')
-rw-r--r--test/git/test_submodule.py13
1 files changed, 11 insertions, 2 deletions
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()