diff --git a/tests/test_script.py b/tests/test_script.py index 1afac0d..ba42d20 100644 --- a/tests/test_script.py +++ b/tests/test_script.py @@ -1,9 +1,10 @@ # test_script.py import subprocess +import sys def test_script_output(capfd): - # run the script file under a new process - subprocess.run(['python', './script.py']) + # Run the script file under a new process using the same Python interpreter + subprocess.run([sys.executable, './script.py']) # Capture process output captured = capfd.readouterr()