(sock, n, timeout=test.support.SHORT_TIMEOUT)
| 36 | _real_select = select.select |
| 37 | |
| 38 | def receive(sock, n, timeout=test.support.SHORT_TIMEOUT): |
| 39 | r, w, x = _real_select([sock], [], [], timeout) |
| 40 | if sock in r: |
| 41 | return sock.recv(n) |
| 42 | else: |
| 43 | raise RuntimeError("timed out on %r" % (sock,)) |
| 44 | |
| 45 | |
| 46 | @test.support.requires_fork() # TODO: RUSTPYTHON, os.fork is currently only supported on Unix-based systems |
no test coverage detected