Skip to content

Commit f20bcf0

Browse files
[3.13] gh-150046: Fix test_add_python_opts to ignore PYTHON* env vars (GH-150089) (#150563)
gh-150046: Fix `test_add_python_opts` to ignore `PYTHON*` env vars (GH-150089) Avoid the runtime environment from affecting the tests' behaviours, which notably checks the warning filters which can be controlled by various PYTHON environment variables. (cherry picked from commit ef2246f) Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
1 parent 8603881 commit f20bcf0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Lib/test/test_regrtest.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2275,7 +2275,8 @@ def test_python_opts(self):
22752275
proc = subprocess.run(cmd,
22762276
stdout=subprocess.PIPE,
22772277
stderr=subprocess.STDOUT,
2278-
text=True)
2278+
text=True,
2279+
env=support.make_clean_env())
22792280
self.assertEqual(proc.returncode, 0, proc)
22802281

22812282
def test_add_python_opts(self):

0 commit comments

Comments
 (0)