Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 09a96fb

Browse filesBrowse files
committed
add test case for submodule depth parameter
Signed-off-by: Liam Beguin <liambeguin@gmail.com>
1 parent 809c791 commit 09a96fb
Copy full SHA for 09a96fb

1 file changed

+8Lines changed: 8 additions & 0 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎git/test/test_submodule.py‎

Copy file name to clipboardExpand all lines: git/test/test_submodule.py
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -936,3 +936,11 @@ class Repo(object):
936936
relative_path = Submodule._to_relative_path(super_repo, submodule_path)
937937
msg = '_to_relative_path should be "submodule_path" but was "%s"' % relative_path
938938
assert relative_path == 'submodule_path', msg
939+
940+
@with_rw_directory
941+
def test_depth(self, rwdir):
942+
parent = git.Repo.init(osp.join(rwdir, 'test_depth'))
943+
sm_name = 'mymodules/myname'
944+
sm_depth = 1
945+
sm = parent.create_submodule(sm_name, sm_name, url=self._small_repo_url(), depth=sm_depth)
946+
assert len(list(sm.module().iter_commits())) == sm_depth

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.