MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_poll3

Method test_poll3

Lib/test/test_poll.py:155–170  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

153 self.fail('Unexpected return value from select.poll: %s' % fdlist)
154
155 def test_poll3(self):
156 # test int overflow
157 pollster = select.poll()
158 pollster.register(1)
159
160 self.assertRaises(OverflowError, pollster.poll, 1 << 64)
161
162 x = 2 + 3
163 if x != 5:
164 self.fail('Overflow must have occurred')
165
166 # Issues #15989, #17919
167 self.assertRaises(ValueError, pollster.register, 0, -1)
168 self.assertRaises(OverflowError, pollster.register, 0, 1 << 64)
169 self.assertRaises(ValueError, pollster.modify, 1, -1)
170 self.assertRaises(OverflowError, pollster.modify, 1, 1 << 64)
171
172 @cpython_only
173 def test_poll_c_limits(self):

Callers

nothing calls this directly

Calls 4

pollMethod · 0.45
registerMethod · 0.45
assertRaisesMethod · 0.45
failMethod · 0.45

Tested by

no test coverage detected