The README documents two configuration styles:
[tool.pytest_env] for pyproject.toml
[pytest_env] for pytest.toml / .pytest.toml
However, pytest.toml and .pytest.toml can also contain pytest configuration directly under the [pytest] table, and pytest-env options can be configured there, for example:
[pytest]
env = [
"HOME=~/tmp",
"RUN_ENV=test",
]
The current INI configuration format section shows the equivalent configuration for pytest.ini and pyproject.toml, but does not show or mention the pytest.toml / .pytest.toml form.
It would be useful to document this explicitly, so users do not get the impression that pytest.toml must use the plugin-specific [pytest_env] table.
For example, the INI-style section could include:
# pytest.toml / .pytest.toml
[pytest]
env = [
"HOME=~/tmp",
"RUN_ENV=test",
]
This would also clarify the distinction between the plugin-specific [pytest_env] TOML format and pytest-native configuration passed through [pytest].
The README documents two configuration styles:
[tool.pytest_env]forpyproject.toml[pytest_env]forpytest.toml/.pytest.tomlHowever,
pytest.tomland.pytest.tomlcan also contain pytest configuration directly under the[pytest]table, andpytest-envoptions can be configured there, for example:The current INI configuration format section shows the equivalent configuration for
pytest.iniandpyproject.toml, but does not show or mention thepytest.toml/.pytest.tomlform.It would be useful to document this explicitly, so users do not get the impression that
pytest.tomlmust use the plugin-specific[pytest_env]table.For example, the INI-style section could include:
This would also clarify the distinction between the plugin-specific
[pytest_env]TOML format and pytest-native configuration passed through[pytest].