Skip to content

Commit 574934b

Browse files
committed
tests(config variations): Improve remote test
1 parent e20e66e commit 574934b

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tests/test_sync.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,16 @@ def test_config_variations(
164164
for remote_name in remotes:
165165
current_remote = repo.remote(remote_name)
166166
assert current_remote is not None
167-
assert current_remote.fetch_url == repo_url
167+
assert repo_dict is not None
168+
assert isinstance(remote_name, str)
169+
if (
170+
"remotes" in repo_dict
171+
and isinstance(repo_dict["remotes"], dict)
172+
and remote_name in repo_dict["remotes"]
173+
):
174+
assert current_remote.fetch_url == repo_dict["remotes"][
175+
remote_name
176+
].fetch_url.replace("git+", "")
168177

169178

170179
class UpdatingRemoteFixture(t.NamedTuple):

0 commit comments

Comments
 (0)