15
0
forked from pool/python-exiv2
2024-11-26 02:17:11 +00:00
committed by Git OBS Bridge
parent 5ba6440a01
commit 38c2408a65
2 changed files with 18 additions and 0 deletions

View File

@@ -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}

14
skip_network_tests.patch Normal file
View File

@@ -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):