- Add patch to work with pytest5:
* pytest5.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pook?expand=0&rev=7
This commit is contained in:
parent
42cbf81ef2
commit
a592232a4a
22
pytest5.patch
Normal file
22
pytest5.patch
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
From 2071da27701c82ce02b015e01e2aa6fd203e7bb5 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tom <tomas@aparicio.me>
|
||||||
|
Date: Tue, 5 May 2020 14:22:30 +0200
|
||||||
|
Subject: [PATCH] fix(#69): use match keyword in pytest.raises
|
||||||
|
|
||||||
|
---
|
||||||
|
tests/unit/matchers/base_test.py | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/tests/unit/matchers/base_test.py b/tests/unit/matchers/base_test.py
|
||||||
|
index 175bd67..b01aa23 100644
|
||||||
|
--- a/tests/unit/matchers/base_test.py
|
||||||
|
+++ b/tests/unit/matchers/base_test.py
|
||||||
|
@@ -33,7 +33,7 @@ def test_base_matcher_exceptions():
|
||||||
|
assert _BaseMatcher('foo').match(None) is None
|
||||||
|
|
||||||
|
with pytest.raises(ValueError,
|
||||||
|
- message='expectation argument cannot be empty'):
|
||||||
|
+ match='expectation argument cannot be empty'):
|
||||||
|
_BaseMatcher(None)
|
||||||
|
|
||||||
|
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed May 6 06:59:43 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||||
|
|
||||||
|
- Add patch to work with pytest5:
|
||||||
|
* pytest5.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Mar 24 09:20:50 UTC 2020 - pgajdos@suse.com
|
Tue Mar 24 09:20:50 UTC 2020 - pgajdos@suse.com
|
||||||
|
|
||||||
|
@ -24,9 +24,9 @@ Version: 1.0.0
|
|||||||
Release: 0
|
Release: 0
|
||||||
Summary: HTTP traffic mocking and expectations
|
Summary: HTTP traffic mocking and expectations
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: Development/Languages/Python
|
|
||||||
URL: https://github.com/h2non/pook
|
URL: https://github.com/h2non/pook
|
||||||
Source: https://files.pythonhosted.org/packages/source/p/pook/pook-%{version}.tar.gz
|
Source: https://files.pythonhosted.org/packages/source/p/pook/pook-%{version}.tar.gz
|
||||||
|
Patch0: pytest5.patch
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
@ -43,7 +43,7 @@ BuildRequires: %{python_module jsonschema >= 2.5.1}
|
|||||||
BuildRequires: %{python_module mocket >= 1.6.0}
|
BuildRequires: %{python_module mocket >= 1.6.0}
|
||||||
BuildRequires: %{python_module mock}
|
BuildRequires: %{python_module mock}
|
||||||
BuildRequires: %{python_module nose >= 1.3.7}
|
BuildRequires: %{python_module nose >= 1.3.7}
|
||||||
BuildRequires: %{python_module pytest < 5}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module requests >= 2.20.0}
|
BuildRequires: %{python_module requests >= 2.20.0}
|
||||||
BuildRequires: %{python_module urllib3 >= 1.19.1}
|
BuildRequires: %{python_module urllib3 >= 1.19.1}
|
||||||
BuildRequires: %{python_module xmltodict >= 0.10.2}
|
BuildRequires: %{python_module xmltodict >= 0.10.2}
|
||||||
@ -55,6 +55,7 @@ HTTP traffic mocking and expectations.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n pook-%{version}
|
%setup -q -n pook-%{version}
|
||||||
|
%patch0 -p1
|
||||||
rm -f setup.cfg pytest.ini tox.ini
|
rm -f setup.cfg pytest.ini tox.ini
|
||||||
|
|
||||||
# Assist unittest on Python 2
|
# Assist unittest on Python 2
|
||||||
@ -72,8 +73,8 @@ touch tests/__init__.py
|
|||||||
%check
|
%check
|
||||||
%{python_expand #
|
%{python_expand #
|
||||||
export PYTHONPATH=%{buildroot}%{$python_sitelib}
|
export PYTHONPATH=%{buildroot}%{$python_sitelib}
|
||||||
$python -m pytest tests/unit
|
$python -m pytest -v tests/unit
|
||||||
$python -m pytest tests/integration/engines/pytest_suite.py
|
$python -m pytest -v tests/integration/engines/pytest_suite.py
|
||||||
$python -m nose tests/integration/engines/nose_suite.py
|
$python -m nose tests/integration/engines/nose_suite.py
|
||||||
export PYTHONPATH=%{buildroot}%{$python_sitelib}:.
|
export PYTHONPATH=%{buildroot}%{$python_sitelib}:.
|
||||||
$python -m unittest tests.integration.engines.unittest_suite
|
$python -m unittest tests.integration.engines.unittest_suite
|
||||||
|
Loading…
Reference in New Issue
Block a user