Lines Matching refs:pty
9 import pty
79 tty.tcgetattr(pty.STDIN_FILENO)
113 stdin_dim = os.get_terminal_size(pty.STDIN_FILENO)
118 self.addCleanup(_set_term_winsz, pty.STDIN_FILENO, old_stdin_winsz)
132 mode = tty.tcgetattr(pty.STDIN_FILENO)
151 _set_term_winsz(pty.STDIN_FILENO, target_stdin_winsz)
155 new_stdin_winsz = _get_term_winsz(pty.STDIN_FILENO)
165 master_fd, slave_fd = pty.openpty(mode, new_stdin_winsz)
167 master_fd, slave_fd = pty.openpty()
216 pid, master_fd = pty.fork()
218 if pid == pty.CHILD:
299 master_fd, slave_fd = pty.openpty()
316 pty.spawn([sys.executable, '-c', 'print("hi there")'])
322 self.orig_stdin_fileno = pty.STDIN_FILENO
323 self.orig_stdout_fileno = pty.STDOUT_FILENO
324 self.orig_pty_close = pty.close
325 self.orig_pty__copy = pty._copy
326 self.orig_pty_fork = pty.fork
327 self.orig_pty_select = pty.select
328 self.orig_pty_setraw = pty.setraw
329 self.orig_pty_tcgetattr = pty.tcgetattr
330 self.orig_pty_tcsetattr = pty.tcsetattr
331 self.orig_pty_waitpid = pty.waitpid
339 pty.STDIN_FILENO = self.orig_stdin_fileno
340 pty.STDOUT_FILENO = self.orig_stdout_fileno
341 pty.close = self.orig_pty_close
342 pty._copy = self.orig_pty__copy
343 pty.fork = self.orig_pty_fork
344 pty.select = self.orig_pty_select
345 pty.setraw = self.orig_pty_setraw
346 pty.tcgetattr = self.orig_pty_tcgetattr
347 pty.tcsetattr = self.orig_pty_tcsetattr
348 pty.waitpid = self.orig_pty_waitpid
387 pty.STDOUT_FILENO = mock_stdout_fd
389 pty.STDIN_FILENO = mock_stdin_fd
398 pty.select = self._mock_select
404 pty._copy(masters[0])
415 pty.STDOUT_FILENO = mock_stdout_fd
417 pty.STDIN_FILENO = mock_stdin_fd
424 pty.select = self._mock_select
432 self.assertEqual(pty._copy(masters[0]), None)
439 pty.fork = self._make_mock_fork(1)
442 pty.waitpid = lambda _1, _2: [None, status_sentinel]
443 pty.close = lambda _: None
445 pty._copy = lambda _1, _2, _3: None
448 pty.tcgetattr = lambda fd: mode_sentinel
449 pty.tcsetattr = self._mock_tcsetattr
450 pty.setraw = lambda _: None
452 …self.assertEqual(pty.spawn([]), status_sentinel, "pty.waitpid process status not returned by pty.s…