From f71c3c6f8af716435b6d44c007d502b6fb362e20 Mon Sep 17 00:00:00 2001
From: Simon Brunning
Date: Fri, 2 Nov 2018 09:50:20 +0000
Subject: [PATCH] Silence warnings from tests due to use of old
Hello community,
here is the log from the commit of package python-PyHamcrest for openSUSE:Factory checked in at 2019-07-05 13:48:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-PyHamcrest (Old)
and /work/SRC/openSUSE:Factory/.python-PyHamcrest.new.4615 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-PyHamcrest"
Fri Jul 5 13:48:21 2019 rev:2 rq:713181 version:1.9.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-PyHamcrest/python-PyHamcrest.changes 2018-10-18 15:32:13.118583490 +0200
+++ /work/SRC/openSUSE:Factory/.python-PyHamcrest.new.4615/python-PyHamcrest.changes 2019-07-05 13:48:22.537421614 +0200
@@ -1,0 +2,6 @@
+Wed Jul 3 08:35:33 UTC 2019 - Tomáš Chvátal
+
+- Add patch to fix build with new pytest:
+ * pytest4.patch
+
+-------------------------------------------------------------------
New:
----
pytest4.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-PyHamcrest.spec ++++++
--- /var/tmp/diff_new_pack.XrhkDL/_old 2019-07-05 13:48:23.921423748 +0200
+++ /var/tmp/diff_new_pack.XrhkDL/_new 2019-07-05 13:48:23.921423748 +0200
@@ -1,7 +1,7 @@
#
# spec file for package python-PyHamcrest
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -28,9 +28,10 @@
#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-cov}
+BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module six >= 1.4}
BuildRequires: fdupes
@@ -48,7 +49,8 @@
%prep
%setup -q -n PyHamcrest-%{version}
-%patch0 -p1
+%autopatch -p1
+rm pytest.ini
%build
%python_build
@@ -58,7 +60,7 @@
%python_expand %fdupes %{buildroot}%{$python_sitelib}/hamcrest
%check
-%python_exec setup.py test
+%pytest
%files %{python_files}
%license LICENSE.txt
++++++ pytest4.patch ++++++
pytest.parameterize() signature.
---
tests/hamcrest_unit_test/base_description_test.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/hamcrest_unit_test/base_description_test.py b/tests/hamcrest_unit_test/base_description_test.py
index 82cd238..60f1862 100644
--- a/tests/hamcrest_unit_test/base_description_test.py
+++ b/tests/hamcrest_unit_test/base_description_test.py
@@ -35,10 +35,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'), "")),
+ 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'), "", 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):