From 6027c41c8f5b8f1a9e7b85b2bb93b3e6f2718e54 Mon Sep 17 00:00:00 2001 From: Jim Mussared Date: Thu, 8 Jun 2023 16:01:38 +1000 Subject: [PATCH] tests: Rename uasyncio to asyncio. This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared --- ...o_await_return.py => asyncio_await_return.py} | 9 +++------ ...return.py.exp => asyncio_await_return.py.exp} | 0 .../{uasyncio_basic.py => asyncio_basic.py} | 9 +++------ ...asyncio_basic.py.exp => asyncio_basic.py.exp} | 0 .../{uasyncio_basic2.py => asyncio_basic2.py} | 9 +++------ ...yncio_basic2.py.exp => asyncio_basic2.py.exp} | 0 ...cio_cancel_fair.py => asyncio_cancel_fair.py} | 9 +++------ ...el_fair.py.exp => asyncio_cancel_fair.py.exp} | 0 ...o_cancel_fair2.py => asyncio_cancel_fair2.py} | 9 +++------ ..._fair2.py.exp => asyncio_cancel_fair2.py.exp} | 0 ...cio_cancel_self.py => asyncio_cancel_self.py} | 9 +++------ ...el_self.py.exp => asyncio_cancel_self.py.exp} | 0 ...cio_cancel_task.py => asyncio_cancel_task.py} | 9 +++------ ...el_task.py.exp => asyncio_cancel_task.py.exp} | 0 ...hed.py => asyncio_cancel_wait_on_finished.py} | 9 +++------ ...xp => asyncio_cancel_wait_on_finished.py.exp} | 0 ...o_current_task.py => asyncio_current_task.py} | 9 +++------ ...t_task.py.exp => asyncio_current_task.py.exp} | 0 .../{uasyncio_event.py => asyncio_event.py} | 9 +++------ ...asyncio_event.py.exp => asyncio_event.py.exp} | 0 ...yncio_event_fair.py => asyncio_event_fair.py} | 9 +++------ ...ent_fair.py.exp => asyncio_event_fair.py.exp} | 0 ...asyncio_exception.py => asyncio_exception.py} | 9 +++------ ...exception.py.exp => asyncio_exception.py.exp} | 0 .../extmod/{uasyncio_fair.py => asyncio_fair.py} | 9 +++------ ...{uasyncio_fair.py.exp => asyncio_fair.py.exp} | 0 .../{uasyncio_gather.py => asyncio_gather.py} | 11 ++++------- ...yncio_gather.py.exp => asyncio_gather.py.exp} | 0 ...ther_notimpl.py => asyncio_gather_notimpl.py} | 11 ++++------- ...impl.py.exp => asyncio_gather_notimpl.py.exp} | 0 ...t_event_loop.py => asyncio_get_event_loop.py} | 9 +++------ ...{uasyncio_heaplock.py => asyncio_heaplock.py} | 11 ++++------- ...o_heaplock.py.exp => asyncio_heaplock.py.exp} | 0 .../extmod/{uasyncio_lock.py => asyncio_lock.py} | 9 +++------ ...{uasyncio_lock.py.exp => asyncio_lock.py.exp} | 0 ...cio_lock_cancel.py => asyncio_lock_cancel.py} | 9 +++------ ..._cancel.py.exp => asyncio_lock_cancel.py.exp} | 0 ...asyncio_loop_stop.py => asyncio_loop_stop.py} | 9 +++------ ...loop_stop.py.exp => asyncio_loop_stop.py.exp} | 0 ...cio_micropython.py => asyncio_micropython.py} | 16 ++++++++-------- ...opython.py.exp => asyncio_micropython.py.exp} | 0 ...w_event_loop.py => asyncio_new_event_loop.py} | 9 +++------ ...loop.py.exp => asyncio_new_event_loop.py.exp} | 0 ...ndler.py => asyncio_set_exception_handler.py} | 9 +++------ ....exp => asyncio_set_exception_handler.py.exp} | 0 ...asyncio_task_done.py => asyncio_task_done.py} | 9 +++------ ...task_done.py.exp => asyncio_task_done.py.exp} | 0 ...readsafeflag.py => asyncio_threadsafeflag.py} | 2 +- ...flag.py.exp => asyncio_threadsafeflag.py.exp} | 0 ...{uasyncio_wait_for.py => asyncio_wait_for.py} | 9 +++------ ...o_wait_for.py.exp => asyncio_wait_for.py.exp} | 0 ...o_wait_for_fwd.py => asyncio_wait_for_fwd.py} | 9 +++------ ...or_fwd.py.exp => asyncio_wait_for_fwd.py.exp} | 0 ...asyncio_wait_task.py => asyncio_wait_task.py} | 9 +++------ ...wait_task.py.exp => asyncio_wait_task.py.exp} | 0 ...0_uasyncio_client.py => 80_asyncio_client.py} | 2 +- ...io_client.py.exp => 80_asyncio_client.py.exp} | 0 ...1_uasyncio_server.py => 81_asyncio_server.py} | 2 +- ...io_server.py.exp => 81_asyncio_server.py.exp} | 0 ...p_client_rst.py => asyncio_tcp_client_rst.py} | 9 +++------ ..._rst.py.exp => asyncio_tcp_client_rst.py.exp} | 0 ...close_write.py => asyncio_tcp_close_write.py} | 11 ++++------- ...ite.py.exp => asyncio_tcp_close_write.py.exp} | 0 ...cio_tcp_readall.py => asyncio_tcp_readall.py} | 11 ++++------- ...readall.py.exp => asyncio_tcp_readall.py.exp} | 0 ...readexactly.py => asyncio_tcp_readexactly.py} | 11 ++++------- ...tly.py.exp => asyncio_tcp_readexactly.py.exp} | 0 ...o_tcp_readinto.py => asyncio_tcp_readinto.py} | 11 ++++------- ...adinto.py.exp => asyncio_tcp_readinto.py.exp} | 0 ...er_client.py => asyncio_tcp_server_client.py} | 11 ++++------- ...t.py.exp => asyncio_tcp_server_client.py.exp} | 0 ...o_start_server.py => asyncio_start_server.py} | 11 ++++------- ...server.py.exp => asyncio_start_server.py.exp} | 0 ...cancel_stream.py => asyncio_cancel_stream.py} | 9 +++------ ...tream.py.exp => asyncio_cancel_stream.py.exp} | 0 ..._connection.py => asyncio_open_connection.py} | 11 ++++------- ...ion.py.exp => asyncio_open_connection.py.exp} | 0 ...ad_headers.py => asyncio_tcp_read_headers.py} | 11 ++++------- ...rs.py.exp => asyncio_tcp_read_headers.py.exp} | 0 tests/run-tests.py | 10 +++++----- tests/unix/extra_coverage.py.exp | 2 +- 81 files changed, 136 insertions(+), 244 deletions(-) rename tests/extmod/{uasyncio_await_return.py => asyncio_await_return.py} (70%) rename tests/extmod/{uasyncio_await_return.py.exp => asyncio_await_return.py.exp} (100%) rename tests/extmod/{uasyncio_basic.py => asyncio_basic.py} (85%) rename tests/extmod/{uasyncio_basic.py.exp => asyncio_basic.py.exp} (100%) rename tests/extmod/{uasyncio_basic2.py => asyncio_basic2.py} (67%) rename tests/extmod/{uasyncio_basic2.py.exp => asyncio_basic2.py.exp} (100%) rename tests/extmod/{uasyncio_cancel_fair.py => asyncio_cancel_fair.py} (84%) rename tests/extmod/{uasyncio_cancel_fair.py.exp => asyncio_cancel_fair.py.exp} (100%) rename tests/extmod/{uasyncio_cancel_fair2.py => asyncio_cancel_fair2.py} (82%) rename tests/extmod/{uasyncio_cancel_fair2.py.exp => asyncio_cancel_fair2.py.exp} (100%) rename tests/extmod/{uasyncio_cancel_self.py => asyncio_cancel_self.py} (76%) rename tests/extmod/{uasyncio_cancel_self.py.exp => asyncio_cancel_self.py.exp} (100%) rename tests/extmod/{uasyncio_cancel_task.py => asyncio_cancel_task.py} (93%) rename tests/extmod/{uasyncio_cancel_task.py.exp => asyncio_cancel_task.py.exp} (100%) rename tests/extmod/{uasyncio_cancel_wait_on_finished.py => asyncio_cancel_wait_on_finished.py} (83%) rename tests/extmod/{uasyncio_cancel_wait_on_finished.py.exp => asyncio_cancel_wait_on_finished.py.exp} (100%) rename tests/extmod/{uasyncio_current_task.py => asyncio_current_task.py} (69%) rename tests/extmod/{uasyncio_current_task.py.exp => asyncio_current_task.py.exp} (100%) rename tests/extmod/{uasyncio_event.py => asyncio_event.py} (93%) rename tests/extmod/{uasyncio_event.py.exp => asyncio_event.py.exp} (100%) rename tests/extmod/{uasyncio_event_fair.py => asyncio_event_fair.py} (83%) rename tests/extmod/{uasyncio_event_fair.py.exp => asyncio_event_fair.py.exp} (100%) rename tests/extmod/{uasyncio_exception.py => asyncio_exception.py} (88%) rename tests/extmod/{uasyncio_exception.py.exp => asyncio_exception.py.exp} (100%) rename tests/extmod/{uasyncio_fair.py => asyncio_fair.py} (80%) rename tests/extmod/{uasyncio_fair.py.exp => asyncio_fair.py.exp} (100%) rename tests/extmod/{uasyncio_gather.py => asyncio_gather.py} (94%) rename tests/extmod/{uasyncio_gather.py.exp => asyncio_gather.py.exp} (100%) rename tests/extmod/{uasyncio_gather_notimpl.py => asyncio_gather_notimpl.py} (85%) rename tests/extmod/{uasyncio_gather_notimpl.py.exp => asyncio_gather_notimpl.py.exp} (100%) rename tests/extmod/{uasyncio_get_event_loop.py => asyncio_get_event_loop.py} (60%) rename tests/extmod/{uasyncio_heaplock.py => asyncio_heaplock.py} (92%) rename tests/extmod/{uasyncio_heaplock.py.exp => asyncio_heaplock.py.exp} (100%) rename tests/extmod/{uasyncio_lock.py => asyncio_lock.py} (94%) rename tests/extmod/{uasyncio_lock.py.exp => asyncio_lock.py.exp} (100%) rename tests/extmod/{uasyncio_lock_cancel.py => asyncio_lock_cancel.py} (90%) rename tests/extmod/{uasyncio_lock_cancel.py.exp => asyncio_lock_cancel.py.exp} (100%) rename tests/extmod/{uasyncio_loop_stop.py => asyncio_loop_stop.py} (83%) rename tests/extmod/{uasyncio_loop_stop.py.exp => asyncio_loop_stop.py.exp} (100%) rename tests/extmod/{uasyncio_micropython.py => asyncio_micropython.py} (66%) rename tests/extmod/{uasyncio_micropython.py.exp => asyncio_micropython.py.exp} (100%) rename tests/extmod/{uasyncio_new_event_loop.py => asyncio_new_event_loop.py} (80%) rename tests/extmod/{uasyncio_new_event_loop.py.exp => asyncio_new_event_loop.py.exp} (100%) rename tests/extmod/{uasyncio_set_exception_handler.py => asyncio_set_exception_handler.py} (90%) rename tests/extmod/{uasyncio_set_exception_handler.py.exp => asyncio_set_exception_handler.py.exp} (100%) rename tests/extmod/{uasyncio_task_done.py => asyncio_task_done.py} (89%) rename tests/extmod/{uasyncio_task_done.py.exp => asyncio_task_done.py.exp} (100%) rename tests/extmod/{uasyncio_threadsafeflag.py => asyncio_threadsafeflag.py} (98%) rename tests/extmod/{uasyncio_threadsafeflag.py.exp => asyncio_threadsafeflag.py.exp} (100%) rename tests/extmod/{uasyncio_wait_for.py => asyncio_wait_for.py} (96%) rename tests/extmod/{uasyncio_wait_for.py.exp => asyncio_wait_for.py.exp} (100%) rename tests/extmod/{uasyncio_wait_for_fwd.py => asyncio_wait_for_fwd.py} (91%) rename tests/extmod/{uasyncio_wait_for_fwd.py.exp => asyncio_wait_for_fwd.py.exp} (100%) rename tests/extmod/{uasyncio_wait_task.py => asyncio_wait_task.py} (90%) rename tests/extmod/{uasyncio_wait_task.py.exp => asyncio_wait_task.py.exp} (100%) rename tests/multi_espnow/{80_uasyncio_client.py => 80_asyncio_client.py} (98%) rename tests/multi_espnow/{80_uasyncio_client.py.exp => 80_asyncio_client.py.exp} (100%) rename tests/multi_espnow/{81_uasyncio_server.py => 81_asyncio_server.py} (98%) rename tests/multi_espnow/{81_uasyncio_server.py.exp => 81_asyncio_server.py.exp} (100%) rename tests/multi_net/{uasyncio_tcp_client_rst.py => asyncio_tcp_client_rst.py} (90%) rename tests/multi_net/{uasyncio_tcp_client_rst.py.exp => asyncio_tcp_client_rst.py.exp} (100%) rename tests/multi_net/{uasyncio_tcp_close_write.py => asyncio_tcp_close_write.py} (87%) rename tests/multi_net/{uasyncio_tcp_close_write.py.exp => asyncio_tcp_close_write.py.exp} (100%) rename tests/multi_net/{uasyncio_tcp_readall.py => asyncio_tcp_readall.py} (84%) rename tests/multi_net/{uasyncio_tcp_readall.py.exp => asyncio_tcp_readall.py.exp} (100%) rename tests/multi_net/{uasyncio_tcp_readexactly.py => asyncio_tcp_readexactly.py} (86%) rename tests/multi_net/{uasyncio_tcp_readexactly.py.exp => asyncio_tcp_readexactly.py.exp} (100%) rename tests/multi_net/{uasyncio_tcp_readinto.py => asyncio_tcp_readinto.py} (86%) rename tests/multi_net/{uasyncio_tcp_readinto.py.exp => asyncio_tcp_readinto.py.exp} (100%) rename tests/multi_net/{uasyncio_tcp_server_client.py => asyncio_tcp_server_client.py} (83%) rename tests/multi_net/{uasyncio_tcp_server_client.py.exp => asyncio_tcp_server_client.py.exp} (100%) rename tests/net_hosted/{uasyncio_start_server.py => asyncio_start_server.py} (72%) rename tests/net_hosted/{uasyncio_start_server.py.exp => asyncio_start_server.py.exp} (100%) rename tests/net_inet/{uasyncio_cancel_stream.py => asyncio_cancel_stream.py} (81%) rename tests/net_inet/{uasyncio_cancel_stream.py.exp => asyncio_cancel_stream.py.exp} (100%) rename tests/net_inet/{uasyncio_open_connection.py => asyncio_open_connection.py} (69%) rename tests/net_inet/{uasyncio_open_connection.py.exp => asyncio_open_connection.py.exp} (100%) rename tests/net_inet/{uasyncio_tcp_read_headers.py => asyncio_tcp_read_headers.py} (77%) rename tests/net_inet/{uasyncio_tcp_read_headers.py.exp => asyncio_tcp_read_headers.py.exp} (100%) diff --git a/tests/extmod/uasyncio_await_return.py b/tests/extmod/asyncio_await_return.py similarity index 70% rename from tests/extmod/uasyncio_await_return.py rename to tests/extmod/asyncio_await_return.py index d375c9ea97..35f214b99a 100644 --- a/tests/extmod/uasyncio_await_return.py +++ b/tests/extmod/asyncio_await_return.py @@ -1,13 +1,10 @@ # Test that tasks return their value correctly to the caller try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def foo(): diff --git a/tests/extmod/uasyncio_await_return.py.exp b/tests/extmod/asyncio_await_return.py.exp similarity index 100% rename from tests/extmod/uasyncio_await_return.py.exp rename to tests/extmod/asyncio_await_return.py.exp diff --git a/tests/extmod/uasyncio_basic.py b/tests/extmod/asyncio_basic.py similarity index 85% rename from tests/extmod/uasyncio_basic.py rename to tests/extmod/asyncio_basic.py index 3858e4fdd5..ca37c7bcb0 100644 --- a/tests/extmod/uasyncio_basic.py +++ b/tests/extmod/asyncio_basic.py @@ -1,11 +1,8 @@ try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit import time diff --git a/tests/extmod/uasyncio_basic.py.exp b/tests/extmod/asyncio_basic.py.exp similarity index 100% rename from tests/extmod/uasyncio_basic.py.exp rename to tests/extmod/asyncio_basic.py.exp diff --git a/tests/extmod/uasyncio_basic2.py b/tests/extmod/asyncio_basic2.py similarity index 67% rename from tests/extmod/uasyncio_basic2.py rename to tests/extmod/asyncio_basic2.py index a2167e48ee..3040b6aa51 100644 --- a/tests/extmod/uasyncio_basic2.py +++ b/tests/extmod/asyncio_basic2.py @@ -1,11 +1,8 @@ try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def forever(): diff --git a/tests/extmod/uasyncio_basic2.py.exp b/tests/extmod/asyncio_basic2.py.exp similarity index 100% rename from tests/extmod/uasyncio_basic2.py.exp rename to tests/extmod/asyncio_basic2.py.exp diff --git a/tests/extmod/uasyncio_cancel_fair.py b/tests/extmod/asyncio_cancel_fair.py similarity index 84% rename from tests/extmod/uasyncio_cancel_fair.py rename to tests/extmod/asyncio_cancel_fair.py index 9a7b35c161..a1e35f82ba 100644 --- a/tests/extmod/uasyncio_cancel_fair.py +++ b/tests/extmod/asyncio_cancel_fair.py @@ -2,13 +2,10 @@ # That tasks which continuously cancel each other don't take over the scheduler try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def task(id, other): diff --git a/tests/extmod/uasyncio_cancel_fair.py.exp b/tests/extmod/asyncio_cancel_fair.py.exp similarity index 100% rename from tests/extmod/uasyncio_cancel_fair.py.exp rename to tests/extmod/asyncio_cancel_fair.py.exp diff --git a/tests/extmod/uasyncio_cancel_fair2.py b/tests/extmod/asyncio_cancel_fair2.py similarity index 82% rename from tests/extmod/uasyncio_cancel_fair2.py rename to tests/extmod/asyncio_cancel_fair2.py index 46e40f71b1..577823204f 100644 --- a/tests/extmod/uasyncio_cancel_fair2.py +++ b/tests/extmod/asyncio_cancel_fair2.py @@ -2,13 +2,10 @@ # That tasks which keeps being cancelled by multiple other tasks gets a chance to run try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def task_a(): diff --git a/tests/extmod/uasyncio_cancel_fair2.py.exp b/tests/extmod/asyncio_cancel_fair2.py.exp similarity index 100% rename from tests/extmod/uasyncio_cancel_fair2.py.exp rename to tests/extmod/asyncio_cancel_fair2.py.exp diff --git a/tests/extmod/uasyncio_cancel_self.py b/tests/extmod/asyncio_cancel_self.py similarity index 76% rename from tests/extmod/uasyncio_cancel_self.py rename to tests/extmod/asyncio_cancel_self.py index 660ae66389..a437edb540 100644 --- a/tests/extmod/uasyncio_cancel_self.py +++ b/tests/extmod/asyncio_cancel_self.py @@ -1,13 +1,10 @@ # Test a task cancelling itself (currently unsupported) try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def task(): diff --git a/tests/extmod/uasyncio_cancel_self.py.exp b/tests/extmod/asyncio_cancel_self.py.exp similarity index 100% rename from tests/extmod/uasyncio_cancel_self.py.exp rename to tests/extmod/asyncio_cancel_self.py.exp diff --git a/tests/extmod/uasyncio_cancel_task.py b/tests/extmod/asyncio_cancel_task.py similarity index 93% rename from tests/extmod/uasyncio_cancel_task.py rename to tests/extmod/asyncio_cancel_task.py index ec60d85545..9250f46b51 100644 --- a/tests/extmod/uasyncio_cancel_task.py +++ b/tests/extmod/asyncio_cancel_task.py @@ -1,13 +1,10 @@ # Test cancelling a task try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def task(s, allow_cancel): diff --git a/tests/extmod/uasyncio_cancel_task.py.exp b/tests/extmod/asyncio_cancel_task.py.exp similarity index 100% rename from tests/extmod/uasyncio_cancel_task.py.exp rename to tests/extmod/asyncio_cancel_task.py.exp diff --git a/tests/extmod/uasyncio_cancel_wait_on_finished.py b/tests/extmod/asyncio_cancel_wait_on_finished.py similarity index 83% rename from tests/extmod/uasyncio_cancel_wait_on_finished.py rename to tests/extmod/asyncio_cancel_wait_on_finished.py index 66b36dd60d..c3529b8d7a 100644 --- a/tests/extmod/uasyncio_cancel_wait_on_finished.py +++ b/tests/extmod/asyncio_cancel_wait_on_finished.py @@ -1,13 +1,10 @@ # Test cancelling a task that is waiting on a task that just finishes. try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def sleep_task(): diff --git a/tests/extmod/uasyncio_cancel_wait_on_finished.py.exp b/tests/extmod/asyncio_cancel_wait_on_finished.py.exp similarity index 100% rename from tests/extmod/uasyncio_cancel_wait_on_finished.py.exp rename to tests/extmod/asyncio_cancel_wait_on_finished.py.exp diff --git a/tests/extmod/uasyncio_current_task.py b/tests/extmod/asyncio_current_task.py similarity index 69% rename from tests/extmod/uasyncio_current_task.py rename to tests/extmod/asyncio_current_task.py index 3165a2cf16..18058230f2 100644 --- a/tests/extmod/uasyncio_current_task.py +++ b/tests/extmod/asyncio_current_task.py @@ -1,13 +1,10 @@ # Test current_task() function try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def task(result): diff --git a/tests/extmod/uasyncio_current_task.py.exp b/tests/extmod/asyncio_current_task.py.exp similarity index 100% rename from tests/extmod/uasyncio_current_task.py.exp rename to tests/extmod/asyncio_current_task.py.exp diff --git a/tests/extmod/uasyncio_event.py b/tests/extmod/asyncio_event.py similarity index 93% rename from tests/extmod/uasyncio_event.py rename to tests/extmod/asyncio_event.py index fb8eb9ffa4..290323a7de 100644 --- a/tests/extmod/uasyncio_event.py +++ b/tests/extmod/asyncio_event.py @@ -1,13 +1,10 @@ # Test Event class try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def task(id, ev): diff --git a/tests/extmod/uasyncio_event.py.exp b/tests/extmod/asyncio_event.py.exp similarity index 100% rename from tests/extmod/uasyncio_event.py.exp rename to tests/extmod/asyncio_event.py.exp diff --git a/tests/extmod/uasyncio_event_fair.py b/tests/extmod/asyncio_event_fair.py similarity index 83% rename from tests/extmod/uasyncio_event_fair.py rename to tests/extmod/asyncio_event_fair.py index 37eca5faef..ed34f3f0b5 100644 --- a/tests/extmod/uasyncio_event_fair.py +++ b/tests/extmod/asyncio_event_fair.py @@ -2,13 +2,10 @@ # That tasks which continuously wait on events don't take over the scheduler try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def task1(id): diff --git a/tests/extmod/uasyncio_event_fair.py.exp b/tests/extmod/asyncio_event_fair.py.exp similarity index 100% rename from tests/extmod/uasyncio_event_fair.py.exp rename to tests/extmod/asyncio_event_fair.py.exp diff --git a/tests/extmod/uasyncio_exception.py b/tests/extmod/asyncio_exception.py similarity index 88% rename from tests/extmod/uasyncio_exception.py rename to tests/extmod/asyncio_exception.py index 4e4f978dc2..6f19509bac 100644 --- a/tests/extmod/uasyncio_exception.py +++ b/tests/extmod/asyncio_exception.py @@ -1,13 +1,10 @@ # Test general exception handling try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit # main task raising an exception diff --git a/tests/extmod/uasyncio_exception.py.exp b/tests/extmod/asyncio_exception.py.exp similarity index 100% rename from tests/extmod/uasyncio_exception.py.exp rename to tests/extmod/asyncio_exception.py.exp diff --git a/tests/extmod/uasyncio_fair.py b/tests/extmod/asyncio_fair.py similarity index 80% rename from tests/extmod/uasyncio_fair.py rename to tests/extmod/asyncio_fair.py index e225706054..43076fef1d 100644 --- a/tests/extmod/uasyncio_fair.py +++ b/tests/extmod/asyncio_fair.py @@ -1,13 +1,10 @@ # Test fairness of scheduler try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def task(id, t): diff --git a/tests/extmod/uasyncio_fair.py.exp b/tests/extmod/asyncio_fair.py.exp similarity index 100% rename from tests/extmod/uasyncio_fair.py.exp rename to tests/extmod/asyncio_fair.py.exp diff --git a/tests/extmod/uasyncio_gather.py b/tests/extmod/asyncio_gather.py similarity index 94% rename from tests/extmod/uasyncio_gather.py rename to tests/extmod/asyncio_gather.py index af6ea555ab..78a40ba3aa 100644 --- a/tests/extmod/uasyncio_gather.py +++ b/tests/extmod/asyncio_gather.py @@ -1,13 +1,10 @@ -# test uasyncio.gather() function +# test asyncio.gather() function try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def factorial(name, number): diff --git a/tests/extmod/uasyncio_gather.py.exp b/tests/extmod/asyncio_gather.py.exp similarity index 100% rename from tests/extmod/uasyncio_gather.py.exp rename to tests/extmod/asyncio_gather.py.exp diff --git a/tests/extmod/uasyncio_gather_notimpl.py b/tests/extmod/asyncio_gather_notimpl.py similarity index 85% rename from tests/extmod/uasyncio_gather_notimpl.py rename to tests/extmod/asyncio_gather_notimpl.py index 3ebab9bad6..98f9a9368f 100644 --- a/tests/extmod/uasyncio_gather_notimpl.py +++ b/tests/extmod/asyncio_gather_notimpl.py @@ -1,13 +1,10 @@ -# Test uasyncio.gather() function, features that are not implemented. +# Test asyncio.gather() function, features that are not implemented. try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit def custom_handler(loop, context): diff --git a/tests/extmod/uasyncio_gather_notimpl.py.exp b/tests/extmod/asyncio_gather_notimpl.py.exp similarity index 100% rename from tests/extmod/uasyncio_gather_notimpl.py.exp rename to tests/extmod/asyncio_gather_notimpl.py.exp diff --git a/tests/extmod/uasyncio_get_event_loop.py b/tests/extmod/asyncio_get_event_loop.py similarity index 60% rename from tests/extmod/uasyncio_get_event_loop.py rename to tests/extmod/asyncio_get_event_loop.py index 8ccbd6814e..b2d50e3cba 100644 --- a/tests/extmod/uasyncio_get_event_loop.py +++ b/tests/extmod/asyncio_get_event_loop.py @@ -1,13 +1,10 @@ # Test get_event_loop() try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def main(): diff --git a/tests/extmod/uasyncio_heaplock.py b/tests/extmod/asyncio_heaplock.py similarity index 92% rename from tests/extmod/uasyncio_heaplock.py rename to tests/extmod/asyncio_heaplock.py index 9c9487357a..8326443f0e 100644 --- a/tests/extmod/uasyncio_heaplock.py +++ b/tests/extmod/asyncio_heaplock.py @@ -1,6 +1,6 @@ # test that the following do not use the heap: # - basic scheduling of tasks -# - uasyncio.sleep_ms +# - asyncio.sleep_ms # - StreamWriter.write, stream is blocked and data to write is a bytes object # - StreamWriter.write, when stream is not blocked @@ -25,13 +25,10 @@ except RuntimeError: raise SystemExit try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit class TestStream: diff --git a/tests/extmod/uasyncio_heaplock.py.exp b/tests/extmod/asyncio_heaplock.py.exp similarity index 100% rename from tests/extmod/uasyncio_heaplock.py.exp rename to tests/extmod/asyncio_heaplock.py.exp diff --git a/tests/extmod/uasyncio_lock.py b/tests/extmod/asyncio_lock.py similarity index 94% rename from tests/extmod/uasyncio_lock.py rename to tests/extmod/asyncio_lock.py index 096a8c82be..f565adb03f 100644 --- a/tests/extmod/uasyncio_lock.py +++ b/tests/extmod/asyncio_lock.py @@ -1,13 +1,10 @@ # Test Lock class try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def task_loop(id, lock): diff --git a/tests/extmod/uasyncio_lock.py.exp b/tests/extmod/asyncio_lock.py.exp similarity index 100% rename from tests/extmod/uasyncio_lock.py.exp rename to tests/extmod/asyncio_lock.py.exp diff --git a/tests/extmod/uasyncio_lock_cancel.py b/tests/extmod/asyncio_lock_cancel.py similarity index 90% rename from tests/extmod/uasyncio_lock_cancel.py rename to tests/extmod/asyncio_lock_cancel.py index 85b8df8483..c81bb3c7ba 100644 --- a/tests/extmod/uasyncio_lock_cancel.py +++ b/tests/extmod/asyncio_lock_cancel.py @@ -1,13 +1,10 @@ # Test that locks work when cancelling multiple waiters on the lock try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def task(i, lock, lock_flag): diff --git a/tests/extmod/uasyncio_lock_cancel.py.exp b/tests/extmod/asyncio_lock_cancel.py.exp similarity index 100% rename from tests/extmod/uasyncio_lock_cancel.py.exp rename to tests/extmod/asyncio_lock_cancel.py.exp diff --git a/tests/extmod/uasyncio_loop_stop.py b/tests/extmod/asyncio_loop_stop.py similarity index 83% rename from tests/extmod/uasyncio_loop_stop.py rename to tests/extmod/asyncio_loop_stop.py index 23507f9a7e..b4bd0c74ad 100644 --- a/tests/extmod/uasyncio_loop_stop.py +++ b/tests/extmod/asyncio_loop_stop.py @@ -1,13 +1,10 @@ # Test Loop.stop() to stop the event loop try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def task(): diff --git a/tests/extmod/uasyncio_loop_stop.py.exp b/tests/extmod/asyncio_loop_stop.py.exp similarity index 100% rename from tests/extmod/uasyncio_loop_stop.py.exp rename to tests/extmod/asyncio_loop_stop.py.exp diff --git a/tests/extmod/uasyncio_micropython.py b/tests/extmod/asyncio_micropython.py similarity index 66% rename from tests/extmod/uasyncio_micropython.py rename to tests/extmod/asyncio_micropython.py index de1687ca8b..cc96d34be2 100644 --- a/tests/extmod/uasyncio_micropython.py +++ b/tests/extmod/asyncio_micropython.py @@ -3,7 +3,7 @@ # - wait_for_ms try: - import time, uasyncio + import time, asyncio except ImportError: print("SKIP") raise SystemExit @@ -11,7 +11,7 @@ except ImportError: async def task(id, t): print("task start", id) - await uasyncio.sleep_ms(t) + await asyncio.sleep_ms(t) print("task end", id) return id * 2 @@ -19,25 +19,25 @@ async def task(id, t): async def main(): # Simple sleep_ms t0 = time.ticks_ms() - await uasyncio.sleep_ms(1) + await asyncio.sleep_ms(1) print(time.ticks_diff(time.ticks_ms(), t0) < 100) try: # Sleep 1ms beyond maximum allowed sleep value - await uasyncio.sleep_ms(time.ticks_add(0, -1) // 2 + 1) + await asyncio.sleep_ms(time.ticks_add(0, -1) // 2 + 1) except OverflowError: print("OverflowError") # When task finished before the timeout - print(await uasyncio.wait_for_ms(task(1, 5), 50)) + print(await asyncio.wait_for_ms(task(1, 5), 50)) # When timeout passes and task is cancelled try: - print(await uasyncio.wait_for_ms(task(2, 50), 5)) - except uasyncio.TimeoutError: + print(await asyncio.wait_for_ms(task(2, 50), 5)) + except asyncio.TimeoutError: print("timeout") print("finish") -uasyncio.run(main()) +asyncio.run(main()) diff --git a/tests/extmod/uasyncio_micropython.py.exp b/tests/extmod/asyncio_micropython.py.exp similarity index 100% rename from tests/extmod/uasyncio_micropython.py.exp rename to tests/extmod/asyncio_micropython.py.exp diff --git a/tests/extmod/uasyncio_new_event_loop.py b/tests/extmod/asyncio_new_event_loop.py similarity index 80% rename from tests/extmod/uasyncio_new_event_loop.py rename to tests/extmod/asyncio_new_event_loop.py index b711befba9..a3feb02126 100644 --- a/tests/extmod/uasyncio_new_event_loop.py +++ b/tests/extmod/asyncio_new_event_loop.py @@ -1,13 +1,10 @@ # Test Loop.new_event_loop() try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def task(): diff --git a/tests/extmod/uasyncio_new_event_loop.py.exp b/tests/extmod/asyncio_new_event_loop.py.exp similarity index 100% rename from tests/extmod/uasyncio_new_event_loop.py.exp rename to tests/extmod/asyncio_new_event_loop.py.exp diff --git a/tests/extmod/uasyncio_set_exception_handler.py b/tests/extmod/asyncio_set_exception_handler.py similarity index 90% rename from tests/extmod/uasyncio_set_exception_handler.py rename to tests/extmod/asyncio_set_exception_handler.py index fe7b83eb4d..5935f0f4eb 100644 --- a/tests/extmod/uasyncio_set_exception_handler.py +++ b/tests/extmod/asyncio_set_exception_handler.py @@ -1,13 +1,10 @@ # Test that tasks return their value correctly to the caller try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit def custom_handler(loop, context): diff --git a/tests/extmod/uasyncio_set_exception_handler.py.exp b/tests/extmod/asyncio_set_exception_handler.py.exp similarity index 100% rename from tests/extmod/uasyncio_set_exception_handler.py.exp rename to tests/extmod/asyncio_set_exception_handler.py.exp diff --git a/tests/extmod/uasyncio_task_done.py b/tests/extmod/asyncio_task_done.py similarity index 89% rename from tests/extmod/uasyncio_task_done.py rename to tests/extmod/asyncio_task_done.py index 2700da8c34..7cc493a122 100644 --- a/tests/extmod/uasyncio_task_done.py +++ b/tests/extmod/asyncio_task_done.py @@ -1,13 +1,10 @@ # Test the Task.done() method try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def task(t, exc=None): diff --git a/tests/extmod/uasyncio_task_done.py.exp b/tests/extmod/asyncio_task_done.py.exp similarity index 100% rename from tests/extmod/uasyncio_task_done.py.exp rename to tests/extmod/asyncio_task_done.py.exp diff --git a/tests/extmod/uasyncio_threadsafeflag.py b/tests/extmod/asyncio_threadsafeflag.py similarity index 98% rename from tests/extmod/uasyncio_threadsafeflag.py rename to tests/extmod/asyncio_threadsafeflag.py index f97b138498..46da1b7b48 100644 --- a/tests/extmod/uasyncio_threadsafeflag.py +++ b/tests/extmod/asyncio_threadsafeflag.py @@ -1,7 +1,7 @@ # Test Event class try: - import uasyncio as asyncio + import asyncio except ImportError: print("SKIP") raise SystemExit diff --git a/tests/extmod/uasyncio_threadsafeflag.py.exp b/tests/extmod/asyncio_threadsafeflag.py.exp similarity index 100% rename from tests/extmod/uasyncio_threadsafeflag.py.exp rename to tests/extmod/asyncio_threadsafeflag.py.exp diff --git a/tests/extmod/uasyncio_wait_for.py b/tests/extmod/asyncio_wait_for.py similarity index 96% rename from tests/extmod/uasyncio_wait_for.py rename to tests/extmod/asyncio_wait_for.py index c636c7dd74..f973e46f4c 100644 --- a/tests/extmod/uasyncio_wait_for.py +++ b/tests/extmod/asyncio_wait_for.py @@ -1,13 +1,10 @@ # Test asyncio.wait_for try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def task(id, t): diff --git a/tests/extmod/uasyncio_wait_for.py.exp b/tests/extmod/asyncio_wait_for.py.exp similarity index 100% rename from tests/extmod/uasyncio_wait_for.py.exp rename to tests/extmod/asyncio_wait_for.py.exp diff --git a/tests/extmod/uasyncio_wait_for_fwd.py b/tests/extmod/asyncio_wait_for_fwd.py similarity index 91% rename from tests/extmod/uasyncio_wait_for_fwd.py rename to tests/extmod/asyncio_wait_for_fwd.py index 33738085ce..9ec734fae6 100644 --- a/tests/extmod/uasyncio_wait_for_fwd.py +++ b/tests/extmod/asyncio_wait_for_fwd.py @@ -1,13 +1,10 @@ # Test asyncio.wait_for, with forwarding cancellation try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def awaiting(t, return_if_fail): diff --git a/tests/extmod/uasyncio_wait_for_fwd.py.exp b/tests/extmod/asyncio_wait_for_fwd.py.exp similarity index 100% rename from tests/extmod/uasyncio_wait_for_fwd.py.exp rename to tests/extmod/asyncio_wait_for_fwd.py.exp diff --git a/tests/extmod/uasyncio_wait_task.py b/tests/extmod/asyncio_wait_task.py similarity index 90% rename from tests/extmod/uasyncio_wait_task.py rename to tests/extmod/asyncio_wait_task.py index 1d70ddf720..bce426d971 100644 --- a/tests/extmod/uasyncio_wait_task.py +++ b/tests/extmod/asyncio_wait_task.py @@ -1,13 +1,10 @@ # Test waiting on a task try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit import time diff --git a/tests/extmod/uasyncio_wait_task.py.exp b/tests/extmod/asyncio_wait_task.py.exp similarity index 100% rename from tests/extmod/uasyncio_wait_task.py.exp rename to tests/extmod/asyncio_wait_task.py.exp diff --git a/tests/multi_espnow/80_uasyncio_client.py b/tests/multi_espnow/80_asyncio_client.py similarity index 98% rename from tests/multi_espnow/80_uasyncio_client.py rename to tests/multi_espnow/80_asyncio_client.py index fa2918cc03..4d58a451c1 100644 --- a/tests/multi_espnow/80_uasyncio_client.py +++ b/tests/multi_espnow/80_asyncio_client.py @@ -102,7 +102,7 @@ def instance0(): # Client def instance1(): try: - import uasyncio as asyncio + import asyncio from aioespnow import AIOESPNow except ImportError: print("SKIP") diff --git a/tests/multi_espnow/80_uasyncio_client.py.exp b/tests/multi_espnow/80_asyncio_client.py.exp similarity index 100% rename from tests/multi_espnow/80_uasyncio_client.py.exp rename to tests/multi_espnow/80_asyncio_client.py.exp diff --git a/tests/multi_espnow/81_uasyncio_server.py b/tests/multi_espnow/81_asyncio_server.py similarity index 98% rename from tests/multi_espnow/81_uasyncio_server.py rename to tests/multi_espnow/81_asyncio_server.py index ee098b7f3b..df1dbb2ac8 100644 --- a/tests/multi_espnow/81_uasyncio_server.py +++ b/tests/multi_espnow/81_asyncio_server.py @@ -58,7 +58,7 @@ async def echo_server(e): # Server def instance0(): try: - import uasyncio as asyncio + import asyncio from aioespnow import AIOESPNow except ImportError: print("SKIP") diff --git a/tests/multi_espnow/81_uasyncio_server.py.exp b/tests/multi_espnow/81_asyncio_server.py.exp similarity index 100% rename from tests/multi_espnow/81_uasyncio_server.py.exp rename to tests/multi_espnow/81_asyncio_server.py.exp diff --git a/tests/multi_net/uasyncio_tcp_client_rst.py b/tests/multi_net/asyncio_tcp_client_rst.py similarity index 90% rename from tests/multi_net/uasyncio_tcp_client_rst.py rename to tests/multi_net/asyncio_tcp_client_rst.py index d81f22748e..af70c2e22e 100644 --- a/tests/multi_net/uasyncio_tcp_client_rst.py +++ b/tests/multi_net/asyncio_tcp_client_rst.py @@ -1,13 +1,10 @@ # Test TCP server with client issuing TCP RST part way through read try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit import struct, time, socket diff --git a/tests/multi_net/uasyncio_tcp_client_rst.py.exp b/tests/multi_net/asyncio_tcp_client_rst.py.exp similarity index 100% rename from tests/multi_net/uasyncio_tcp_client_rst.py.exp rename to tests/multi_net/asyncio_tcp_client_rst.py.exp diff --git a/tests/multi_net/uasyncio_tcp_close_write.py b/tests/multi_net/asyncio_tcp_close_write.py similarity index 87% rename from tests/multi_net/uasyncio_tcp_close_write.py rename to tests/multi_net/asyncio_tcp_close_write.py index 5698ed8b16..d1892fe895 100644 --- a/tests/multi_net/uasyncio_tcp_close_write.py +++ b/tests/multi_net/asyncio_tcp_close_write.py @@ -1,13 +1,10 @@ -# Test uasyncio TCP stream closing then writing +# Test asyncio TCP stream closing then writing try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit PORT = 8000 diff --git a/tests/multi_net/uasyncio_tcp_close_write.py.exp b/tests/multi_net/asyncio_tcp_close_write.py.exp similarity index 100% rename from tests/multi_net/uasyncio_tcp_close_write.py.exp rename to tests/multi_net/asyncio_tcp_close_write.py.exp diff --git a/tests/multi_net/uasyncio_tcp_readall.py b/tests/multi_net/asyncio_tcp_readall.py similarity index 84% rename from tests/multi_net/uasyncio_tcp_readall.py rename to tests/multi_net/asyncio_tcp_readall.py index c411f1c69d..66ad97549c 100644 --- a/tests/multi_net/uasyncio_tcp_readall.py +++ b/tests/multi_net/asyncio_tcp_readall.py @@ -1,13 +1,10 @@ -# Test uasyncio stream read(-1) method using TCP server/client +# Test asyncio stream read(-1) method using TCP server/client try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit PORT = 8000 diff --git a/tests/multi_net/uasyncio_tcp_readall.py.exp b/tests/multi_net/asyncio_tcp_readall.py.exp similarity index 100% rename from tests/multi_net/uasyncio_tcp_readall.py.exp rename to tests/multi_net/asyncio_tcp_readall.py.exp diff --git a/tests/multi_net/uasyncio_tcp_readexactly.py b/tests/multi_net/asyncio_tcp_readexactly.py similarity index 86% rename from tests/multi_net/uasyncio_tcp_readexactly.py rename to tests/multi_net/asyncio_tcp_readexactly.py index 71d8c6d0e9..2c8df1f30a 100644 --- a/tests/multi_net/uasyncio_tcp_readexactly.py +++ b/tests/multi_net/asyncio_tcp_readexactly.py @@ -1,13 +1,10 @@ -# Test uasyncio stream readexactly() method using TCP server/client +# Test asyncio stream readexactly() method using TCP server/client try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit PORT = 8000 diff --git a/tests/multi_net/uasyncio_tcp_readexactly.py.exp b/tests/multi_net/asyncio_tcp_readexactly.py.exp similarity index 100% rename from tests/multi_net/uasyncio_tcp_readexactly.py.exp rename to tests/multi_net/asyncio_tcp_readexactly.py.exp diff --git a/tests/multi_net/uasyncio_tcp_readinto.py b/tests/multi_net/asyncio_tcp_readinto.py similarity index 86% rename from tests/multi_net/uasyncio_tcp_readinto.py rename to tests/multi_net/asyncio_tcp_readinto.py index 647c06b8aa..563b640e13 100644 --- a/tests/multi_net/uasyncio_tcp_readinto.py +++ b/tests/multi_net/asyncio_tcp_readinto.py @@ -1,13 +1,10 @@ -# Test uasyncio stream readinto() method using TCP server/client +# Test asyncio stream readinto() method using TCP server/client try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit try: import array diff --git a/tests/multi_net/uasyncio_tcp_readinto.py.exp b/tests/multi_net/asyncio_tcp_readinto.py.exp similarity index 100% rename from tests/multi_net/uasyncio_tcp_readinto.py.exp rename to tests/multi_net/asyncio_tcp_readinto.py.exp diff --git a/tests/multi_net/uasyncio_tcp_server_client.py b/tests/multi_net/asyncio_tcp_server_client.py similarity index 83% rename from tests/multi_net/uasyncio_tcp_server_client.py rename to tests/multi_net/asyncio_tcp_server_client.py index 6a8cb58de5..6c4aaf2b7e 100644 --- a/tests/multi_net/uasyncio_tcp_server_client.py +++ b/tests/multi_net/asyncio_tcp_server_client.py @@ -1,13 +1,10 @@ -# Test uasyncio TCP server and client using start_server() and open_connection() +# Test asyncio TCP server and client using start_server() and open_connection() try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit PORT = 8000 diff --git a/tests/multi_net/uasyncio_tcp_server_client.py.exp b/tests/multi_net/asyncio_tcp_server_client.py.exp similarity index 100% rename from tests/multi_net/uasyncio_tcp_server_client.py.exp rename to tests/multi_net/asyncio_tcp_server_client.py.exp diff --git a/tests/net_hosted/uasyncio_start_server.py b/tests/net_hosted/asyncio_start_server.py similarity index 72% rename from tests/net_hosted/uasyncio_start_server.py rename to tests/net_hosted/asyncio_start_server.py index f13402979f..3162218981 100644 --- a/tests/net_hosted/uasyncio_start_server.py +++ b/tests/net_hosted/asyncio_start_server.py @@ -1,13 +1,10 @@ -# Test basic behaviour of uasyncio.start_server() +# Test basic behaviour of asyncio.start_server() try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def test(): diff --git a/tests/net_hosted/uasyncio_start_server.py.exp b/tests/net_hosted/asyncio_start_server.py.exp similarity index 100% rename from tests/net_hosted/uasyncio_start_server.py.exp rename to tests/net_hosted/asyncio_start_server.py.exp diff --git a/tests/net_inet/uasyncio_cancel_stream.py b/tests/net_inet/asyncio_cancel_stream.py similarity index 81% rename from tests/net_inet/uasyncio_cancel_stream.py rename to tests/net_inet/asyncio_cancel_stream.py index 6b6b845b0f..a192736576 100644 --- a/tests/net_inet/uasyncio_cancel_stream.py +++ b/tests/net_inet/asyncio_cancel_stream.py @@ -1,13 +1,10 @@ # Test cancelling a task waiting on stream IO try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def get(reader): diff --git a/tests/net_inet/uasyncio_cancel_stream.py.exp b/tests/net_inet/asyncio_cancel_stream.py.exp similarity index 100% rename from tests/net_inet/uasyncio_cancel_stream.py.exp rename to tests/net_inet/asyncio_cancel_stream.py.exp diff --git a/tests/net_inet/uasyncio_open_connection.py b/tests/net_inet/asyncio_open_connection.py similarity index 69% rename from tests/net_inet/uasyncio_open_connection.py rename to tests/net_inet/asyncio_open_connection.py index 68285a2437..505f3c16bf 100644 --- a/tests/net_inet/uasyncio_open_connection.py +++ b/tests/net_inet/asyncio_open_connection.py @@ -1,13 +1,10 @@ -# Test simple HTTP request with uasyncio.open_connection() +# Test simple HTTP request with asyncio.open_connection() try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def http_get(url): diff --git a/tests/net_inet/uasyncio_open_connection.py.exp b/tests/net_inet/asyncio_open_connection.py.exp similarity index 100% rename from tests/net_inet/uasyncio_open_connection.py.exp rename to tests/net_inet/asyncio_open_connection.py.exp diff --git a/tests/net_inet/uasyncio_tcp_read_headers.py b/tests/net_inet/asyncio_tcp_read_headers.py similarity index 77% rename from tests/net_inet/uasyncio_tcp_read_headers.py rename to tests/net_inet/asyncio_tcp_read_headers.py index e8087aeedf..ec334d8bf4 100644 --- a/tests/net_inet/uasyncio_tcp_read_headers.py +++ b/tests/net_inet/asyncio_tcp_read_headers.py @@ -1,13 +1,10 @@ -# Test uasyncio.open_connection() and stream readline() +# Test asyncio.open_connection() and stream readline() try: - import uasyncio as asyncio + import asyncio except ImportError: - try: - import asyncio - except ImportError: - print("SKIP") - raise SystemExit + print("SKIP") + raise SystemExit async def http_get_headers(url): diff --git a/tests/net_inet/uasyncio_tcp_read_headers.py.exp b/tests/net_inet/asyncio_tcp_read_headers.py.exp similarity index 100% rename from tests/net_inet/uasyncio_tcp_read_headers.py.exp rename to tests/net_inet/asyncio_tcp_read_headers.py.exp diff --git a/tests/run-tests.py b/tests/run-tests.py index 4964ff49fd..6fee9d9183 100755 --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -624,10 +624,10 @@ def run_tests(pyb, tests, args, result_dir, num_threads=1): skip_tests.add("basics/sys_tracebacklimit.py") # requires traceback info skip_tests.add("basics/try_finally_return2.py") # requires raise_varargs skip_tests.add("basics/unboundlocal.py") # requires checking for unbound local - skip_tests.add("extmod/uasyncio_event.py") # unknown issue - skip_tests.add("extmod/uasyncio_lock.py") # requires async with - skip_tests.add("extmod/uasyncio_micropython.py") # unknown issue - skip_tests.add("extmod/uasyncio_wait_for.py") # unknown issue + skip_tests.add("extmod/asyncio_event.py") # unknown issue + skip_tests.add("extmod/asyncio_lock.py") # requires async with + skip_tests.add("extmod/asyncio_micropython.py") # unknown issue + skip_tests.add("extmod/asyncio_wait_for.py") # unknown issue skip_tests.add("misc/features.py") # requires raise_varargs skip_tests.add( "misc/print_exception.py" @@ -672,7 +672,7 @@ def run_tests(pyb, tests, args, result_dir, num_threads=1): is_bytearray = test_name.startswith("bytearray") or test_name.endswith("_bytearray") is_set_type = test_name.startswith(("set_", "frozenset")) or test_name.endswith("_set") is_slice = test_name.find("slice") != -1 or test_name in misc_slice_tests - is_async = test_name.startswith(("async_", "uasyncio_")) + is_async = test_name.startswith(("async_", "asyncio_")) is_const = test_name.startswith("const") is_io_module = test_name.startswith("io_") is_fstring = test_name.startswith("string_fstring") diff --git a/tests/unix/extra_coverage.py.exp b/tests/unix/extra_coverage.py.exp index 04aefcfe2f..013782ede5 100644 --- a/tests/unix/extra_coverage.py.exp +++ b/tests/unix/extra_coverage.py.exp @@ -50,7 +50,7 @@ RuntimeError: ame__ port -builtins micropython _thread _uasyncio +builtins micropython _asyncio _thread array binascii btree cexample cmath collections cppexample cryptolib errno example_package ffi