Add an option to run tests with the network.

This commit is contained in:
Elliott Sales de Andrade 2019-05-31 02:55:24 -04:00
commit 38de19b9fc

View file

@ -1,6 +1,9 @@
%global srcname cartopy
%global Srcname Cartopy
# Some tests use the network.
%bcond_with network
Name: python-%{srcname}
Version: 0.17.0
Release: 4%{?dist}
@ -113,8 +116,13 @@ done
%check
%if %{with network}
PYTHONPATH="%{buildroot}%{python3_sitearch}" PYTHONDONTWRITEBYTECODE=1 MPLBACKEND=Agg \
pytest-3 --doctest-modules --pyargs cartopy
%else
PYTHONPATH="%{buildroot}%{python3_sitearch}" PYTHONDONTWRITEBYTECODE=1 MPLBACKEND=Agg \
pytest-3 --doctest-modules --pyargs cartopy -m "not network"
%endif
%files -n python-%{srcname}-common