]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix test_pyrepl.TestDumbTerminal if PYTHON_BASIC_REPL set. (#131332)
authorR. David Murray <rdmurray@bitdance.com>
Mon, 17 Mar 2025 17:56:21 +0000 (13:56 -0400)
committerGitHub <noreply@github.com>
Mon, 17 Mar 2025 17:56:21 +0000 (18:56 +0100)
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.

Lib/test/test_pyrepl/test_pyrepl.py

index 3540d2a5a4166250043bfa126049393d3f7fddac..a6a66162d6b25ae639631aa6a1dca34ad492f446 100644 (file)
@@ -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)