There was an error while loading. Please reload this page.
1 parent a0caab9 commit 3d99861Copy full SHA for 3d99861
1 file changed
Lib/test/test_os/test_os.py
@@ -4727,6 +4727,13 @@ def test_posix_pty_functions(self):
4727
son_path = os.ptsname(mother_fd)
4728
son_fd = os.open(son_path, os.O_RDWR|os.O_NOCTTY)
4729
self.addCleanup(os.close, son_fd)
4730
+ if sys.platform.startswith('sunos'):
4731
+ # The slave is not a terminal until these STREAMS modules
4732
+ # are pushed onto it.
4733
+ import fcntl
4734
+ I_PUSH = 0x5302
4735
+ fcntl.ioctl(son_fd, I_PUSH, b'ptem\0')
4736
+ fcntl.ioctl(son_fd, I_PUSH, b'ldterm\0')
4737
self.assertEqual(os.ptsname(mother_fd), os.ttyname(son_fd))
4738
4739
@warnings_helper.ignore_fork_in_thread_deprecation_warnings()
0 commit comments