pypy/module/select/test/test_select.py::AppTestSelectWithPipes::()::test_poll
self = <pypy.interpreter.typedef.W_ObjectObjectUserDictWeakrefable object at 0x00000001298e6b10>
def test_poll(self):
import select
if not hasattr(select, 'poll'):
skip("no select.poll() on this platform")
readend, writeend = self.getpair()
try:
class A(object):
def fileno(self):
return readend.fileno()
poll = select.poll()
poll.register(A())
res = poll.poll(10) # timeout in ms
assert res == []
res = poll.poll(1.1) # check floats
assert res == []
writeend.send(b"foo!")
# can't easily test actual blocking, is done in lib-python tests
res = poll.poll()
> assert res == [(readend.fileno(), 1)]
E (application-level) AssertionError
[/Users/matti/build-worker-arm64/own-macos-arm64/build/pypy/module/select/test/test_select.py:274]:21: AssertionError
builder: own-macos-arm64 build #1203
test: pypy/module/select/test/test_select/py/AppTestSelectWithPipes/()/test_poll