pytest
The pytest Python test framework (https://docs.pytest.org/).
Backend: ``
Config section: [pytest]
Basic options
args
--pytest-args="[<shell_str>, <shell_str>, ...]", ... -- [<shell_str> [<shell_str> [...]]]
PANTS_PYTEST_ARGS
[pytest]
args = [
<shell_str>,
<shell_str>,
...,
]
[]
Arguments to pass directly to Pytest, e.g. --pytest-args="-k test_foo --quiet"
timeouts
--[no-]pytest-timeouts
PANTS_PYTEST_TIMEOUTS
[pytest]
timeouts = <bool>
True
Enable test target timeouts. If timeouts are enabled then test targets with a timeout= parameter set on their target will time out after the given number of seconds if not completed. If no timeout is set, then either the default timeout is used or no timeout is configured.
Advanced options
config_discovery
--[no-]pytest-config-discovery
PANTS_PYTEST_CONFIG_DISCOVERY
[pytest]
config_discovery = <bool>
True
If true, Pants will include all relevant Pytest config files (e.g. pytest.ini
) during runs. See https://docs.pytest.org/en/stable/customize.html#finding-the-rootdir for where config files should be located for Pytest to discover them.
console_script
--pytest-console-script=<str>
PANTS_PYTEST_CONSOLE_SCRIPT
[pytest]
console_script = <str>
pytest
The console script for the tool. Using this option is generally preferable to (and mutually exclusive with) specifying an --entry-point since console script names have a higher expectation of staying stable across releases of the tool. Usually, you will not want to change this from the default.
entry_point
--pytest-entry-point=<str>
PANTS_PYTEST_ENTRY_POINT
[pytest]
entry_point = <str>
None
The entry point for the tool. Generally you only want to use this option if the tool does not offer a --console-script (which this option is mutually exclusive with). Usually, you will not want to change this from the default.