Skip to content

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 #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

+1-1
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)