Skip to content

Commit 2600a4e

Browse files
committed
test(submodule): compare the moved URL with samefile
On Windows the submodule remote URL comes back with forward slashes, so comparing it to `str(moved)` failed on every Windows job. Use `Path(...).samefile(...)` as the other URL checks in this file do. Validated with `test/test_submodule.py` under the `cli` and `gix` backends on Linux; the Windows result comes from CI. Agent-Model: claude-opus-5-5
1 parent 3e0fe16 commit 2600a4e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎test/test_submodule.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2155,7 +2155,7 @@ def test_root_update_url_change_checks_submodule_branch(self):
21552155
with self.assertLogs("git.objects.submodule.root", "WARNING"):
21562156
RootModule(parent).update(previous_commit=previous)
21572157
with submodule.module() as module:
2158-
assert module.remotes.origin.url == str(moved)
2158+
assert Path(module.remotes.origin.url).samefile(moved)
21592159
assert module.active_branch.name == "dev"
21602160
assert module.head.commit == git.Repo(moved).heads.dev.commit
21612161

0 commit comments

Comments
 (0)