Skip to content

Commit 7173abd

Browse files
committed
Try to fix windows
1 parent 54fd73d commit 7173abd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/test_utils.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,11 @@ def test_make_absolute_href(self) -> None:
177177

178178
for source_href, start_href, expected in test_cases:
179179
actual = make_absolute_href(source_href, start_href)
180-
_, actual = os.path.splitdrive(actual)
180+
if expected.startswith("file://"):
181+
_, actual = os.path.splitdrive(actual.replace("file://", ""))
182+
actual = f"file://{actual}"
183+
else:
184+
_, actual = os.path.splitdrive(actual)
181185
self.assertEqual(actual, expected)
182186

183187
def test_make_absolute_href_on_vsitar(self) -> None:

0 commit comments

Comments
 (0)