PythonExtra/tests/net_hosted
Jim Mussared 977dc9a369 extmod/asyncio/stream.py: Fix cancellation handling of start_server.
The following code:

  server = await asyncio.start_server(...)
  async with server:
    ... code that raises ...

would lose the original exception because the server's task would not have
had a chance to be scheduled yet, and so awaiting the task in wait_closed
would raise the cancellation instead of the original exception.

Additionally, ensures that explicitly cancelling the parent task delivers
the cancellation correctly (previously was masked by the server loop), now
this only happens if the server was closed, not when the task was
cancelled.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2023-10-02 14:11:52 +11:00
..
README all: Fix spelling mistakes based on codespell check. 2023-04-27 18:03:06 +10:00
accept_nonblock.py tests: Replace umodule with module everywhere. 2023-06-08 17:54:24 +10:00
accept_nonblock.py.exp
accept_timeout.py tests: Replace umodule with module everywhere. 2023-06-08 17:54:24 +10:00
accept_timeout.py.exp
asyncio_start_server.py extmod/asyncio/stream.py: Fix cancellation handling of start_server. 2023-10-02 14:11:52 +11:00
asyncio_start_server.py.exp extmod/asyncio/stream.py: Fix cancellation handling of start_server. 2023-10-02 14:11:52 +11:00
connect_nonblock.py tests: Replace umodule with module everywhere. 2023-06-08 17:54:24 +10:00
connect_nonblock.py.exp
connect_nonblock_xfer.py tests: Replace umodule with module everywhere. 2023-06-08 17:54:24 +10:00
connect_poll.py tests: Replace umodule with module everywhere. 2023-06-08 17:54:24 +10:00
connect_poll.py.exp
ssl_getpeercert.py tests: Replace umodule with module everywhere. 2023-06-08 17:54:24 +10:00
ssl_getpeercert.py.exp

README

This directory contains network tests which require just "peer to peer"
network connection between test host and device under test, instead of
full Internet connection.

Note that setup for these tests and tests themselves are WIP, and may
not yet fully correspond to the functional specification above.

So far, these tests are not run as part of the main testsuite and need
to be run separately (from the main test/ directory):

    ./run-tests.py net_hosted/*.py