Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Lib/test/test_os.py
Original file line number Diff line number Diff line change
Expand Up @@ -4788,6 +4788,13 @@ def test_posix_pty_functions(self):
son_path = os.ptsname(mother_fd)
son_fd = os.open(son_path, os.O_RDWR|os.O_NOCTTY)
self.addCleanup(os.close, son_fd)
if sys.platform.startswith('sunos'):
# The slave is not a terminal until these STREAMS modules
# are pushed onto it.
import fcntl
I_PUSH = 0x5302
fcntl.ioctl(son_fd, I_PUSH, b'ptem\0')
fcntl.ioctl(son_fd, I_PUSH, b'ldterm\0')
self.assertEqual(os.ptsname(mother_fd), os.ttyname(son_fd))

@unittest.skipUnless(hasattr(os, 'spawnl'), "need os.spawnl()")
Expand Down
Loading