[3.13] gh-137568: Ignore startup file in test_dumb_terminal_exits_cleanly (GH-140295) (GH-140632)

(cherry picked from commit 06c779474c)
This commit is contained in:
Bartosz Sławecki 2025-10-26 16:36:47 +01:00 committed by GitHub
parent 7abbf51839
commit 15f92e66eb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1069,6 +1069,9 @@ def test_bracketed_paste_single_line(self):
class TestDumbTerminal(ReplTestCase):
def test_dumb_terminal_exits_cleanly(self):
env = os.environ.copy()
# Ignore PYTHONSTARTUP to not pollute the output
# with an unrelated traceback. See GH-137568.
env.pop('PYTHONSTARTUP', None)
env.update({"TERM": "dumb"})
output, exit_code = self.run_repl("exit()\n", env=env)
self.assertEqual(exit_code, 0)