File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ jobs:
114114 mkdir for_testing
115115 cd for_testing
116116 cp ../.coveragerc .
117- pytest --cov nibabel -v --pyargs nibabel
117+ pytest --doctest-modules -- cov nibabel -v --pyargs nibabel
118118 displayName: 'Pytest tests'
119119 condition: and(succeeded(), eq(variables['CHECK_TYPE'], 'test'))
120120 - script : |
Original file line number Diff line number Diff line change @@ -206,7 +206,7 @@ script:
206206 mkdir for_testing
207207 cd for_testing
208208 cp ../.coveragerc .
209- pytest --cov nibabel -v --pyargs nibabel
209+ pytest --doctest-modules -- cov nibabel -v --pyargs nibabel
210210 else
211211 false
212212 fi
Original file line number Diff line number Diff line change 1+ import pytest
2+
3+
4+ @pytest .fixture (autouse = True , scope = "session" )
5+ def set_printopts ():
6+ import numpy as np
7+ from distutils .version import LooseVersion
8+
9+ if LooseVersion (np .__version__ ) >= LooseVersion ("1.14" ):
10+ legacy_printopt = np .get_printoptions ().get ("legacy" )
11+ np .set_printoptions (legacy = "1.13" )
12+ yield
13+ np .set_printoptions (legacy = legacy_printopt )
14+ else :
15+ yield
You can’t perform that action at this time.
0 commit comments