Skip to content

Commit

Permalink
Add slow marker in run/skip option example.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
rillian committed Jun 6, 2019
1 parent 450d264 commit 9182687
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ Pulkit Goyal
Punyashloka Biswal
Quentin Pradet
Ralf Schmitt
Ralph Giles
Ran Benita
Raphael Castaneda
Raphael Pierzina
Expand Down
1 change: 1 addition & 0 deletions changelog/5416.doc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix PytestUnknownMarkWarning in run/skip example.
4 changes: 4 additions & 0 deletions doc/en/example/simple.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9182687

Please sign in to comment.