diff --git a/tests/func/test_api.py b/tests/func/test_api.py index 41cd0f743..b3f0c0aba 100644 --- a/tests/func/test_api.py +++ b/tests/func/test_api.py @@ -57,7 +57,8 @@ def test_get_url_git_only_repo_throws_exception(tmp_dir, scm): with pytest.raises(UrlNotDvcRepoError) as exc_info: api.get_url("foo", fspath(tmp_dir)) - assert fspath(tmp_dir) in str(exc_info) + # On windows, `exc_info` has path escaped, eg: `C:\\\\Users\\\\travis` + assert fspath(tmp_dir) in str(exc_info).replace("\\\\", "\\") @pytest.mark.parametrize("remote_url", all_remote_params, indirect=True)