forked from pool/python-CherryPy
- Add patch to work with pytest5, from upstream:
* pytest5.patch - Update to 18.1.2: * Fixed :issue:`1377` via :pr:`1785`: Restore a native WSGI-less HTTP server support. * :pr:`1769`: Reduce log level for non-error events in win32.py OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-CherryPy?expand=0&rev=30
This commit is contained in:
committed by
Git OBS Bridge
parent
fb5de9d29d
commit
a039ff30bc
@@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:6585c19b5e4faffa3613b5bf02c6a27dcc4c69a30d302aba819639a2af6fa48b
|
|
||||||
size 683044
|
|
3
CherryPy-18.1.2.tar.gz
Normal file
3
CherryPy-18.1.2.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:48de31ba3db04c5354a0fcf8acf21a9c5190380013afca746d50237c9ebe70f0
|
||||||
|
size 683411
|
63
pytest5.patch
Normal file
63
pytest5.patch
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
From 96b34dfea7853b0189bc0a3878b6ddff0d4e505c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sviatoslav Sydorenko <wk@sydorenko.org.ua>
|
||||||
|
Date: Wed, 3 Jul 2019 11:59:52 +0200
|
||||||
|
Subject: [PATCH] Fix test_invalid_status to work with pytest 5
|
||||||
|
|
||||||
|
Ref: https://github.com/cherrypy/cherrypy/pull/1791#issuecomment-508026879
|
||||||
|
---
|
||||||
|
cherrypy/test/test_httputil.py | 4 +---
|
||||||
|
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/cherrypy/test/test_httputil.py b/cherrypy/test/test_httputil.py
|
||||||
|
index fe6a3f41..c6b858b8 100644
|
||||||
|
--- a/cherrypy/test/test_httputil.py
|
||||||
|
+++ b/cherrypy/test/test_httputil.py
|
||||||
|
@@ -74,7 +74,5 @@ def test_valid_status(status, expected_status):
|
||||||
|
)
|
||||||
|
def test_invalid_status(status_code, error_msg):
|
||||||
|
"""Check that invalid status cause certain errors."""
|
||||||
|
- with pytest.raises(ValueError) as excinfo:
|
||||||
|
+ with pytest.raises(ValueError, match=error_msg):
|
||||||
|
httputil.valid_status(status_code)
|
||||||
|
-
|
||||||
|
- assert error_msg in str(excinfo)
|
||||||
|
From 14c12d2420a4b3765bb241250bd186e93b2f25eb Mon Sep 17 00:00:00 2001
|
||||||
|
From: Sviatoslav Sydorenko <wk@sydorenko.org.ua>
|
||||||
|
Date: Wed, 3 Jul 2019 14:04:02 +0200
|
||||||
|
Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=E2=9C=85=20Fix=20pattern=20matchin?=
|
||||||
|
=?UTF-8?q?g=20in=20test=5Finvalid=5Fstatus?=
|
||||||
|
MIME-Version: 1.0
|
||||||
|
Content-Type: text/plain; charset=UTF-8
|
||||||
|
Content-Transfer-Encoding: 8bit
|
||||||
|
|
||||||
|
---
|
||||||
|
cherrypy/test/test_httputil.py | 13 ++++++++-----
|
||||||
|
1 file changed, 8 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/cherrypy/test/test_httputil.py b/cherrypy/test/test_httputil.py
|
||||||
|
index c6b858b8..84661424 100644
|
||||||
|
--- a/cherrypy/test/test_httputil.py
|
||||||
|
+++ b/cherrypy/test/test_httputil.py
|
||||||
|
@@ -62,14 +62,17 @@ def test_valid_status(status, expected_status):
|
||||||
|
@pytest.mark.parametrize(
|
||||||
|
'status_code,error_msg',
|
||||||
|
[
|
||||||
|
- ('hey', "Illegal response status from server ('hey' is non-numeric)."),
|
||||||
|
+ (
|
||||||
|
+ 'hey',
|
||||||
|
+ r"Illegal response status from server \('hey' is non-numeric\)."
|
||||||
|
+ ),
|
||||||
|
(
|
||||||
|
{'hey': 'hi'},
|
||||||
|
- 'Illegal response status from server '
|
||||||
|
- "({'hey': 'hi'} is non-numeric).",
|
||||||
|
+ r'Illegal response status from server '
|
||||||
|
+ r"\(\{'hey': 'hi'\} is non-numeric\).",
|
||||||
|
),
|
||||||
|
- (1, 'Illegal response status from server (1 is out of range).'),
|
||||||
|
- (600, 'Illegal response status from server (600 is out of range).'),
|
||||||
|
+ (1, r'Illegal response status from server \(1 is out of range\).'),
|
||||||
|
+ (600, r'Illegal response status from server \(600 is out of range\).'),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
def test_invalid_status(status_code, error_msg):
|
@@ -1,3 +1,16 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jul 19 12:13:03 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
- Add patch to work with pytest5, from upstream:
|
||||||
|
* pytest5.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Jul 19 12:06:57 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
- Update to 18.1.2:
|
||||||
|
* Fixed :issue:`1377` via :pr:`1785`: Restore a native WSGI-less HTTP server support.
|
||||||
|
* :pr:`1769`: Reduce log level for non-error events in win32.py
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri May 31 15:32:40 CEST 2019 - Matej Cepl <mcepl@suse.com>
|
Fri May 31 15:32:40 CEST 2019 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
@@ -19,13 +19,14 @@
|
|||||||
%define skip_python2 1
|
%define skip_python2 1
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||||
Name: python-CherryPy
|
Name: python-CherryPy
|
||||||
Version: 18.1.1
|
Version: 18.1.2
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Object-Oriented HTTP framework
|
Summary: Object-Oriented HTTP framework
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
URL: http://www.cherrypy.org
|
URL: http://www.cherrypy.org
|
||||||
Source: https://files.pythonhosted.org/packages/source/C/CherryPy/CherryPy-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/C/CherryPy/CherryPy-%{version}.tar.gz
|
||||||
|
Patch0: pytest5.patch
|
||||||
BuildRequires: %{python_module setuptools_scm}
|
BuildRequires: %{python_module setuptools_scm}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
@@ -69,6 +70,7 @@ Oh, and most importantly: CherryPy is fun to work with :-)
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n CherryPy-%{version}
|
%setup -q -n CherryPy-%{version}
|
||||||
|
%patch0 -p1
|
||||||
# do not require cov/xdist/etc
|
# do not require cov/xdist/etc
|
||||||
sed -i -e '/addopts/d' pytest.ini
|
sed -i -e '/addopts/d' pytest.ini
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user