]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Remove __cleanenv from PEP-657 tests (GH-27060)
authorAmmar Askar <ammar@ammaraskar.com>
Wed, 7 Jul 2021 21:47:50 +0000 (17:47 -0400)
committerGitHub <noreply@github.com>
Wed, 7 Jul 2021 21:47:50 +0000 (22:47 +0100)
Lib/test/test_code.py
Lib/test/test_marshal.py
Lib/test/test_traceback.py

index 988790b3a593e3eb8f6fd4215ef616e09eb60e82..2bdd7e749434d04a30ffaf65e6926159f517f168 100644 (file)
@@ -384,7 +384,7 @@ class CodeTest(unittest.TestCase):
             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 @@ class CodeTest(unittest.TestCase):
             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.
 
index 152301f16a95b335ac589a856f8fc1f98f18ff1e..d20b9d2c1ff3918fa90da046275beca1564deb04 100644 (file)
@@ -148,8 +148,7 @@ class CodeTestCase(unittest.TestCase):
                 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)
 
index 610ae3f407c140251acf9b598817ed557ff64517..5681dfa7753f3fd3fe571c6974fcaff1cdae0a57 100644 (file)
@@ -84,7 +84,7 @@ class TracebackCases(unittest.TestCase):
                 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 @@ class TracebackCases(unittest.TestCase):
                 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)