There was an error while loading. Please reload this page.
1 parent 4d8d0e7 commit d7efdf0Copy full SHA for d7efdf0
1 file changed
Lib/test/test_os.py
@@ -4954,6 +4954,13 @@ def test_posix_pty_functions(self):
4954
son_path = os.ptsname(mother_fd)
4955
son_fd = os.open(son_path, os.O_RDWR|os.O_NOCTTY)
4956
self.addCleanup(os.close, son_fd)
4957
+ if sys.platform.startswith('sunos'):
4958
+ # The slave is not a terminal until these STREAMS modules
4959
+ # are pushed onto it.
4960
+ import fcntl
4961
+ I_PUSH = 0x5302
4962
+ fcntl.ioctl(son_fd, I_PUSH, b'ptem\0')
4963
+ fcntl.ioctl(son_fd, I_PUSH, b'ldterm\0')
4964
self.assertEqual(os.ptsname(mother_fd), os.ttyname(son_fd))
4965
4966
@unittest.skipUnless(hasattr(os, 'spawnl'), "need os.spawnl()")
0 commit comments