Matej Cepl 2019-11-05 10:08:59 +00:00 committed by Git OBS Bridge
parent d68bcec2b7
commit eeefe38afb
3 changed files with 1 additions and 30 deletions

View File

@ -1,27 +0,0 @@
From f71c3c6f8af716435b6d44c007d502b6fb362e20 Mon Sep 17 00:00:00 2001
From: Simon Brunning <simon@brunningonline.net>
Date: Fri, 2 Nov 2018 09:50:20 +0000
Subject: [PATCH] Silence warnings from tests due to use of old
pytest.parameterize() signature.
---
tests/hamcrest_unit_test/base_description_test.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/tests/hamcrest_unit_test/base_description_test.py
+++ b/tests/hamcrest_unit_test/base_description_test.py
@@ -34,10 +34,10 @@ def test_append_text_delegates(desc):
@pytest.mark.parametrize('described, appended', (
(Described(), 'described'),
- pytest.mark.skipif(six.PY3, reason="py2 only")((six.u('unicode-py2'), "'unicode-py2'")),
- pytest.mark.skipif(six.PY3, reason="py2 only")((six.b('bytes-py2'), "'bytes-py2'")),
- pytest.mark.skipif(six.PY2, reason="py3 only")((six.u('unicode-py3'), "'unicode-py3'")),
- pytest.mark.skipif(six.PY2, reason="py3 only")((six.b('bytes-py3'), "<b'bytes-py3'>")),
+ pytest.param(six.u('unicode-py2'), "'unicode-py2'", marks=pytest.mark.skipif(six.PY3, reason="py2 only")),
+ pytest.param(six.b('bytes-py2'), "'bytes-py2'", marks=pytest.mark.skipif(six.PY3, reason="py2 only")),
+ pytest.param(six.u('unicode-py3'), "'unicode-py3'", marks=pytest.mark.skipif(six.PY2, reason="py3 only")),
+ pytest.param(six.b('bytes-py3'), "<b'bytes-py3'>", marks=pytest.mark.skipif(six.PY2, reason="py3 only")),
(six.u("\U0001F4A9"), six.u("'{0}'").format(six.u("\U0001F4A9"))),
))
def test_append_description_types(desc, described, appended):

View File

@ -1,8 +1,7 @@
-------------------------------------------------------------------
Mon Nov 4 14:35:43 UTC 2019 - Matej Cepl <mcepl@suse.com>
- Add pytest4.patch allowing the test suite to pass with pytest 4
Because of gh#hamcrest/PyHamcrest#123 we have to remove
- Because of gh#hamcrest/PyHamcrest#123 we have to remove
tests/hamcrest_unit_test/core/is{_test,instanceof_test}.py to
make the test suite passing.

View File

@ -28,7 +28,6 @@ URL: https://github.com/hamcrest/PyHamcrest
#Source: https://files.pythonhosted.org/packages/source/P/PyHamcrest/PyHamcrest-%%{version}.tar.gz
Source: https://github.com/hamcrest/PyHamcrest/archive/V%{version}.tar.gz
Patch0: 0001-Add-boolean-matchers.patch
Patch1: pytest4.patch
BuildRequires: %{python_module hypothesis >= 1.11}
BuildRequires: %{python_module mock}
BuildRequires: %{python_module pytest}