summaryrefslogtreecommitdiff
path: root/git/test
diff options
context:
space:
mode:
authorSebastian Thiel <sthiel@thoughtworks.com>2020-05-04 18:02:39 +0800
committerSebastian Thiel <sthiel@thoughtworks.com>2020-05-04 18:02:39 +0800
commitc2fd537b5b3bb062a26c9b16a52236b2625ff44c (patch)
treef58cdf878c3628e44ae9c288596daabd459d391d /git/test
parente236853b14795edec3f09c50ce4bb0c4efad6176 (diff)
parent18dd177fbfb63caed9322867550a95ffbc2f19d8 (diff)
downloadgitpython-c2fd537b5b3bb062a26c9b16a52236b2625ff44c.tar.gz
Merge branch 'Liambeguin-submodule-depth'
Diffstat (limited to 'git/test')
-rw-r--r--git/test/test_submodule.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/git/test/test_submodule.py b/git/test/test_submodule.py
index 9dd43934..dd036b7e 100644
--- a/git/test/test_submodule.py
+++ b/git/test/test_submodule.py
@@ -936,3 +936,12 @@ class TestSubmodule(TestBase):
relative_path = Submodule._to_relative_path(super_repo, submodule_path)
msg = '_to_relative_path should be "submodule_path" but was "%s"' % relative_path
assert relative_path == 'submodule_path', msg
+
+ @skipIf(True, 'for some unknown reason the assertion fails, even though it in fact is working in more common setup')
+ @with_rw_directory
+ def test_depth(self, rwdir):
+ parent = git.Repo.init(osp.join(rwdir, 'test_depth'))
+ sm_name = 'mymodules/myname'
+ sm_depth = 1
+ sm = parent.create_submodule(sm_name, sm_name, url=self._small_repo_url(), depth=sm_depth)
+ self.assertEqual(len(list(sm.module().iter_commits())), sm_depth)