Skip to content

Commit 2cd3b0e

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

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
@@ -1486,6 +1486,17 @@ def test_no_newline(self):
14861486
self.assertIn(expected_output_sequence, cleaned_output)
14871487

14881488

1489+
@skipUnless(sys.platform == "darwin", "macOS only")
1490+
class TestMainAppleTerminal(TestMain):
1491+
"""Test the REPL with Apple Terminal's TERM_PROGRAM set."""
1492+
1493+
def run_repl(self, repl_input, env=None, **kwargs):
1494+
if env is None:
1495+
env = os.environ.copy()
1496+
env["TERM_PROGRAM"] = "Apple_Terminal"
1497+
return super().run_repl(repl_input, env=env, **kwargs)
1498+
1499+
14891500
class TestPyReplCtrlD(TestCase):
14901501
"""Test Ctrl+D behavior in _pyrepl to match old pre-3.13 REPL behavior.
14911502

0 commit comments

Comments
 (0)