https://github.com/python/cpython/commit/7dae1077cd18c1ddc50b130335936bc71e1c4ccd
commit: 7dae1077cd18c1ddc50b130335936bc71e1c4ccd
branch: main
author: Ɓukasz Langa <[email protected]>
committer: ambv <[email protected]>
date: 2026-01-06T11:10:18+01:00
summary:

gh-143394: On macOS, run main PyREPL tests as "Apple Terminal" as well 
(GH-143461)

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 00dcbdc562ae64..35a1733787e7a2 100644
--- a/Lib/test/test_pyrepl/test_pyrepl.py
+++ b/Lib/test/test_pyrepl/test_pyrepl.py
@@ -2012,6 +2012,17 @@ def test_no_newline(self):
         self.assertIn(expected_output_sequence, cleaned_output)
 
 
+@skipUnless(sys.platform == "darwin", "macOS only")
+class TestMainAppleTerminal(TestMain):
+    """Test the REPL with Apple Terminal's TERM_PROGRAM set."""
+
+    def run_repl(self, repl_input, env=None, **kwargs):
+        if env is None:
+            env = os.environ.copy()
+        env["TERM_PROGRAM"] = "Apple_Terminal"
+        return super().run_repl(repl_input, env=env, **kwargs)
+
+
 class TestPyReplCtrlD(TestCase):
     """Test Ctrl+D behavior in _pyrepl to match old pre-3.13 REPL behavior.
 

_______________________________________________
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