14
0
forked from pool/python-vistir

Accepting request 848399 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/848399
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-vistir?expand=0&rev=11
This commit is contained in:
2020-11-17 20:21:06 +00:00
committed by Git OBS Bridge
2 changed files with 16 additions and 3 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Nov 13 08:32:25 UTC 2020 - John Vandenberg <jayvdb@gmail.com>
- Disable tests that fail on Python 2 only, fixing Leap builds
-------------------------------------------------------------------
Wed Jul 22 12:40:25 UTC 2020 - Marketa Calabkova <mcalabkova@suse.com>

View File

@@ -66,7 +66,6 @@ subprocesses, and more.
%setup -q -n vistir-%{version}
sed -i '/invoke/d;/parver/d;/wheel$/d;/addopts/d' setup.cfg
rm -r tasks
%build
%python_build
@@ -77,10 +76,19 @@ rm -r tasks
%check
export LANG=en_US.UTF-8
# test_open_file requires network access
# test_open_file_without_requests requires network access
# test_path_to_url needs bigger seed than some of our virtuals provide
# test_ensure_mkdir_p race condition
%pytest -k 'not (test_open_file or test_path_to_url or test_ensure_mkdir_p)'
# test_mkdir_p very slow on Leap Python 2
# test_decode_encode and test_run_failing_subprocess fails on Leap 15.2 Python 2
%{python_expand skip_tests="test_open_file_without_requests"
if [ $python = "%{_bindir}/python2" ]; then
skip_tests+=" or mkdir_p or test_decode_encode or test_run_failing_subprocess"
fi
export PYTHONPATH=%{buildroot}%{$python_sitelib}
$python -m pytest -v -k "not ($skip_tests)"
}
%files %{python_files}
%doc CHANGELOG.rst README.rst