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

Method test_get_set_inheritable_badf

Lib/test/test_os.py:4780–4793  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

4778 self.assertEqual(os.get_inheritable(fd), False)
4779
4780 def test_get_set_inheritable_badf(self):
4781 fd = os_helper.make_bad_fd()
4782
4783 with self.assertRaises(OSError) as ctx:
4784 os.get_inheritable(fd)
4785 self.assertEqual(ctx.exception.errno, errno.EBADF)
4786
4787 with self.assertRaises(OSError) as ctx:
4788 os.set_inheritable(fd, True)
4789 self.assertEqual(ctx.exception.errno, errno.EBADF)
4790
4791 with self.assertRaises(OSError) as ctx:
4792 os.set_inheritable(fd, False)
4793 self.assertEqual(ctx.exception.errno, errno.EBADF)
4794
4795 def test_open(self):
4796 fd = os.open(__file__, os.O_RDONLY)

Callers

nothing calls this directly

Calls 4

set_inheritableMethod · 0.80
assertRaisesMethod · 0.45
get_inheritableMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected