From 38c2408a657fb92fa224780c199c99c61d53c548ebce3ba7f8df7f93b130bfaa Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 26 Nov 2024 02:17:11 +0000 Subject: [PATCH] WIP OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-exiv2?expand=0&rev=31 --- python-exiv2.spec | 4 ++++ skip_network_tests.patch | 14 ++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 skip_network_tests.patch diff --git a/python-exiv2.spec b/python-exiv2.spec index a35210a..250b24b 100644 --- a/python-exiv2.spec +++ b/python-exiv2.spec @@ -25,6 +25,9 @@ License: GPL-3.0-only Group: Development/Languages/Python URL: https://github.com/jim-easterbrook/python-exiv2 Source: https://github.com/jim-easterbrook/python-exiv2/archive/refs/tags/%{version}.tar.gz +# PATCH-FIX-UPSTREAM skip_network_tests.patch bsc#[0-9]+ mcepl@suse.com +# this patch makes things totally awesome +Patch0: skip_network_tests.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} @@ -58,6 +61,7 @@ easy manipulation of image metadata. %python_expand %fdupes %{buildroot}%{$python_sitearch} %check +export NONET=1 %pyunittest_arch discover -v tests/ %files %{python_files} diff --git a/skip_network_tests.patch b/skip_network_tests.patch new file mode 100644 index 0000000..960ab5c --- /dev/null +++ b/skip_network_tests.patch @@ -0,0 +1,14 @@ +--- + tests/test_basicio.py | 1 + + 1 file changed, 1 insertion(+) + +--- a/tests/test_basicio.py ++++ b/tests/test_basicio.py +@@ -33,6 +33,7 @@ class TestBasicIoModule(unittest.TestCas + cls.image_path = os.path.join(test_dir, 'image_02.jpg') + cls.data = b'The quick brown fox jumps over the lazy dog' + ++ @unittest.skipIf('NONET' in os.environ, 'Requires network access') + @unittest.skipUnless(exiv2.versionInfo()['EXV_USE_CURL'], + 'CurlIo not included') + def test_CurlIo(self):