From: Bartosz Sławecki Date: Sun, 26 Oct 2025 14:48:03 +0000 (+0100) Subject: gh-137568: Ignore startup file in `test_dumb_terminal_exits_cleanly` (GH-140295) X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=06c779474c7f53bccb8ebf42c66e73b2488bf488;p=thirdparty%2FPython%2Fcpython.git gh-137568: Ignore startup file in `test_dumb_terminal_exits_cleanly` (GH-140295) --- diff --git a/Lib/test/test_pyrepl/test_pyrepl.py b/Lib/test/test_pyrepl/test_pyrepl.py index ad7464dc3d37..e298b2add52c 100644 --- a/Lib/test/test_pyrepl/test_pyrepl.py +++ b/Lib/test/test_pyrepl/test_pyrepl.py @@ -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)