(self)
| 97 | self.wait() |
| 98 | |
| 99 | def test_multiple_add(self): |
| 100 | sock, port = bind_unused_port() |
| 101 | try: |
| 102 | self.io_loop.add_handler( |
| 103 | sock.fileno(), lambda fd, events: None, IOLoop.READ |
| 104 | ) |
| 105 | # Attempting to add the same handler twice fails |
| 106 | # (with a platform-dependent exception) |
| 107 | self.assertRaises( |
| 108 | Exception, |
| 109 | self.io_loop.add_handler, |
| 110 | sock.fileno(), |
| 111 | lambda fd, events: None, |
| 112 | IOLoop.READ, |
| 113 | ) |
| 114 | finally: |
| 115 | self.io_loop.remove_handler(sock.fileno()) |
| 116 | sock.close() |
| 117 | |
| 118 | def test_remove_without_add(self): |
| 119 | # remove_handler should not throw an exception if called on an fd |
nothing calls this directly
no test coverage detected