]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-137568: Ignore startup file in `test_dumb_terminal_exits_cleanly` (GH-14029...
authorBartosz Sławecki <bartosz@ilikepython.com>
Sun, 26 Oct 2025 15:36:47 +0000 (16:36 +0100)
committerGitHub <noreply@github.com>
Sun, 26 Oct 2025 15:36:47 +0000 (15:36 +0000)
(cherry picked from commit 06c779474c7f53bccb8ebf42c66e73b2488bf488)

Lib/test/test_pyrepl/test_pyrepl.py

index 364bdf80f3ee2e6d14c5fcb125d9a70845b67ab5..a88382f229c5692034c2bba447fffbb702f84e02 100644 (file)
@@ -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)