Fix rendering of the ini example for python_files

Also added an example using one pattern per line
This commit is contained in:
Bruno Oliveira 2018-09-14 17:20:22 -03:00
parent 49800ea134
commit 130cf7e0db
1 changed files with 13 additions and 3 deletions

View File

@ -1256,15 +1256,25 @@ passed multiple times. The expected format is ``name=value``. For example::
One or more Glob-style file patterns determining which python files One or more Glob-style file patterns determining which python files
are considered as test modules. Search for multiple glob patterns by are considered as test modules. Search for multiple glob patterns by
adding a space between patterns:: adding a space between patterns:
.. code-block:: ini .. code-block:: ini
[pytest] [pytest]
python_files = test_*.py check_*.py example_*.py python_files = test_*.py check_*.py example_*.py
By default, pytest will consider any file matching with ``test_*.py`` Or one per line:
and ``*_test.py`` globs as a test module.
.. code-block:: ini
[pytest]
python_files =
test_*.py
check_*.py
example_*.py
By default, files matching ``test_*.py`` and ``*_test.py`` will be considered
test modules.
.. confval:: python_functions .. confval:: python_functions