File tree Expand file tree Collapse file tree 1 file changed +9
-14
lines changed Expand file tree Collapse file tree 1 file changed +9
-14
lines changed Original file line number Diff line number Diff line change @@ -132,27 +132,22 @@ def pytest_collection_modifyitems(config, items):
132
132
)
133
133
item .add_marker (marker )
134
134
135
- # numpy changed the str/repr formatting of numpy arrays in 1.14. We want to
136
- # run doctests only for numpy >= 1.14.
137
135
skip_doctests = False
138
136
try :
139
137
import matplotlib # noqa
140
138
except ImportError :
141
139
skip_doctests = True
142
140
reason = "matplotlib is required to run the doctests"
143
141
144
- try :
145
- if _IS_32BIT :
146
- reason = "doctest are only run when the default numpy int is 64 bits."
147
- skip_doctests = True
148
- elif sys .platform .startswith ("win32" ):
149
- reason = (
150
- "doctests are not run for Windows because numpy arrays "
151
- "repr is inconsistent across platforms."
152
- )
153
- skip_doctests = True
154
- except ImportError :
155
- pass
142
+ if _IS_32BIT :
143
+ reason = "doctest are only run when the default numpy int is 64 bits."
144
+ skip_doctests = True
145
+ elif sys .platform .startswith ("win32" ):
146
+ reason = (
147
+ "doctests are not run for Windows because numpy arrays "
148
+ "repr is inconsistent across platforms."
149
+ )
150
+ skip_doctests = True
156
151
157
152
# Normally doctest has the entire module's scope. Here we set globs to an empty dict
158
153
# to remove the module's scope:
You can’t perform that action at this time.
0 commit comments