8000 fix(tests): remove dependency on sort order · light-bringer/GitPython@039e265 · GitHub
[go: up one dir, main page]

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 039e265

Browse files
committed
fix(tests): remove dependency on sort order
Now we select the submodule by name, not by index. The latter is not deterministic. Closes gitpython-developers#335
1 parent a0acb22 commit 039e265

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git/test/test_submodule.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ def test_git_submodules_and_add_sm_with_new_commit(self, rwdir):
697697

698698
# submodules are retrieved from the current commit's tree, therefore we can't really get a new submodule
699699
# object pointing to the new submodule commit
700-
sm_too = parent.submodules[0]
700+
sm_too = parent.submodules['module_moved']
701701
assert parent.head.commit.tree[sm.path].binsha == sm.binsha
702702
assert sm_too.binsha == sm.binsha, "cached submodule should point to the same commit as updated one"
703703

0 commit comments

Comments
 (0)
0