Add slow marker in run/skip option example.
The example implementation of a `--runslow` option results in a `PytestUnknownMarkWarning`. Include registering the custom mark in the example, based on the documentation in markers.rst.
This commit is contained in:
@@ -157,6 +157,10 @@ line option to control skipping of ``pytest.mark.slow`` marked tests:
|
||||
)
|
||||
|
||||
|
||||
def pytest_configure(config):
|
||||
config.addinivalue_line("markers", "slow: mark test as slow to run")
|
||||
|
||||
|
||||
def pytest_collection_modifyitems(config, items):
|
||||
if config.getoption("--runslow"):
|
||||
# --runslow given in cli: do not skip slow tests
|
||||
|
||||
Reference in New Issue
Block a user