2009-03-02 19:14:59 +08:00
|
|
|
Test configuration
|
|
|
|
========================
|
|
|
|
|
2009-03-06 07:17:30 +08:00
|
|
|
using / specifying plugins
|
|
|
|
-------------------------------
|
2009-03-02 19:22:11 +08:00
|
|
|
|
|
|
|
you can instruct py.test to use additional plugins by:
|
|
|
|
|
|
|
|
* setting the PYTEST_PLUGINS environment variable
|
|
|
|
to a comma-separated list of plugins
|
|
|
|
* XXX supplying "--plugins=NAME1,NAME2,..." at the command line
|
|
|
|
* setting "pytest_plugins='name1', 'name2'" in
|
|
|
|
``conftest.py`` files or in python test modules.
|
|
|
|
|
|
|
|
py.test will load all plugins along with their dependencies
|
|
|
|
(plugins may specify "pytest_plugins" as well).
|
|
|
|
|
2009-03-02 19:14:59 +08:00
|
|
|
test option values
|
|
|
|
-----------------------------
|
|
|
|
|
|
|
|
py.test will lookup the value of an option "NAME" in this order:
|
|
|
|
|
|
|
|
* option value supplied at command line
|
|
|
|
* content of environment variable ``PYTEST_OPTION_NAME=...``
|
|
|
|
* ``name = ...`` setting in the nearest ``conftest.py`` file.
|
|
|
|
|
|
|
|
This means that you can specify default options per-run,
|
|
|
|
per shell session or per project directory.
|