diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2011-07-07 21:01:12 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2011-07-07 21:01:12 +0200 |
commit | b56764b2dbe8845d476e41c8659fc0543ffb3433 (patch) | |
tree | 07ac4cfb26492bfb9c35497a39cbcad36ecc5680 /git | |
parent | 8b3b222565199eab67196a5ab840b9e2770bfc53 (diff) | |
download | gitpython-b56764b2dbe8845d476e41c8659fc0543ffb3433.tar.gz |
Fixed submodule related issues once again - is it ever going to end ?
Diffstat (limited to 'git')
-rw-r--r-- | git/test/db/base.py | 8 | ||||
-rw-r--r-- | git/test/objects/test_submodule.py | 4 |
2 files changed, 7 insertions, 5 deletions
diff --git a/git/test/db/base.py b/git/test/db/base.py index 7016afb7..2f8f50e2 100644 --- a/git/test/db/base.py +++ b/git/test/db/base.py @@ -601,12 +601,12 @@ class RepoBase(TestDBBase): self.failUnlessRaises(NotImplementedError, rev_parse, "@{1 week ago}") def test_submodules(self): - assert len(self.rorepo.submodules) == 1 # non-recursive + assert len(self.rorepo.submodules) == 2 # non-recursive # in previous configurations, we had recursive repositories so this would compare to 2 - # now there is only one left, as gitdb was merged - assert len(list(self.rorepo.iter_submodules())) == 1 + # now there is only one left, as gitdb was merged, but we have smmap instead + assert len(list(self.rorepo.iter_submodules())) == 2 - assert isinstance(self.rorepo.submodule("git/ext/async"), Submodule) + assert isinstance(self.rorepo.submodule("async"), Submodule) self.failUnlessRaises(ValueError, self.rorepo.submodule, "doesn't exist") @with_rw_repo('HEAD', bare=False) diff --git a/git/test/objects/test_submodule.py b/git/test/objects/test_submodule.py index e5adedbc..2b7c7f40 100644 --- a/git/test/objects/test_submodule.py +++ b/git/test/objects/test_submodule.py @@ -284,7 +284,9 @@ class TestSubmodule(TestObjectBase): # make sure sub-submodule is not modified by forcing it to update # to the revision it is supposed to point to. - csm.update() + for subitem in sm.traverse(): + subitem.update() + #END checkout to right commit # this would work assert sm.remove(dry_run=True) is sm |