(self)
| 455 | self.io_loop.close() |
| 456 | |
| 457 | def test_non_current(self): |
| 458 | self.io_loop = IOLoop(make_current=False) |
| 459 | # The new IOLoop is not initially made current. |
| 460 | self.assertIsNone(IOLoop.current(instance=False)) |
| 461 | # Starting the IOLoop makes it current, and stopping the loop |
| 462 | # makes it non-current. This process is repeatable. |
| 463 | for i in range(3): |
| 464 | |
| 465 | def f(): |
| 466 | self.current_io_loop = IOLoop.current() |
| 467 | assert self.io_loop is not None |
| 468 | self.io_loop.stop() |
| 469 | |
| 470 | self.io_loop.add_callback(f) |
| 471 | self.io_loop.start() |
| 472 | self.assertIs(self.current_io_loop, self.io_loop) |
| 473 | # Now that the loop is stopped, it is no longer current. |
| 474 | self.assertIsNone(IOLoop.current(instance=False)) |
| 475 | |
| 476 | def test_force_current(self): |
| 477 | self.io_loop = IOLoop(make_current=True) |
nothing calls this directly
no test coverage detected