Skip to content

Commit 2e9faf7

Browse files
committed
fix: test is wrong
Signed-off-by: yihong0618 <[email protected]>
1 parent a0a5cf3 commit 2e9faf7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Lib/test/test_pyrepl/test_unix_console.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,9 @@ def test_mac_with_invalid_environ(self, _os_write):
309309
if sys.platform == "darwin":
310310
console = UnixConsole(term="xterm")
311311
with os_helper.EnvironmentVarGuard() as env:
312-
env["TERM_PROGRAM"] = "Apple_Terminal"
313-
console.is_mac = True
312+
if os.getenv("TERM_PROGRAM") == "Apple_Terminal":
313+
self.assertEqual(console.is_mac, True)
314+
else:
315+
self.assertEqual(console.is_mac, False)
314316
os.environ = []
315317
self.assertIsInstance(console.getheightwidth(), tuple)

0 commit comments

Comments
 (0)