Skip to content

Commit 7a16cf3

Browse files
committed
MNT: Separate out pytest and nose jobs
1 parent c3c7c32 commit 7a16cf3

File tree

3 files changed

+23
-9
lines changed

3 files changed

+23
-9
lines changed

.azure-pipelines/windows.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,21 @@ jobs:
2929
displayName: 'Update build tools'
3030
- script: |
3131
python -m pip install --find-links %EXTRA_WHEELS% %DEPENDS%
32-
python -m pip install nose mock coverage codecov pytest
32+
python -m pip install nose coverage codecov pytest
3333
displayName: 'Install dependencies'
3434
- script: |
35-
python -m pip install .
35+
python -m pip install '.[$(CHECK_TYPE)]'
3636
SET NIBABEL_DATA_DIR=%CD%\\nibabel-data
3737
displayName: 'Install nibabel'
3838
- script: |
3939
mkdir for_testing
4040
cd for_testing
4141
cp ../.coveragerc .
42-
nosetests --with-doctest --with-coverage --cover-package nibabel nibabel
42+
if %CHECK_TYPE%=="nosetests" (
43+
nosetests --with-doctest --with-coverage --cover-package nibabel nibabel
44+
) else (
45+
pytest --doctest-modules --cov nibabel -v --pyargs nibabel --deselect streamlines
46+
)
4347
displayName: 'Nose tests'
4448
- script: |
4549
cd for_testing

.travis.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ python:
2828

2929
matrix:
3030
include:
31+
# Old nosetests - Remove soon
32+
- python: 3.7
33+
env:
34+
- CHECK_TYPE="nosetests"
3135
# Basic dependencies only
3236
- python: 3.5
3337
env:
@@ -124,13 +128,18 @@ script:
124128
cd doc
125129
make html;
126130
make doctest;
127-
elif [ "${CHECK_TYPE}" == "test" ]; then
131+
elif [ "${CHECK_TYPE}" == "nosetests" ]; then
128132
# Change into an innocuous directory and find tests from installation
129133
mkdir for_testing
130134
cd for_testing
131135
cp ../.coveragerc .
132136
nosetests --with-doctest --with-coverage --cover-package nibabel nibabel
133-
pytest -v ../nibabel/tests
137+
elif [ "${CHECK_TYPE}" == "test" ]; then
138+
# Change into an innocuous directory and find tests from installation
139+
mkdir for_testing
140+
cd for_testing
141+
cp ../.coveragerc .
142+
pytest --doctest-modules --cov nibabel -v --pyargs nibabel --deselect streamlines
134143
else
135144
false
136145
fi

setup.cfg

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ python_requires = >=3.5.1
3232
install_requires =
3333
numpy >=1.12
3434
packaging
35-
tests_require =
36-
nose >=0.11
37-
pytest
38-
test_suite = nose.collector
3935
zip_safe = False
4036
packages = find:
4137

@@ -54,10 +50,15 @@ minc2 =
5450
h5py
5551
style =
5652
flake8
53+
nosetests =
54+
coverage
55+
nose >=0.11
56+
pytest
5757
test =
5858
coverage
5959
nose >=0.11
6060
pytest
61+
pytest-cov
6162
all =
6263
%(dicom)s
6364
%(dev)s

0 commit comments

Comments
 (0)