Skip to content

Commit

Permalink
Better test for absolute Python exe path on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
takluyver committed Oct 31, 2024
1 parent d340f1c commit 34445e9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_find_python_executable.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from os.path import isabs, basename, dirname
import os
import re
import sys
import venv
Expand All @@ -17,7 +18,8 @@ def test_self():


def test_abs():
assert find_python_executable("/usr/bin/python") == "/usr/bin/python"
abs_path = "C:\\PythonXY\\python.exe" if os.name == 'nt' else '/usr/bin/python'
assert find_python_executable(abs_path) == abs_path


def test_find_in_path():
Expand Down

0 comments on commit 34445e9

Please sign in to comment.