Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add test case for submodule depth parameter
Signed-off-by: Liam Beguin <liambeguin@gmail.com>
  • Loading branch information
liambeguin committed May 2, 2020
commit 09a96fb2ea908e20d5acb7445d542fa2f8d10bb6
8 changes: 8 additions & 0 deletions git/test/test_submodule.py
Original file line number Diff line number Diff line change
Expand Up @@ -936,3 +936,11 @@ class Repo(object):
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

@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)
assert len(list(sm.module().iter_commits())) == sm_depth