Skip to content

Commit d4e6dee

Browse files
[3.14] gh-150046: Fix test_add_python_opts to ignore PYTHON* env vars (GH-150089) (#150562)
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 e4a23c8 commit d4e6dee

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
@@ -2276,7 +2276,8 @@ def test_python_opts(self):
22762276
proc = subprocess.run(cmd,
22772277
stdout=subprocess.PIPE,
22782278
stderr=subprocess.STDOUT,
2279-
text=True)
2279+
text=True,
2280+
env=support.make_clean_env())
22802281
self.assertEqual(proc.returncode, 0, proc)
22812282

22822283
def test_add_python_opts(self):

0 commit comments

Comments
 (0)