File tree 3 files changed +17
-2
lines changed
3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ jobs:
114
114
mkdir for_testing
115
115
cd for_testing
116
116
cp ../.coveragerc .
117
- pytest --cov nibabel -v --pyargs nibabel
117
+ pytest --doctest-modules -- cov nibabel -v --pyargs nibabel
118
118
displayName: 'Pytest tests'
119
119
condition: and(succeeded(), eq(variables['CHECK_TYPE'], 'test'))
120
120
- script : |
Original file line number Diff line number Diff line change @@ -206,7 +206,7 @@ script:
206
206
mkdir for_testing
207
207
cd for_testing
208
208
cp ../.coveragerc .
209
- pytest --cov nibabel -v --pyargs nibabel
209
+ pytest --doctest-modules -- cov nibabel -v --pyargs nibabel
210
210
else
211
211
false
212
212
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