File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change 5
5
import pytest
6
6
7
7
SKIP = True
8
+ REASON = "Required packages not available"
8
9
9
10
try :
10
11
import jupyter_client
34
35
asyncio .set_event_loop_policy (WindowsSelectorEventLoopPolicy ())
35
36
36
37
except ImportError : # pragma: no cover
37
- pytestmark = pytest .mark .skip (reason = "Required packages not available" )
38
+ pytestmark = pytest .mark .skip (reason = REASON )
38
39
39
40
SLOW_NOTEBOOKS = ["multiple-comparison_examples.ipynb" ]
40
41
if bool (os .environ .get ("ARCH_TEST_SLOW_NOTEBOOKS" , False )): # pragma: no cover
47
48
nbs = sorted (glob .glob (os .path .join (NOTEBOOK_DIR , "*.ipynb" )))
48
49
ids = [os .path .split (nb )[- 1 ].split ("." )[0 ] for nb in nbs ]
49
50
if not nbs : # pragma: no cover
50
- pytest .mark .skip (reason = "No notebooks found and so no tests run" )
51
-
52
-
53
- @pytest .fixture (params = nbs , ids = ids )
54
- def notebook (request ):
55
- return request .param
51
+ REASON = "No notebooks found and so no tests run"
52
+ pytestmark = pytest .mark .skip (reason = REASON )
56
53
57
54
58
55
@pytest .mark .slow
59
- @pytest .mark .skipif (SKIP , reason = "Required packages not available" )
56
+ @pytest .mark .parametrize ("notebook" , nbs , ids = ids )
57
+ @pytest .mark .skipif (SKIP , reason = REASON )
60
58
def test_notebook (notebook ):
61
59
nb_name = os .path .split (notebook )[- 1 ]
62
60
if nb_name in SLOW_NOTEBOOKS :
You can’t perform that action at this time.
0 commit comments