Backport fix to tests using 'python' command.

This commit is contained in:
Elliott Sales de Andrade 2019-02-17 20:26:22 -05:00
parent ee69d52c49
commit 3de0982438
2 changed files with 31 additions and 1 deletions

24
1455.patch Normal file
View File

@ -0,0 +1,24 @@
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):

View File

@ -2,7 +2,7 @@
Name: python-werkzeug
Version: 0.14.1
Release: 6%{?dist}
Release: 7%{?dist}
Summary: The Swiss Army knife of Python web development
License: BSD
@ -17,6 +17,9 @@ Source1: werkzeug-sphinx-theme.tar.gz
# as it's not packaged for Fedora...)
Patch0: 1293.patch
# Use sys.executable in tests
Patch1: https://github.com/pallets/werkzeug/pull/1455.patch
BuildArch: noarch
%global _description\
@ -173,6 +176,9 @@ popd
%changelog
* Sun Feb 17 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.14.1-7
- Backport fix to tests using 'python' command
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.14.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild