You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[pytest_env] in a custom-named TOML file passed with -c is ignored #326
pytest -c ci.toml reads pytest's own settings from ci.toml, and pytest-env ignores the [pytest_env] table in the same file. It applies the table of a sibling or parent pyproject.toml, pytest.toml or .pytest.toml instead, or nothing when there is none. The run passes.
Affected code
plugin.py#L81-L87: _find_toml_config accepts the selected file only under three names.
pytest loads a TOML file with any name when it is passed with -c, and reads [pytest] from it like it does for pytest.toml. _find_toml_configaccepts inipath only when it is named pytest.toml, .pytest.toml or pyproject.toml. For any other name it walks the directory and its parents for those three names, so the selected file is not opened. env_files and env_files_skip_if_set in the ignored table have no effect either, because they come from the same lookup.
Activity