MCPcopy Index your code
hub / github.com/python/cpython / test_close_error

Method test_close_error

Lib/test/test_epoll.py:262–269  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

260 self.assertRaises(ValueError, epoll.unregister, fd)
261
262 def test_close_error(self):
263 # gh-146205: close() should raise OSError if underlying fd is invalid
264 epoll = select.epoll()
265 fd = epoll.fileno()
266 os.close(fd)
267 with self.assertRaises(OSError) as cm:
268 epoll.close()
269 self.assertEqual(cm.exception.errno, errno.EBADF)
270
271 def test_fd_non_inheritable(self):
272 epoll = select.epoll()

Callers

nothing calls this directly

Calls 4

filenoMethod · 0.45
closeMethod · 0.45
assertRaisesMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected