Skip to content

Commit 6bb446b

Browse files
committed
tests/extmod: Remove asyncio .exp files that match CPython output.
These were added back in commit c4935f3 because the tests required CPython 3.8, which was quite new at the time. But CPython 3.8 was released over 4 years ago (October 2019) and the CI test runners, and developers, have this (or a more recent) CPython version. Removing the .exp files also helps keep MicroPython semantics the same as CPython. The asyncio_fair.py test it adjusted slightly to have more deterministic timing and output. Signed-off-by: Damien George <[email protected]>
1 parent 8eb658f commit 6bb446b

18 files changed

+5
-204
lines changed

tests/extmod/asyncio_await_return.py.exp

Lines changed: 0 additions & 2 deletions
This file was deleted.

tests/extmod/asyncio_basic2.py.exp

Lines changed: 0 additions & 4 deletions
This file was deleted.

tests/extmod/asyncio_cancel_fair.py.exp

Lines changed: 0 additions & 24 deletions
This file was deleted.

tests/extmod/asyncio_cancel_fair2.py.exp

Lines changed: 0 additions & 8 deletions
This file was deleted.

tests/extmod/asyncio_cancel_task.py.exp

Lines changed: 0 additions & 31 deletions
This file was deleted.

tests/extmod/asyncio_cancel_wait_on_finished.py.exp

Lines changed: 0 additions & 7 deletions
This file was deleted.

tests/extmod/asyncio_current_task.py.exp

Lines changed: 0 additions & 1 deletion
This file was deleted.

tests/extmod/asyncio_event.py.exp

Lines changed: 0 additions & 33 deletions
This file was deleted.

tests/extmod/asyncio_event_fair.py.exp

Lines changed: 0 additions & 16 deletions
This file was deleted.

tests/extmod/asyncio_exception.py.exp

Lines changed: 0 additions & 7 deletions
This file was deleted.

tests/extmod/asyncio_fair.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ async def main():
2020
t2 = asyncio.create_task(task(2, 0.1))
2121
t3 = asyncio.create_task(task(3, 0.18))
2222
t4 = asyncio.create_task(task(4, -100))
23-
await asyncio.sleep(0.5)
23+
await asyncio.sleep(0.45) # t2 prints 5 times, t3 prints 3 times
2424
t1.cancel()
2525
t2.cancel()
2626
t3.cancel()

tests/extmod/asyncio_fair.py.exp

Lines changed: 0 additions & 13 deletions
This file was deleted.

tests/extmod/asyncio_lock.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
# Test Lock class
2+
#
3+
# This test has a corresponding .exp file because it tests a very specific ordering of
4+
# events when cancelling a task waiting on a lock, and that ordering should not change
5+
# (even though it does match CPython's output).
26

37
try:
48
import asyncio

tests/extmod/asyncio_lock_cancel.py.exp

Lines changed: 0 additions & 11 deletions
This file was deleted.

tests/extmod/asyncio_loop_stop.py.exp

Lines changed: 0 additions & 7 deletions
This file was deleted.

tests/extmod/asyncio_new_event_loop.py.exp

Lines changed: 0 additions & 6 deletions
This file was deleted.

tests/extmod/asyncio_set_exception_handler.py.exp

Lines changed: 0 additions & 9 deletions
This file was deleted.

tests/extmod/asyncio_task_done.py.exp

Lines changed: 0 additions & 24 deletions
This file was deleted.

0 commit comments

Comments
 (0)