diff tests/test-run-tests.py @ 52614:484a4d5d360e

run-tests: no longer rely on global variable for python path We move that value as an attribute to the test runner and the tests, this will allow more flexibility in later changeset, especially to make sure we use the venv in a more traditional way in the future.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 30 Dec 2024 22:10:02 +0100
parents 6000f5b25c9b
children
line wrap: on
line diff
--- a/tests/test-run-tests.py	Mon Jan 06 03:36:01 2025 +0100
+++ b/tests/test-run-tests.py	Mon Dec 30 22:10:02 2024 +0100
@@ -7,6 +7,7 @@
 import doctest
 import os
 import re
+import sys
 
 # this is hack to make sure no escape characters are inserted into the output
 if 'TERM' in os.environ:
@@ -43,7 +44,9 @@
     assert not re.search(
         br'[^ \w\\/\r\n()*?]', expected + output
     ), b'single backslash or unknown char'
-    test = run_tests.TTest(b'test-run-test.t', b'.', b'.')
+    test = run_tests.TTest(
+        b'test-run-test.t', b'.', b'.', python=sys.executable
+    )
     match, exact = test.linematch(expected, output)
     if isinstance(match, str):
         return 'special: ' + match