Skip to content

Commit c7cbd22

Browse files
committed
fix: address review comments
Signed-off-by: yihong0618 <[email protected]>
1 parent 2e9faf7 commit c7cbd22

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

Lib/test/test_pyrepl/test_unix_console.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -304,14 +304,12 @@ def test_getheightwidth_with_invalid_environ(self, _os_write):
304304
os.environ = []
305305
self.assertIsInstance(console.getheightwidth(), tuple)
306306

307+
@unittest.skipUnless(sys.platform == "darwin", "requires OS X")
307308
def test_mac_with_invalid_environ(self, _os_write):
308309
# gh-128636 for macOS
309-
if sys.platform == "darwin":
310-
console = UnixConsole(term="xterm")
311-
with os_helper.EnvironmentVarGuard() as env:
312-
if os.getenv("TERM_PROGRAM") == "Apple_Terminal":
313-
self.assertEqual(console.is_mac, True)
314-
else:
315-
self.assertEqual(console.is_mac, False)
316-
os.environ = []
317-
self.assertIsInstance(console.getheightwidth(), tuple)
310+
console = UnixConsole(term="xterm")
311+
with os_helper.EnvironmentVarGuard() as env:
312+
is_mac = os.getenv("TERM_PROGRAM") == "Apple_Terminal"
313+
self.assertEqual(console.is_mac, is_mac)
314+
os.environ = []
315+
self.assertIsInstance(console.getheightwidth(), tuple)

0 commit comments

Comments
 (0)