Add `slow` marker in run/skip option example. (#5416)

Add `slow` marker in run/skip option example.
This commit is contained in:
Bruno Oliveira 2019-06-06 15:00:04 -03:00 committed by GitHub
commit 042a10f2e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 0 deletions

View File

@ -200,6 +200,7 @@ Pulkit Goyal
Punyashloka Biswal
Quentin Pradet
Ralf Schmitt
Ralph Giles
Ran Benita
Raphael Castaneda
Raphael Pierzina

1
changelog/5416.doc.rst Normal file
View File

@ -0,0 +1 @@
Fix PytestUnknownMarkWarning in run/skip example.

View File

@ -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