summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2011-06-10 22:45:07 +0200
committerSebastian Thiel <byronimo@gmail.com>2011-06-10 23:16:21 +0200
commit4a8bdce7a665a0b38fc822b7f05a8c2e80ccd781 (patch)
treeafe6db52df50e4b66fa98a4b25143b4efafc3a66
parent8828ced5818d793879ae509e144fdad23465d684 (diff)
downloadgitpython-4a8bdce7a665a0b38fc822b7f05a8c2e80ccd781.tar.gz
Fixed submodule tests to go with either the old or the new version of gitdb
-rw-r--r--.gitmodules7
m---------git/ext/gitdb0
-rw-r--r--git/test/test_submodule.py11
3 files changed, 9 insertions, 9 deletions
diff --git a/.gitmodules b/.gitmodules
index 67cfa9b8..5741d992 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,4 +1,3 @@
-[submodule "gitdb"]
- path = git/ext/gitdb
- url = git://github.com/gitpython-developers/gitdb.git
- branch = master
+[submodule "gitdb"]
+ path = git/ext/gitdb
+ url = git://github.com/gitpython-developers/gitdb.git
diff --git a/git/ext/gitdb b/git/ext/gitdb
-Subproject 17d9d1395fb6d18d553e085150138463b5827a2
+Subproject 422f29f7f3e53ff429b6ef4db55da0d28cb37af
diff --git a/git/test/test_submodule.py b/git/test/test_submodule.py
index 364a84e7..d44d026b 100644
--- a/git/test/test_submodule.py
+++ b/git/test/test_submodule.py
@@ -262,10 +262,11 @@ class TestSubmodule(TestBase):
self.failUnlessRaises(InvalidGitRepositoryError, sm.remove)
# forcibly delete the child repository
+ prev_count = len(sm.children())
assert csm.remove(force=True) is csm
assert not csm.exists()
assert not csm.module_exists()
- assert len(sm.children()) == 0
+ assert len(sm.children()) == prev_count - 1
# now we have a changed index, as configuration was altered.
# fix this
sm.module().index.reset(working_tree=True)
@@ -389,7 +390,7 @@ class TestSubmodule(TestBase):
# deep traversal gitdb / async
rsmsp = [sm.path for sm in rm.traverse()]
- assert len(rsmsp) == 2 # gitdb and async, async being a child of gitdb
+ assert len(rsmsp) >= 2 # gitdb and async [and smmap], async being a child of gitdb
# cannot set the parent commit as root module's path didn't exist
self.failUnlessRaises(ValueError, rm.set_parent_commit, 'HEAD')
@@ -538,13 +539,13 @@ class TestSubmodule(TestBase):
# =================
# 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
+ assert len(nsm.children()) >= 1 # could include smmap
+ 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, progress=prog, dry_run=True) # just to run the code
rm.update(recursive=True, progress=prog)
- assert len(nsm.children()) == 1 and nsmc.module_exists()
+ assert len(nsm.children()) >= 2 and nsmc.module_exists()