9f946a2aa809 draft — Oben Sonne 11 months ago
Fix sys.executable usage
1 files changed, 5 insertions(+), 7 deletions(-)

M tests/run.py
M tests/run.py +5 -7
@@ 7,10 7,8 @@ import sys
 import glob
 
 HERE = os.path.dirname(__file__)
-POOLE = [
-    os.path.join(HERE, "..", "env", "bin", sys.executable),
-    os.path.join(HERE, "..", "poole.py"),
-]
+PYTHON = sys.executable
+POOLE = os.path.join(HERE, "..", "poole.py")
 ACTUAL = os.path.join(HERE, "actual")
 EXPECTED = os.path.join(HERE, "expected")
 ERRORS = os.path.join(HERE, "errors.diff")

          
@@ 23,9 21,9 @@ if os.path.exists(ACTUAL):
 if os.path.exists(ERRORS):
     os.remove(ERRORS)
 
-cmd_init = POOLE + [ACTUAL, "--init"]
-cmd_build_dry_run = POOLE + [ACTUAL, "--build", "--dry-run"]
-cmd_build = POOLE + [ACTUAL, "--build"]
+cmd_init = [PYTHON, POOLE, ACTUAL, "--init"]
+cmd_build_dry_run = [PYTHON, POOLE, ACTUAL, "--build", "--dry-run"]
+cmd_build = [PYTHON, POOLE, ACTUAL, "--build"]
 cmd_diff = ["diff", "-Naur", EXPECTED, ACTUAL]
 
 r = subprocess.call(cmd_init, stdout=subprocess.PIPE)