Skip to content

✨ feat(env): preserve existing env values#213

Merged
gaborbernat merged 1 commit intopytest-dev:mainfrom
gaborbernat:new-feat
Mar 12, 2026
Merged

✨ feat(env): preserve existing env values#213
gaborbernat merged 1 commit intopytest-dev:mainfrom
gaborbernat:new-feat

Conversation

@gaborbernat
Copy link
Collaborator

@gaborbernat gaborbernat commented Mar 12, 2026

Teams need .env files to provide defaults without clobbering CI or ad-hoc overrides. The current behavior overwrites even when values are already set, including --envfile, which makes injected configuration unreliable.

Add env_files_skip_if_set for TOML/INI and apply it to CLI env files with SKIP reporting and tests. Refresh tox and build tool versions to match current formatting output and keep the dev/type tooling aligned.

Teams need .env files to provide defaults without clobbering CI or ad-hoc overrides. The
current behavior overwrites even when values are already set, including --envfile, which
makes injected configuration unreliable.

Add env_files_skip_if_set for TOML/INI and apply it to CLI env files with SKIP reporting
and tests. Refresh tox and build tool versions to match current formatting output and
keep the dev/type tooling aligned.
@gaborbernat gaborbernat merged commit 8bd22d1 into pytest-dev:main Mar 12, 2026
9 checks passed
@gaborbernat gaborbernat deleted the new-feat branch March 12, 2026 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant