[3.14] gh-137568: Ignore startup file in test_dumb_terminal_exits_cleanly (GH-140295) (GH-140628)

gh-137568: Ignore startup file in `test_dumb_terminal_exits_cleanly` (GH-140295)
(cherry picked from commit 06c779474c)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
This commit is contained in:
Miss Islington (bot) 2025-10-26 16:15:49 +01:00 committed by GitHub
parent 46a3fd2da5
commit 30ee67b2e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1406,6 +1406,9 @@ class TestDumbTerminal(ReplTestCase):
def test_dumb_terminal_exits_cleanly(self):
env = os.environ.copy()
env.pop('PYTHON_BASIC_REPL', None)
# 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)