(self)
| 558 | SELECTOR = getattr(selectors, 'EpollSelector', None) |
| 559 | |
| 560 | def test_register_file(self): |
| 561 | # epoll(7) returns EPERM when given a file to watch |
| 562 | s = self.SELECTOR() |
| 563 | with tempfile.NamedTemporaryFile() as f: |
| 564 | with self.assertRaises(IOError): |
| 565 | s.register(f, selectors.EVENT_READ) |
| 566 | # the SelectorKey has been removed |
| 567 | with self.assertRaises(KeyError): |
| 568 | s.get_key(f) |
| 569 | |
| 570 | |
| 571 | @unittest.skipUnless(hasattr(selectors, 'KqueueSelector'), |
nothing calls this directly
no test coverage detected