From 44b0bffd772179f29cb1a23a6b0917985d5eb984 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8xbro=20Hansen?= Date: Thu, 16 Nov 2023 11:49:20 +0100 Subject: [PATCH] Use sys.executable for check_output (#5983) --- holoviews/tests/util/test_init.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/holoviews/tests/util/test_init.py b/holoviews/tests/util/test_init.py index b47dcb58a1..dc5b80fc21 100644 --- a/holoviews/tests/util/test_init.py +++ b/holoviews/tests/util/test_init.py @@ -1,4 +1,4 @@ -from shutil import which +import sys from subprocess import check_output from textwrap import dedent @@ -15,6 +15,6 @@ def test_no_blocklist_imports(): print(", ".join(mods), end="") """ - output = check_output([('python' if which('python') else 'python3'), '-c', dedent(check)]) + output = check_output([sys.executable, '-c', dedent(check)]) assert output == b""