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

Method test_poll_c_limits

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

Source from the content-addressed store, hash-verified

171
172 @cpython_only
173 def test_poll_c_limits(self):
174 from _testcapi import USHRT_MAX, INT_MAX, UINT_MAX
175 pollster = select.poll()
176 pollster.register(1)
177
178 # Issues #15989, #17919
179 self.assertRaises(OverflowError, pollster.register, 0, USHRT_MAX + 1)
180 self.assertRaises(OverflowError, pollster.modify, 1, USHRT_MAX + 1)
181 self.assertRaises(OverflowError, pollster.poll, INT_MAX + 1)
182 self.assertRaises(OverflowError, pollster.poll, UINT_MAX + 1)
183
184 @unittest.skip("TODO: RUSTPYTHON fd reallocation")
185 @threading_helper.reap_threads

Callers

nothing calls this directly

Calls 3

pollMethod · 0.45
registerMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected