Switch to pytest for running tests.

The old `numpy.test` only returned True or False whether tests pass or
fail, but did not exit with any different error code. We could change
the code to exit correctly, but using pytest is better because it allows
for skipping or selecting tests in a much simpler way, if necessary.
This commit is contained in:
Elliott Sales de Andrade 2018-08-13 18:59:59 -04:00
parent 62ef76011a
commit 4caedd0dda

View File

@ -196,7 +196,7 @@ pushd %{py3dir}
# skip-build currently broken, this works around it for now
%ifarch %{openblas_arches}
env OPENBLAS=%{_libdir} \
%else
%else
env ATLAS=%{_libdir} \
%endif
FFTW=%{_libdir} BLAS=%{_libdir} \
@ -235,13 +235,13 @@ ln -s %{python2_sitearch}/%{name}/core/include/numpy/ %{buildroot}/usr/include/n
%check
pushd doc &> /dev/null
PYTHONPATH="%{buildroot}%{python2_sitearch}" PYTHONDONTWRITEBYTECODE=1 \
%{__python2} -c "import pkg_resources, numpy ; numpy.test(verbose=2)"
%{__python2} -m pytest -v --pyargs numpy
popd &> /dev/null
%if 0%{?with_python3}
pushd doc &> /dev/null
PYTHONPATH="%{buildroot}%{python3_sitearch}" PYTHONDONTWRITEBYTECODE=1 \
%{__python3} -c "import pkg_resources, numpy ; numpy.test(verbose=2)"
%{__python3} -m pytest -v --pyargs numpy
popd &> /dev/null
%endif # with_python3
@ -315,6 +315,8 @@ popd &> /dev/null
%changelog
* Wed Aug 29 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1:1.15.1-2
- Switch to pytest for running tests during check
- Stop ignoring failures when running tests
- Update docs to match release
* Wed Aug 22 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1:1.15.1-1