Skip to content

Commit 7d52ea8

Browse files
miss-islingtonambv
andauthored
[3.14] gh-143394: On macOS, run main PyREPL tests as "Apple Terminal" as well (GH-143461) (GH-143466)
(cherry picked from commit 7dae107) Co-authored-by: Łukasz Langa <lukasz@langa.pl>
1 parent 8b72c3d commit 7d52ea8

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
@@ -2002,6 +2002,17 @@ def test_no_newline(self):
20022002
self.assertIn(expected_output_sequence, cleaned_output)
20032003

20042004

2005+
@skipUnless(sys.platform == "darwin", "macOS only")
2006+
class TestMainAppleTerminal(TestMain):
2007+
"""Test the REPL with Apple Terminal's TERM_PROGRAM set."""
2008+
2009+
def run_repl(self, repl_input, env=None, **kwargs):
2010+
if env is None:
2011+
env = os.environ.copy()
2012+
env["TERM_PROGRAM"] = "Apple_Terminal"
2013+
return super().run_repl(repl_input, env=env, **kwargs)
2014+
2015+
20052016
class TestPyReplCtrlD(TestCase):
20062017
"""Test Ctrl+D behavior in _pyrepl to match old pre-3.13 REPL behavior.
20072018

0 commit comments

Comments
 (0)