Skip to content

Commit edd3b52

Browse files
committed
fighting with testing windows paths
1 parent dd3dd1c commit edd3b52

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/test_path_finder.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,13 @@ def test_which(simple_path_finder):
307307
result = simple_path_finder.which("python")
308308

309309
# Check that we got the correct path
310-
assert result == Path("/usr/bin/python")
310+
if os.name == "nt":
311+
# On Windows, normalize the path for comparison
312+
assert result.as_posix().endswith(
313+
"/usr/bin/python"
314+
) or result.as_posix().endswith("/usr/bin/python.exe")
315+
else:
316+
assert result == Path("/usr/bin/python")
311317

312318
# Test with only_python=True and non-python executable
313319
simple_path_finder.only_python = True

0 commit comments

Comments
 (0)