From 5a7b2bc30019e46462308033140db0a31760cc5ec0af6b4f48f602a9af25627c Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 15 Dec 2020 12:57:04 +0000 Subject: [PATCH] - Add make-py2-compat.patch to pass tests on Leap 15.2 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pycurl?expand=0&rev=75 --- make-py2-compat.patch | 22 ++++++++++++++++++++++ python-pycurl.changes | 5 +++++ python-pycurl.spec | 5 ++++- 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 make-py2-compat.patch diff --git a/make-py2-compat.patch b/make-py2-compat.patch new file mode 100644 index 0000000..1fd32db --- /dev/null +++ b/make-py2-compat.patch @@ -0,0 +1,22 @@ +--- + tests/curl_object_test.py | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/tests/curl_object_test.py ++++ b/tests/curl_object_test.py +@@ -143,11 +143,11 @@ class CurlObjectTest(unittest.TestCase): + # change does not affect objects created later + obj3 = cls() + self.assertEqual(old_value, getattr(obj3, name)) +- ++ + def test_bogus_attribute_access(self): +- with pytest.raises(AttributeError, match='trying to obtain.*'): +- self.curl.foo +- ++ with pytest.raises(AttributeError): ++ self.curl.foo ++ + def test_bogus_attribute_delete(self): + with pytest.raises(AttributeError, match='trying to delete.*'): + del self.curl.foo diff --git a/python-pycurl.changes b/python-pycurl.changes index 927a367..501d523 100644 --- a/python-pycurl.changes +++ b/python-pycurl.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Dec 15 12:56:23 UTC 2020 - Matej Cepl + +- Add make-py2-compat.patch to pass tests on Leap 15.2 + ------------------------------------------------------------------- Mon Dec 14 14:15:29 UTC 2020 - Matej Cepl diff --git a/python-pycurl.spec b/python-pycurl.spec index d3ece27..f03834f 100644 --- a/python-pycurl.spec +++ b/python-pycurl.spec @@ -43,6 +43,9 @@ Patch3: disable_randomly_failing_tests.patch # PATCH-FEATURE-UPSTREAM remove_nose.patch gh#pycurl/pycurl#655 mcepl@suse.com # remove dependency on nose Patch4: remove_nose.patch +# PATCH-FIX-UPSTREAM make-py2-compat.patch bsc#[0-9]+ mcepl@suse.com +# Make tests passing with Leap 15.2 +Patch5: make-py2-compat.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} BuildRequires: fdupes @@ -114,7 +117,7 @@ if ! pkg-config --variable=supported_protocols libcurl|grep -qw SCP; then test_flags="$test_flags or ssh" fi # test_getinfo are failing with new bottle -%pytest_arch -k "not ($test_flags or test_getinfo)" +%pytest_arch -s -k "not ($test_flags or test_getinfo)" rm -rf %{buildroot}%{_prefix}/lib/debug %{buildroot}%{_libdir}/python* # test %endif