File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55import pytest
66
77SKIP = True
8+ REASON = "Required packages not available"
89
910try :
1011 import jupyter_client
3435 asyncio .set_event_loop_policy (WindowsSelectorEventLoopPolicy ())
3536
3637except ImportError : # pragma: no cover
37- pytestmark = pytest .mark .skip (reason = "Required packages not available" )
38+ pytestmark = pytest .mark .skip (reason = REASON )
3839
3940SLOW_NOTEBOOKS = ["multiple-comparison_examples.ipynb" ]
4041if bool (os .environ .get ("ARCH_TEST_SLOW_NOTEBOOKS" , False )): # pragma: no cover
4748nbs = sorted (glob .glob (os .path .join (NOTEBOOK_DIR , "*.ipynb" )))
4849ids = [os .path .split (nb )[- 1 ].split ("." )[0 ] for nb in nbs ]
4950if 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 )
5653
5754
5855@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 )
6058def test_notebook (notebook ):
6159 nb_name = os .path .split (notebook )[- 1 ]
6260 if nb_name in SLOW_NOTEBOOKS :
You can’t perform that action at this time.
0 commit comments