[Python-checkins] Remove __cleanenv from PEP-657 tests (GH-27060)

pablogsal webhook-mailer at python.org
Wed Jul 7 17:48:06 EDT 2021


https://github.com/python/cpython/commit/052930f2416323ca0488b86baad7944d62e79e7f
commit: 052930f2416323ca0488b86baad7944d62e79e7f
branch: main
author: Ammar Askar <ammar at ammaraskar.com>
committer: pablogsal <Pablogsal at gmail.com>
date: 2021-07-07T22:47:50+01:00
summary:

Remove __cleanenv from PEP-657 tests (GH-27060)

files:
M Lib/test/test_code.py
M Lib/test/test_marshal.py
M Lib/test/test_traceback.py

diff --git a/Lib/test/test_code.py b/Lib/test/test_code.py
index 988790b3a593e..2bdd7e749434d 100644
--- a/Lib/test/test_code.py
+++ b/Lib/test/test_code.py
@@ -384,7 +384,7 @@ def f():
             assert f.__code__.co_endlinetable is None
             assert f.__code__.co_columntable is None
             """)
-        assert_python_ok('-X', 'no_debug_ranges', '-c', code, __cleanenv=True)
+        assert_python_ok('-X', 'no_debug_ranges', '-c', code)
 
     def test_endline_and_columntable_none_when_no_debug_ranges_env(self):
         # Same as above but using the environment variable opt out.
@@ -395,7 +395,7 @@ def f():
             assert f.__code__.co_endlinetable is None
             assert f.__code__.co_columntable is None
             """)
-        assert_python_ok('-c', code, PYTHONNODEBUGRANGES='1', __cleanenv=True)
+        assert_python_ok('-c', code, PYTHONNODEBUGRANGES='1')
 
     # co_positions behavior when info is missing.
 
diff --git a/Lib/test/test_marshal.py b/Lib/test/test_marshal.py
index 152301f16a95b..d20b9d2c1ff39 100644
--- a/Lib/test/test_marshal.py
+++ b/Lib/test/test_marshal.py
@@ -148,8 +148,7 @@ def test_no_columntable_and_endlinetable_with_no_debug_ranges(self):
                 marshal.dump(co, f)
 
             assert_python_ok('-X', 'no_debug_ranges',
-                             '-c', code, os_helper.TESTFN,
-                             __cleanenv=True)
+                             '-c', code, os_helper.TESTFN)
         finally:
             os_helper.unlink(os_helper.TESTFN)
 
diff --git a/Lib/test/test_traceback.py b/Lib/test/test_traceback.py
index 610ae3f407c14..5681dfa7753f3 100644
--- a/Lib/test/test_traceback.py
+++ b/Lib/test/test_traceback.py
@@ -84,7 +84,7 @@ def test_no_caret_with_no_debug_ranges_flag(self):
                 f.write("x = 1 / 0\n")
 
             _, _, stderr = assert_python_failure(
-                '-X', 'no_debug_ranges', TESTFN, __cleanenv=True)
+                '-X', 'no_debug_ranges', TESTFN)
 
             lines = stderr.splitlines()
             self.assertEqual(len(lines), 4)
@@ -108,7 +108,7 @@ def test_no_caret_with_no_debug_ranges_flag_python_traceback(self):
                 f.write(code)
 
             _, _, stderr = assert_python_ok(
-                '-X', 'no_debug_ranges', TESTFN, __cleanenv=True)
+                '-X', 'no_debug_ranges', TESTFN)
 
             lines = stderr.splitlines()
             self.assertEqual(len(lines), 4)



More information about the Python-checkins mailing list