From: R. David Murray Date: Mon, 17 Mar 2025 17:56:21 +0000 (-0400) Subject: Fix test_pyrepl.TestDumbTerminal if PYTHON_BASIC_REPL set. (#131332) X-Git-Tag: v3.14.0a7~341 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a09c2b2ba643d9e0bf8b35fb5a163b75349a1846;p=thirdparty%2FPython%2Fcpython.git Fix test_pyrepl.TestDumbTerminal if PYTHON_BASIC_REPL set. (#131332) Most of the tests that care already adjust PYTHON_BASIC_REPL as needed, but this one doesn't, and it fails if the developer has the variable set. --- diff --git a/Lib/test/test_pyrepl/test_pyrepl.py b/Lib/test/test_pyrepl/test_pyrepl.py index 3540d2a5a416..a6a66162d6b2 100644 --- a/Lib/test/test_pyrepl/test_pyrepl.py +++ b/Lib/test/test_pyrepl/test_pyrepl.py @@ -1059,6 +1059,7 @@ class TestPasteEvent(TestCase): class TestDumbTerminal(ReplTestCase): def test_dumb_terminal_exits_cleanly(self): env = os.environ.copy() + env.pop('PYTHON_BASIC_REPL', None) env.update({"TERM": "dumb"}) output, exit_code = self.run_repl("exit()\n", env=env) self.assertEqual(exit_code, 0)