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

(cherry picked from commit 7dae1077cd18c1ddc50b130335936bc71e1c4ccd)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
This commit is contained in:
Miss Islington (bot) 2026-01-06 15:49:43 +01:00 committed by GitHub
parent 8b72c3d561
commit 7d52ea8978
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2002,6 +2002,17 @@ class TestMain(ReplTestCase):
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.