Use sys.executable

This commit is contained in:
jack1142
2022-07-29 18:52:26 +02:00
parent cccc2acae9
commit e0f25c5fb5
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
import os
import subprocess
import sys
import textwrap
import pytest
@@ -33,7 +34,7 @@ project_with_environment_asserts = test_projects.new_c_project(
def test(tmp_path):
python_echo = 'python -c "import sys; print(*sys.argv[1:])"'
python_echo = f'"{sys.executable}" -c "import sys; print(*sys.argv[1:])"'
project_dir = tmp_path / "project"
project_with_environment_asserts.generate(project_dir)
+2 -1
View File
@@ -1,8 +1,9 @@
import os
import sys
from cibuildwheel.environment import parse_environment
PYTHON_ECHO = 'python -c "import sys; print(*sys.argv[1:])"'
PYTHON_ECHO = f'"{sys.executable}" -c "import sys; print(*sys.argv[1:])"'
def test_basic_parsing():