Skip to content

Commit 34445e9

Browse files
committed
Better test for absolute Python exe path on Windows
1 parent d340f1c commit 34445e9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/test_find_python_executable.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from os.path import isabs, basename, dirname
2+
import os
23
import re
34
import sys
45
import venv
@@ -17,7 +18,8 @@ def test_self():
1718

1819

1920
def test_abs():
20-
assert find_python_executable("/usr/bin/python") == "/usr/bin/python"
21+
abs_path = "C:\\PythonXY\\python.exe" if os.name == 'nt' else '/usr/bin/python'
22+
assert find_python_executable(abs_path) == abs_path
2123

2224

2325
def test_find_in_path():

0 commit comments

Comments
 (0)