Merge pull request #2552 from nicoddemus/strict-help-message
Change --strict help message to clarify it deals with unregistered markers
This commit is contained in:
commit
db24a3b0fb
|
@ -45,7 +45,7 @@ def pytest_addoption(parser):
|
|||
action="store", type=int, dest="maxfail", default=0,
|
||||
help="exit after first num failures or errors.")
|
||||
group._addoption('--strict', action="store_true",
|
||||
help="run pytest in strict mode, warnings become errors.")
|
||||
help="marks not registered in configuration file raise errors.")
|
||||
group._addoption("-c", metavar="file", type=str, dest="inifilename",
|
||||
help="load configuration from `file` instead of trying to locate one of the implicit configuration files.")
|
||||
group._addoption("--continue-on-collection-errors", action="store_true",
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Update help message for ``--strict`` to make it clear it only deals with unregistered markers, not warnings.
|
|
@ -223,13 +223,12 @@ For an example on how to add and work with markers from a plugin, see
|
|||
|
||||
It is recommended to explicitly register markers so that:
|
||||
|
||||
* there is one place in your test suite defining your markers
|
||||
* There is one place in your test suite defining your markers
|
||||
|
||||
* asking for existing markers via ``pytest --markers`` gives good output
|
||||
* Asking for existing markers via ``pytest --markers`` gives good output
|
||||
|
||||
* typos in function markers are treated as an error if you use
|
||||
the ``--strict`` option. Future versions of ``pytest`` are probably
|
||||
going to start treating non-registered markers as errors at some point.
|
||||
* Typos in function markers are treated as an error if you use
|
||||
the ``--strict`` option.
|
||||
|
||||
.. _`scoped-marking`:
|
||||
|
||||
|
|
|
@ -576,7 +576,7 @@ class TestSkip(object):
|
|||
def test_hello():
|
||||
pass
|
||||
""")
|
||||
result = testdir.runpytest("-rs --strict")
|
||||
result = testdir.runpytest("-rs")
|
||||
result.stdout.fnmatch_lines([
|
||||
"*unconditional skip*",
|
||||
"*1 skipped*",
|
||||
|
|
Loading…
Reference in New Issue