10000 remove pytest --skipslow; use pytest -m "not slow" instead · ControlCorp/python-control@039b22d · GitHub
[go: up one dir, main page]

Skip to content

Commit 039b22d

Browse files
committed
remove pytest --skipslow; use pytest -m "not slow" instead
1 parent df4508c commit 039b22d

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

control/tests/conftest.py

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff 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")
136125
def 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)

0 commit comments

Comments
 (0)
< 29CB /div>
0