diff options
author | Bruno Oliveira <nicoddemus@gmail.com> | 2016-08-16 21:30:07 -0300 |
---|---|---|
committer | Bruno Oliveira <nicoddemus@gmail.com> | 2016-08-17 08:19:38 -0300 |
commit | ab86dea5294a25531e1cf207bed09fc4e8c2284b (patch) | |
tree | db367dc23ce0cefaa2d0334581c83e300fa7601e /doc/en/goodpractices.rst | |
parent | d3b855104c1f6788f0b47a8ad65dcffc131a19b7 (diff) | |
download | pytest-ab86dea5294a25531e1cf207bed09fc4e8c2284b.tar.gz |
Support [tool:pytest] in setup.cfg files
Also deprecate [pytest] usage in setup.cfg files
Fix #567
Diffstat (limited to 'doc/en/goodpractices.rst')
-rw-r--r-- | doc/en/goodpractices.rst | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/en/goodpractices.rst b/doc/en/goodpractices.rst index e1c4b0b5c..7c2fdccf2 100644 --- a/doc/en/goodpractices.rst +++ b/doc/en/goodpractices.rst @@ -196,6 +196,24 @@ required for calling the test command. You can also pass additional arguments to pytest such as your test directory or other options using ``--addopts``. +You can also specify other pytest-ini options in your ``setup.cfg`` file +by putting them into a ``[tool:pytest]`` section: + +.. code-block:: ini + + [tool:pytest] + addopts = --verbose + python_files = testing/*/*.py + + +.. note:: + Prior to 3.0, the supported section name was ``[pytest]``. Due to how + this may collide with some distutils commands, the recommended + section name for ``setup.cfg`` files is now ``[tool:pytest]``. + + Note that for ``pytest.ini`` and ``tox.ini`` files the section + name is ``[pytest]``. + Manual Integration ^^^^^^^^^^^^^^^^^^ |