python-bokeh/bokeh-sys-executable.patch

27 lines
981 B
Diff
Raw Normal View History

diff --git a/tests/support/plugins/bokeh_server.py b/tests/support/plugins/bokeh_server.py
index c37f31bfa..50d786a4b 100644
--- a/tests/support/plugins/bokeh_server.py
+++ b/tests/support/plugins/bokeh_server.py
@@ -55,7 +55,7 @@ __all__ = (
def bokeh_server(request: pytest.FixtureRequest, log_file: IO[str]) -> str:
bokeh_port: int = request.config.option.bokeh_port
- cmd = ["python", "-m", "bokeh", "serve"]
+ cmd = [sys.executable, "-m", "bokeh", "serve"]
argv = [f"--port={bokeh_port}"]
bokeh_server_url = f"http://localhost:{bokeh_port}"
diff --git a/tests/test_examples.py b/tests/test_examples.py
index 7072f2f88..1dfb1a4e8 100644
--- a/tests/test_examples.py
+++ b/tests/test_examples.py
@@ -268,7 +268,7 @@ with open(filename, 'rb') as example:
exec(compile(example.read(), filename, 'exec'))
"""
- cmd = ["python", "-c", code]
+ cmd = [sys.executable, "-c", code]
cwd = dirname(example.path)
env = os.environ.copy()