Blob Blame History Raw
From 1cfdcf9824cb20e362979e8f7734012926492165 Mon Sep 17 00:00:00 2001
From: Petr Viktorin <encukou@gmail.com>
Date: Tue, 5 Feb 2019 13:50:43 +0100
Subject: [PATCH] test_serving: Use sys.executable, not 'python'

This test failed on systems where the Python command is not called "python".
Also, it could execute Python 2 when pytest is run under py3, or vice versa.
---
 tests/test_serving.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/test_serving.py b/tests/test_serving.py
index 428af7319..a6a05d4f6 100644
--- a/tests/test_serving.py
+++ b/tests/test_serving.py
@@ -287,7 +287,7 @@ def sleep(secs):
     from werkzeug._reloader import ReloaderLoop
     ReloaderLoop()._sleep(0)
     '''))
-    subprocess.check_call(['python', str(script)])
+    subprocess.check_call([sys.executable, str(script)])
 
 
 def test_wrong_protocol(dev_server):