]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-137568: Ignore startup file in `test_dumb_terminal_exits_cleanly` (GH-14029...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 26 Oct 2025 15:15:49 +0000 (16:15 +0100)
committerGitHub <noreply@github.com>
Sun, 26 Oct 2025 15:15:49 +0000 (15:15 +0000)
gh-137568: Ignore startup file in `test_dumb_terminal_exits_cleanly` (GH-140295)
(cherry picked from commit 06c779474c7f53bccb8ebf42c66e73b2488bf488)

Co-authored-by: Bartosz Sławecki <bartosz@ilikepython.com>
Lib/test/test_pyrepl/test_pyrepl.py

index 50d7e72060ba234783c81e2190c85eeae60e1b55..c1485af524aebcaa68c68804519de7bd805c2458 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)