Commit ae825a65 authored by Mark Hymers's avatar Mark Hymers

Move from nosetests to py.test

Signed-off-by: Mark Hymers's avatarMark Hymers <mark.hymers@ynic.york.ac.uk>
parent 81b32106
Pipeline #25036 failed with stages
......@@ -21,7 +21,7 @@ build_test:
- ls
- cd build
- ls
- PYTHONPATH=../python-megdata/build/lib.linux-x86_64-2.7:lib.linux-x86_64-2.7 NAFTEST=../naf-testdata xvfb-run -a nosetests -c ../nose.cfg -v lib.linux-x86_64-2.7/naf
- PYTHONPATH=../python-megdata/build/lib.linux-x86_64-2.7:lib.linux-x86_64-2.7 NAFTEST=../naf-testdata xvfb-run -a py.test -c ../setup.cfg -v lib.linux-x86_64-2.7/naf
artifacts:
paths:
- build
......
......@@ -50,22 +50,22 @@ clean:
rm -f $(PY5UICFILES)
test: all
cd build && PYTHONPATH=lib.$(PYTHONARCH)/:$${PYTHONPATH} NAFTEST=../../naf-testdata nosetests -c ../nose.cfg lib.$(PYTHONARCH)/naf
cd build && PYTHONPATH=lib.$(PYTHONARCH)/:$${PYTHONPATH} NAFTEST=../../naf-testdata py.test -c ../setup.cfg lib.$(PYTHONARCH)/naf
testv: all
cd build && PYTHONPATH=lib.$(PYTHONARCH)/:$${PYTHONPATH} NAFTEST=../../naf-testdata nosetests -c ../nose.cfg -v lib.$(PYTHONARCH)/naf
cd build && PYTHONPATH=lib.$(PYTHONARCH)/:$${PYTHONPATH} NAFTEST=../../naf-testdata py.test -c ../setup.cfg -v lib.$(PYTHONARCH)/naf
testbin: all
cd build && NAFBIN=../bin PYTHONPATH=lib.$(PYTHONARCH)/:$${PYTHONPATH} NAFTEST=../../naf-testdata nosetests -c ../nose.cfg ../bin/test -s
cd build && NAFBIN=../bin PYTHONPATH=lib.$(PYTHONARCH)/:$${PYTHONPATH} NAFTEST=../../naf-testdata py.test -c ../setup.cfg ../bin/test -s
testbinv: all
cd build && NAFBIN=../bin PYTHONPATH=lib.$(PYTHONARCH)/:$${PYTHONPATH} NAFTEST=../../naf-testdata nosetests -v -c ../nose.cfg ../bin/test -s
cd build && NAFBIN=../bin PYTHONPATH=lib.$(PYTHONARCH)/:$${PYTHONPATH} NAFTEST=../../naf-testdata py.test -v -c ../setup.cfg ../bin/test -s
testall: all
cd build && NAFBIN=../bin PYTHONPATH=lib.$(PYTHONARCH)/:$${PYTHONPATH} NAFTEST=../../naf-testdata nosetests -c ../nose.cfg ../bin/test lib.$(PYTHONARCH)/naf -s
cd build && NAFBIN=../bin PYTHONPATH=lib.$(PYTHONARCH)/:$${PYTHONPATH} NAFTEST=../../naf-testdata py.test -c ../setup.cfg ../bin/test lib.$(PYTHONARCH)/naf -s
testallv: all
cd build && NAFBIN=../bin PYTHONPATH=lib.$(PYTHONARCH)/:$${PYTHONPATH} NAFTEST=../../naf-testdata nosetests -v -c ../nose.cfg ../bin/test lib.$(PYTHONARCH)/naf -s
cd build && NAFBIN=../bin PYTHONPATH=lib.$(PYTHONARCH)/:$${PYTHONPATH} NAFTEST=../../naf-testdata py.test -v -c ../setup.cfg ../bin/test lib.$(PYTHONARCH)/naf -s
install:
python setup.py install --prefix=$(DESTDIR)/usr
......
......@@ -31,14 +31,12 @@ release onwards). Package names are Debian binary package names.
fftw-dev >= 2.1.5
python-statsmodels >= 0.8
python-sphinx >= 1.2.3 (for building documentation and reports)
python-nose >= 1.3.4 (for running the test suite)
python-vtk >= 5.6
python-bibtex >= 1.2.4
libgsl0-dev >= 1.14
fftw-dev >= 2.1.3
python-sphinx >= 1.0.7
python-nose >= 0.11 (for running the test suite)
python-coverage (for getting test coverage)
python-pytest and python.pytest.cov (for running the test suite)
xvfb (if building on a machine without an X display set)
For use in MPI mode, you will also need:
......@@ -64,8 +62,8 @@ apt-get install python-numpy python-scipy python-matplotlib python-h5py \
python-imaging python-dicom python-nifti python-sklearn \
python-wxgtk3.0 python-yaml python-mpi4py python-pyqt5 \
python-pyqt5.qtopengl pyqt5-dev-tools python-vtk python-bibtex \
python-sphinx libgsl0-dev fftw-dev python-nose python-coverage \
python-statsmodels
python-sphinx libgsl0-dev fftw-dev python-coverage \
python-statsmodels python-pytest python-pytest.cov
You will also need build-essential and the relevant python development packages
installed. A safe way to ensure you have it all is:
......
......@@ -3,7 +3,7 @@ Section: science
Priority: extra
Maintainer: Mark Hymers <mark.hymers@ynic.york.ac.uk>
Build-Depends: debhelper (>= 7), fftw-dev, openmpi-bin, libopenmpi-dev, libgsl0-dev, xvfb,
python-coverage, python-nose, python-sphinx, python-bibtex,
python-coverage, python-pytest, python-pytest.cov, python-sphinx, python-bibtex,
python-h5py, python-numpy, python-scipy, python-matplotlib,
python-nifti, python-yaml, python-mpi4py, python-sklearn, python-imaging,
pyqt5-dev-tools, python-pyqt5, python-pyqt5.qtopengl, python-vtk6,
......
[nosetests]
with-coverage=1
cover-package=debian
cover-inclusive=true
cover-package=naf.abstract,naf.store,naf.extern,naf.maths,naf.meg,naf.register,naf.utils,naf.ynic
cover-erase=true
[flake8]
max-line-length=120
exclude=*.md,*.yaml,setup.cfg,build/,docgen/
extend-ignore=E741
[build_sphinx]
source-dir = doc
build-dir = docgen
[tool:pytest]
addopts = --cov naf --cov-report=term-missing
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment