Skip to content

Commit 7bb1d9e

Browse files
ambvmiss-islington
authored andcommitted
gh-143394: On macOS, run main PyREPL tests as "Apple Terminal" as well (GH-143461)
(cherry picked from commit 7dae107) Co-authored-by: Łukasz Langa <lukasz@langa.pl>
1 parent 44bdb83 commit 7bb1d9e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Lib/test/test_pyrepl/test_pyrepl.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1475,6 +1475,17 @@ def test_no_newline(self):
14751475
self.assertIn(expected_output_sequence, cleaned_output)
14761476

14771477

1478+
@skipUnless(sys.platform == "darwin", "macOS only")
1479+
class TestMainAppleTerminal(TestMain):
1480+
"""Test the REPL with Apple Terminal's TERM_PROGRAM set."""
1481+
1482+
def run_repl(self, repl_input, env=None, **kwargs):
1483+
if env is None:
1484+
env = os.environ.copy()
1485+
env["TERM_PROGRAM"] = "Apple_Terminal"
1486+
return super().run_repl(repl_input, env=env, **kwargs)
1487+
1488+
14781489
class TestPyReplCtrlD(TestCase):
14791490
"""Test Ctrl+D behavior in _pyrepl to match old pre-3.13 REPL behavior.
14801491

0 commit comments

Comments
 (0)