MCPcopy Create free account
hub / github.com/EasyIME/PIME / test_mixed_fd_fileobj

Method test_mixed_fd_fileobj

python/python3/tornado/test/ioloop_test.py:309–321  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

307 server_sock.close()
308
309 def test_mixed_fd_fileobj(self):
310 server_sock, port = bind_unused_port()
311
312 def f(fd, events):
313 pass
314
315 self.io_loop.add_handler(server_sock, f, IOLoop.READ)
316 with self.assertRaises(Exception):
317 # The exact error is unspecified - some implementations use
318 # IOError, others use ValueError.
319 self.io_loop.add_handler(server_sock.fileno(), f, IOLoop.READ)
320 self.io_loop.remove_handler(server_sock.fileno())
321 server_sock.close()
322
323 def test_reentrant(self):
324 """Calling start() twice should raise an error, not deadlock."""

Callers

nothing calls this directly

Calls 5

bind_unused_portFunction · 0.90
add_handlerMethod · 0.45
filenoMethod · 0.45
remove_handlerMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected