()
| 320 | |
| 321 | |
| 322 | async def test_from_fd() -> None: |
| 323 | sa, sb = stdlib_socket.socketpair() |
| 324 | ta = tsocket.fromfd(sa.fileno(), sa.family, sa.type, sa.proto) |
| 325 | with sa, sb, ta: |
| 326 | assert ta.fileno() != sa.fileno() |
| 327 | await ta.send(b"x") |
| 328 | assert sb.recv(3) == b"x" |
| 329 | |
| 330 | |
| 331 | async def test_socketpair_simple() -> None: |