Skip to content

Commit 7acde5a

Browse files
committed
MNT: Add pytest-doctestplus to ignore warnings in doctests
1 parent c7fad2e commit 7acde5a

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ script:
147147
mkdir for_testing
148148
cd for_testing
149149
cp ../.coveragerc .
150-
pytest --doctest-modules --cov nibabel -v --pyargs nibabel
150+
pytest --doctest-modules --doctest-plus --cov nibabel -v --pyargs nibabel
151151
else
152152
false
153153
fi

nibabel/cifti2/cifti2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1492,7 +1492,7 @@ def update_headers(self):
14921492
14931493
>>> import numpy as np
14941494
>>> data = np.zeros((2,3,4))
1495-
>>> img = Cifti2Image(data)
1495+
>>> img = Cifti2Image(data) # doctest: +IGNORE_WARNINGS
14961496
>>> img.shape == (2, 3, 4)
14971497
True
14981498
>>> img.update_headers()

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ test =
5858
coverage
5959
pytest !=5.3.4
6060
pytest-cov
61+
pytest-doctestplus
6162
all =
6263
%(dicomfs)s
6364
%(dev)s

0 commit comments

Comments
 (0)