diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-11-15 11:37:14 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-11-15 11:37:14 +0100 |
commit | a1e2f63e64875a29e8c01a7ae17f5744680167a5 (patch) | |
tree | 8feb612ac5df79ec31300359b2bd28c40424bec0 /test/git/test_submodule.py | |
parent | a1d1d2cb421f16bd277d7c4ce88398ff0f5afb29 (diff) | |
download | gitpython-a1e2f63e64875a29e8c01a7ae17f5744680167a5.tar.gz |
submodule: Fleshed out interface, and a partial test which is not yet usable. It showed that the ConfigParser needs some work. If the root is set, it also needs to refer to the root_commit instead of to the root-tree, as it will have to decide whether it works on the working tree's version of the .gitmodules file or the one in the repository
Diffstat (limited to 'test/git/test_submodule.py')
-rw-r--r-- | test/git/test_submodule.py | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/test/git/test_submodule.py b/test/git/test_submodule.py index 5f78b6e8..7922db77 100644 --- a/test/git/test_submodule.py +++ b/test/git/test_submodule.py @@ -6,7 +6,35 @@ from git import * class TestSubmodule(TestBase): - def test_base(self): - # TODO - pass + kCOTag = '0.1.6' + + def _do_base_tests(self, rwrepo): + """Perform all tests in the given repository, it may be bare or nonbare""" + + # uncached path/url - retrieves information from .gitmodules file + + # changing the root_tree yields new values when querying them (i.e. cache is cleared) + + + # size is invalid + self.failUnlessRaises(ValueError, getattr, sm, 'size') + + # fails if tree has no gitmodule file + + if rwrepo.bare: + # module fails + pass + else: + # get the module repository + pass + # END bare handling + + @with_rw_repo(kCOTag) + def test_base_rw(self, rwrepo): + self._do_base_tests(rwrepo) + + @with_bare_rw_repo + def test_base_bare(self, rwrepo): + self._do_base_tests(rwrepo) + |