From: Bartosz Sławecki Date: Sun, 26 Oct 2025 15:36:47 +0000 (+0100) Subject: [3.13] gh-137568: Ignore startup file in `test_dumb_terminal_exits_cleanly` (GH-14029... X-Git-Tag: v3.13.10~210 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15f92e66eb72c382852ffa28884cc7384aec4f1f;p=thirdparty%2FPython%2Fcpython.git [3.13] gh-137568: Ignore startup file in `test_dumb_terminal_exits_cleanly` (GH-140295) (GH-140632) (cherry picked from commit 06c779474c7f53bccb8ebf42c66e73b2488bf488) --- diff --git a/Lib/test/test_pyrepl/test_pyrepl.py b/Lib/test/test_pyrepl/test_pyrepl.py index 364bdf80f3ee..a88382f229c5 100644 --- a/Lib/test/test_pyrepl/test_pyrepl.py +++ b/Lib/test/test_pyrepl/test_pyrepl.py @@ -1069,6 +1069,9 @@ class TestPasteEvent(TestCase): 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)