From eb5749d735d0bd372c4ffecb40c888bfdff5b2c7 Mon Sep 17 00:00:00 2001 From: sarayourfriend Date: Thu, 21 Nov 2024 10:38:09 +1100 Subject: [PATCH] Ensure examples tests always run with the current interpreter --- tests/integration/examples_test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/integration/examples_test.py b/tests/integration/examples_test.py index 0ae8e66..f21ef4e 100644 --- a/tests/integration/examples_test.py +++ b/tests/integration/examples_test.py @@ -1,6 +1,7 @@ import platform import subprocess from pathlib import Path +import sys import pytest @@ -16,6 +17,6 @@ @pytest.mark.parametrize("example", examples) def test_examples(example): - result = subprocess.run(["python", f"examples/{example}"], check=False) + result = subprocess.run([sys.executable, f"examples/{example}"], check=False) assert result.returncode == 0, result.stdout