Home | History | Annotate | Download | only in test

Lines Matching refs:epoll

22 Tests for epoll wrapper.
31 if not hasattr(select, "epoll"):
35 select.epoll()
38 raise unittest.SkipTest("kernel doesn't support epoll()")
69 ep = select.epoll(16)
78 select.epoll(select.EPOLL_CLOEXEC).close()
79 self.assertRaises(OSError, select.epoll, flags=12356)
82 self.assertRaises(TypeError, select.epoll, 1, 2, 3)
83 self.assertRaises(TypeError, select.epoll, 'foo')
84 self.assertRaises(TypeError, select.epoll, None)
85 self.assertRaises(TypeError, select.epoll, ())
86 self.assertRaises(TypeError, select.epoll, ['foo'])
87 self.assertRaises(TypeError, select.epoll, {})
90 with select.epoll(16) as ep:
99 ep = select.epoll(2)
107 ep = select.epoll(2)
114 ep = select.epoll(2)
137 ep = select.epoll(2)
138 ep2 = select.epoll.fromfd(ep.fileno())
154 self.fail("epoll on closed fd didn't raise EBADF")
159 ep = select.epoll(16)
206 self.assertRaises(ValueError, select.epoll, -2)
207 self.assertRaises(ValueError, select.epoll().register, -1,
213 ep = select.epoll(16)
228 epoll = select.epoll()
231 self.assertIsInstance(epoll.fileno(), int)
232 self.assertFalse(epoll.closed)
235 epoll.close()
236 self.assertTrue(epoll.closed)
237 self.assertRaises(ValueError, epoll.fileno)
240 epoll.close()
243 self.assertRaises(ValueError, epoll.modify, fd, select.EPOLLIN)
244 self.assertRaises(ValueError, epoll.poll, 1.0)
245 self.assertRaises(ValueError, epoll.register, fd, select.EPOLLIN)
246 self.assertRaises(ValueError, epoll.unregister, fd)
249 epoll = select.epoll()
250 self.addCleanup(epoll.close)
251 self.assertEqual(os.get_inheritable(epoll.fileno()), False)