Commit fdebe56
committed
PYTHON-5781 Fix TestReceiveData failures on PyPy
On PyPy, receive_data takes the wait_for_read() path before calling
recv_into(). wait_for_read() checks sock.fileno() == -1 as an early
exit; without a real return value, sock.pending() > 0 raises TypeError
on PyPy (MagicMock comparison against int is not supported).
Set fileno() = -1 on the mock so wait_for_read returns immediately.1 parent de16f7a commit fdebe56
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
48 | 52 | | |
49 | 53 | | |
50 | 54 | | |
| |||
0 commit comments