Add an option to run tests with the network.
This commit is contained in:
parent
c18ae140d1
commit
38de19b9fc
1 changed files with 8 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue