https://github.com/python/cpython/commit/30ee67b2e408fecc61ff20a001b93d85c9815838
commit: 30ee67b2e408fecc61ff20a001b93d85c9815838
branch: 3.14
author: Miss Islington (bot) <[email protected]>
committer: ZeroIntensity <[email protected]>
date: 2025-10-26T15:15:49Z
summary:

[3.14] gh-137568: Ignore startup file in `test_dumb_terminal_exits_cleanly` 
(GH-140295) (GH-140628)

gh-137568: Ignore startup file in `test_dumb_terminal_exits_cleanly` (GH-140295)
(cherry picked from commit 06c779474c7f53bccb8ebf42c66e73b2488bf488)

Co-authored-by: Bartosz SÅ‚awecki <[email protected]>

files:
M Lib/test/test_pyrepl/test_pyrepl.py

diff --git a/Lib/test/test_pyrepl/test_pyrepl.py 
b/Lib/test/test_pyrepl/test_pyrepl.py
index 50d7e72060ba23..c1485af524aebc 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)

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to