]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-137568: Ignore startup file in `test_dumb_terminal_exits_cleanly` (GH-140295)
authorBartosz Sławecki <bartosz@ilikepython.com>
Sun, 26 Oct 2025 14:48:03 +0000 (15:48 +0100)
committerGitHub <noreply@github.com>
Sun, 26 Oct 2025 14:48:03 +0000 (10:48 -0400)
Lib/test/test_pyrepl/test_pyrepl.py

index ad7464dc3d37c6b46458b3a8e4ee959985a8f6d5..e298b2add52c3e97a1c431c0551dd656c1276c7e 100644 (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)