Commit 2a1e48f
don012rac3
gh-157006: Clear PYTHONSTARTUP and other PYTHON* env vars in test_embed
run_embedded_interpreter() now defaults to remove_python_envvars()
when no explicit env is provided, preventing PYTHONSTARTUP (e.g.,
set by VS Code shell integration) from leaking into the embedded
interpreter and causing test failures.
Also fix test_init_run_main_startup_exitcode to use
remove_python_envvars() instead of dict(os.environ) as the base
environment.1 parent 7a91841 commit 2a1e48f
2 files changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
| 141 | + | |
140 | 142 | | |
141 | 143 | | |
142 | 144 | | |
| |||
628 | 630 | | |
629 | 631 | | |
630 | 632 | | |
631 | | - | |
| 633 | + | |
632 | 634 | | |
633 | 635 | | |
634 | 636 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
0 commit comments