Skip to content

Commit e75c6a0

Browse files
committed
Convert slashes on Windows
1 parent 19cdc19 commit e75c6a0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/unit/test_urls.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,9 @@ def test_unc_path_to_url_win() -> None:
3838

3939
@pytest.mark.skipif("sys.platform != 'win32'")
4040
def test_relative_path_to_url_win() -> None:
41-
resolved_path = os.path.join(os.getcwd(), "file")
42-
assert path_to_url("file") == "file:///" + urllib.parse.quote(resolved_path, safe="/:")
41+
resolved_path = os.path.join(os.getcwd(), "file").replace("\\", "/")
42+
quoted_path = urllib.parse.quote(resolved_path, safe="/:")
43+
assert path_to_url("file") == "file:///" + quoted_path
4344

4445

4546
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)