From 46b7f4b2facac4a73828a736d69101828dda71e0 Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Wed, 17 Jan 2024 11:52:06 +1100 Subject: [PATCH] Use sys.executable in test_exports Not all systems will have 'python' in the path to execute to check exports -- and indeed, it may not even be the interpreter that is under test and can import the module. Since we are already running under the test suite, use sys.executable to check. --- tests/test_exports.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_exports.py b/tests/test_exports.py index 9c7d9b980..149032109 100644 --- a/tests/test_exports.py +++ b/tests/test_exports.py @@ -3,11 +3,12 @@ from typing import Any import stripe import subprocess +import sys def assert_output(code: str, expected: str) -> None: process = subprocess.Popen( - ["python", "-c", f"import stripe; print({code})"], + [sys.executable, "-c", f"import stripe; print({code})"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, )