Moved more detailed options on how to disable a plugin to plugins.rst
This commit is contained in:
parent
b09d3724a0
commit
6caa7083db
|
@ -10,15 +10,6 @@ cache: working with cross-testrun state
|
|||
is compatible regarding command line options and API usage except that you
|
||||
can only store/receive data between test runs that is json-serializable.
|
||||
|
||||
If for any reason you want to disable this plugin, you can do so by
|
||||
adding ``-p no:cacheprovider`` to the command-line, or more permanently
|
||||
to your ``pytest.ini`` file:
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
[pytest]
|
||||
addopts = -p no:cacheprovider
|
||||
|
||||
|
||||
Usage
|
||||
---------
|
||||
|
@ -36,6 +27,12 @@ all cross-session cache contents ahead of a test run.
|
|||
Other plugins may access the `config.cache`_ object to set/get
|
||||
**json encodable** values between ``py.test`` invocations.
|
||||
|
||||
.. note::
|
||||
|
||||
This plugin is enabled by default, but can be disabled if needed: see
|
||||
:ref:`cmdunregister` (the internal name for this plugin is
|
||||
``cacheprovider``).
|
||||
|
||||
|
||||
Rerunning only failures or failures first
|
||||
-----------------------------------------------
|
||||
|
|
|
@ -108,8 +108,21 @@ You can prevent plugins from loading or unregister them::
|
|||
py.test -p no:NAME
|
||||
|
||||
This means that any subsequent try to activate/load the named
|
||||
plugin will it already existing. See :ref:`findpluginname` for
|
||||
how to obtain the name of a plugin.
|
||||
plugin will not work.
|
||||
|
||||
If you want to unconditionally disable a plugin for a project, you can add
|
||||
this option to your ``pytest.ini`` file:
|
||||
|
||||
.. code-block:: ini
|
||||
|
||||
[pytest]
|
||||
addopts = -p no:NAME
|
||||
|
||||
Alternatively to disable it only in certain environments (for example in a
|
||||
CI server), you can set ``PYTEST_ADDOPTS`` environment variable to
|
||||
``-p no:name``.
|
||||
|
||||
See :ref:`findpluginname` for how to obtain the name of a plugin.
|
||||
|
||||
.. _`builtin plugins`:
|
||||
|
||||
|
@ -123,6 +136,7 @@ in the `pytest repository <https://github.com/pytest-dev/pytest>`_.
|
|||
.. autosummary::
|
||||
|
||||
_pytest.assertion
|
||||
_pytest.cacheprovider
|
||||
_pytest.capture
|
||||
_pytest.config
|
||||
_pytest.doctest
|
||||
|
|
Loading…
Reference in New Issue