We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 835f4ad commit 2ee2bfeCopy full SHA for 2ee2bfe
Lib/test/test_pyrepl/test_pyrepl.py
@@ -884,6 +884,19 @@ def test_bracketed_paste_single_line(self):
884
885
@skipUnless(pty, "requires pty")
886
class TestMain(TestCase):
887
+ def setUp(self):
888
+ # Cleanup from PYTHON* variables to isolate from local
889
+ # user settings, see #121359. Such variables should be
890
+ # added later in test methods to patched os.environ.
891
+ clean_env = os.environ.copy()
892
+ for k in clean_env.copy():
893
+ if k.startswith("PYTHON"):
894
+ clean_env.pop(k)
895
+
896
+ patcher = patch('os.environ', new=clean_env)
897
+ self.addCleanup(patcher.stop)
898
+ patcher.start()
899
900
@force_not_colorized
901
def test_exposed_globals_in_repl(self):
902
pre = "['__annotations__', '__builtins__'"
0 commit comments