Lines Matching refs:select
26 import select
31 if not hasattr(select, "epoll"):
35 select.epoll()
69 ep = select.epoll(16)
77 if hasattr(select, "EPOLL_CLOEXEC"):
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)
101 ep.register(server.fileno(), select.EPOLLIN | select.EPOLLOUT)
102 ep.register(client.fileno(), select.EPOLLIN | select.EPOLLOUT)
107 ep = select.epoll(2)
109 ep.register(server, select.EPOLLIN | select.EPOLLOUT)
110 ep.register(client, select.EPOLLIN | select.EPOLLOUT)
114 ep = select.epoll(2)
118 select.EPOLLIN | select.EPOLLOUT)
120 select.EPOLLIN | select.EPOLLOUT)
123 select.EPOLLIN | select.EPOLLOUT)
126 select.EPOLLIN | select.EPOLLOUT)
128 ep.register(server, select.EPOLLIN | select.EPOLLOUT)
130 select.EPOLLIN | select.EPOLLOUT)
137 ep = select.epoll(2)
138 ep2 = select.epoll.fromfd(ep.fileno())
140 ep2.register(server.fileno(), select.EPOLLIN | select.EPOLLOUT)
141 ep2.register(client.fileno(), select.EPOLLIN | select.EPOLLOUT)
159 ep = select.epoll(16)
161 select.EPOLLIN | select.EPOLLOUT | select.EPOLLET)
163 select.EPOLLIN | select.EPOLLOUT | select.EPOLLET)
171 expected = [(client.fileno(), select.EPOLLOUT),
172 (server.fileno(), select.EPOLLOUT)]
189 expected = [(client.fileno(), select.EPOLLIN | select.EPOLLOUT),
190 (server.fileno(), select.EPOLLIN | select.EPOLLOUT)]
196 ep.modify(server.fileno(), select.EPOLLOUT)
202 expected = [(server.fileno(), select.EPOLLOUT)]
206 self.assertRaises(ValueError, select.epoll, -2)
207 self.assertRaises(ValueError, select.epoll().register, -1,
208 select.EPOLLIN)
213 ep = select.epoll(16)
228 epoll = select.epoll()
243 self.assertRaises(ValueError, epoll.modify, fd, select.EPOLLIN)
245 self.assertRaises(ValueError, epoll.register, fd, select.EPOLLIN)
249 epoll = select.epoll()