added docs about the `no:` syntax for the -p option
--HG-- branch : no-p-option
This commit is contained in:
parent
492c60c202
commit
d92ee8c3c3
|
@ -12,7 +12,9 @@ def pytest_addoption(parser):
|
|||
help="show help message and configuration info")
|
||||
group._addoption('-p', action="append", dest="plugins", default = [],
|
||||
metavar="name",
|
||||
help="early-load given plugin (multi-allowed).")
|
||||
help="early-load given plugin (multi-allowed). "
|
||||
"To avoid loading of plugins, use the `no:` prefix, e.g. "
|
||||
"`no:doctest`.")
|
||||
group.addoption('--traceconfig', '--trace-config',
|
||||
action="store_true", default=False,
|
||||
help="trace considerations of conftest.py files."),
|
||||
|
|
|
@ -153,6 +153,17 @@ for example ``-x`` if you only want to send one particular failure.
|
|||
|
||||
Currently only pasting to the http://bpaste.net service is implemented.
|
||||
|
||||
Disabling plugins
|
||||
-----------------
|
||||
|
||||
To disable loading specific plugins at invocation time, use the ``-p`` option
|
||||
together with the prefix ``no:``.
|
||||
|
||||
Example: to disable loading the plugin ``doctest``, which is responsible for
|
||||
executing doctest tests from text files, invoke py.test like this::
|
||||
|
||||
py.test -p no:doctest
|
||||
|
||||
.. _`pytest.main-usage`:
|
||||
|
||||
Calling pytest from Python code
|
||||
|
|
Loading…
Reference in New Issue