File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -121,25 +121,6 @@ def mplcleanup():
121121 mpl .pyplot .close ("all" )
122122
123123
124- #
125- # Functionality to skip slow tests using --skipslow
126- #
127- # See https://docs.pytest.org/en/latest/example/simple.html
128- # #control-skipping-of-tests-according-to-command-line-option
129- #
130- def pytest_addoption (parser ):
131- parser .addoption (
132- "--skipslow" , action = "store_true" , default = False ,
133- help = "skip slow tests" )
134-
135-
124+ # Allow pytest.mark.slow to mark slow tests (skip with pytest -m "not slow")
136125def pytest_configure (config ):
137126 config .addinivalue_line ("markers" , "slow: mark test as slow to run" )
138-
139-
140- def pytest_collection_modifyitems (config , items ):
141- if config .getoption ("--skipslow" ):
142- skip_slow = pytest .mark .skip (reason = "skipping slow tests" )
143- for item in items :
144- if "slow" in item .keywords :
145- item .add_marker (skip_slow )
You can’t perform that action at this time.
0 commit comments