We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dd3dd1c commit edd3b52Copy full SHA for edd3b52
tests/test_path_finder.py
@@ -307,7 +307,13 @@ def test_which(simple_path_finder):
307
result = simple_path_finder.which("python")
308
309
# Check that we got the correct path
310
- assert result == Path("/usr/bin/python")
+ 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")
317
318
# Test with only_python=True and non-python executable
319
simple_path_finder.only_python = True
0 commit comments