|
15 | 15 | import sys |
16 | 16 | import warnings |
17 | 17 | from builtins import object |
| 18 | +from functools import partial |
18 | 19 | from time import time |
19 | 20 |
|
20 | 21 | import numpy as np |
@@ -199,28 +200,44 @@ def _pass(function): |
199 | 200 | skip_if_no_benchmark = _pass |
200 | 201 | else: |
201 | 202 | # Used in lists where the elements should all be skipifs |
202 | | - never_skip = pytest.mark.skipif( |
203 | | - "False", |
204 | | - reason='Fill in, never skips' |
| 203 | + never_skip = partial( |
| 204 | + pytest.param, |
| 205 | + marks=pytest.mark.skipif( |
| 206 | + 'False', |
| 207 | + reason='', |
| 208 | + ) |
205 | 209 | ) |
206 | 210 |
|
207 | | - skip_if_no_pywavelets = pytest.mark.skipif( |
208 | | - "not odl.trafos.PYWT_AVAILABLE", |
209 | | - reason='PyWavelets not available' |
| 211 | + skip_if_no_pywavelets = partial( |
| 212 | + pytest.param, |
| 213 | + marks=pytest.mark.skipif( |
| 214 | + 'not odl.trafos.PYWT_AVAILABLE', |
| 215 | + reason='PyWavelets not available', |
| 216 | + ) |
210 | 217 | ) |
211 | 218 |
|
212 | | - skip_if_no_pyfftw = pytest.mark.skipif( |
213 | | - "not odl.trafos.PYFFTW_AVAILABLE", |
214 | | - reason='pyFFTW not available') |
| 219 | + skip_if_no_pyfftw = partial( |
| 220 | + pytest.param, |
| 221 | + marks=pytest.mark.skipif( |
| 222 | + 'not odl.trafos.PYFFTW_AVAILABLE', |
| 223 | + reason='pyFFTW not available', |
| 224 | + ) |
| 225 | + ) |
215 | 226 |
|
216 | | - skip_if_no_largescale = pytest.mark.skipif( |
217 | | - "not pytest.config.getoption('--largescale')", |
218 | | - reason='Need --largescale option to run' |
| 227 | + skip_if_no_largescale = partial( |
| 228 | + pytest.param, |
| 229 | + marks=pytest.mark.skipif( |
| 230 | + "not pytest.config.getoption('--largescale')", |
| 231 | + reason='Need --largescale option to run', |
| 232 | + ) |
219 | 233 | ) |
220 | 234 |
|
221 | | - skip_if_no_benchmark = pytest.mark.skipif( |
222 | | - "not pytest.config.getoption('--benchmark')", |
223 | | - reason='Need --benchmark option to run' |
| 235 | + skip_if_no_benchmark = partial( |
| 236 | + pytest.param, |
| 237 | + marks=pytest.mark.skipif( |
| 238 | + "not pytest.config.getoption('--benchmark')", |
| 239 | + reason='Need --benchmark option to run', |
| 240 | + ) |
224 | 241 | ) |
225 | 242 |
|
226 | 243 |
|
|
0 commit comments