MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_ioctl

Method test_ioctl

Lib/test/test_ioctl.py:30–37  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

28
29class IoctlTests(unittest.TestCase):
30 def test_ioctl(self):
31 # If this process has been put into the background, TIOCGPGRP returns
32 # the session ID instead of the process group id.
33 ids = (os.getpgrp(), os.getsid(0))
34 with open("/dev/tty", "rb") as tty:
35 r = fcntl.ioctl(tty, termios.TIOCGPGRP, " ")
36 rpgrp = struct.unpack("i", r)[0]
37 self.assertIn(rpgrp, ids)
38
39 def _check_ioctl_mutate_len(self, nbytes=None):
40 buf = array.array('i')

Callers

nothing calls this directly

Calls 4

ioctlMethod · 0.80
assertInMethod · 0.80
openFunction · 0.50
unpackMethod · 0.45

Tested by

no test coverage detected