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.
This commit is contained in:
R. David Murray 2025-03-17 13:56:21 -04:00 committed by GitHub
parent fd545d735d
commit a09c2b2ba6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View 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)