Skip to content

Commit fae83a6

Browse files
jimmodpgeorge
authored andcommitted
tests/extmod/asyncio_threadsafeflag.py: Update for unix select.
1. Remove the skip for detecting support for polling user-defined objects as this is always possible now on all ports. 2. Don't print when the scheduled task runs as the ordering of this relative to the other prints is dependent on other factors (e.g. if using the native emitter). This work was funded through GitHub Sponsors. Signed-off-by: Jim Mussared <[email protected]>
1 parent cfe6a11 commit fae83a6

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

tests/extmod/asyncio_threadsafeflag.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,14 @@
1616
raise SystemExit
1717

1818

19-
try:
20-
# Unix port can't select/poll on user-defined types.
21-
import select
22-
23-
poller = select.poll()
24-
poller.register(asyncio.ThreadSafeFlag())
25-
except TypeError:
26-
print("SKIP")
27-
raise SystemExit
28-
29-
3019
async def task(id, flag):
3120
print("task", id)
3221
await flag.wait()
3322
print("task", id, "done")
3423

3524

3625
def set_from_schedule(flag):
37-
print("schedule")
3826
flag.set()
39-
print("schedule done")
4027

4128

4229
async def main():

tests/extmod/asyncio_threadsafeflag.py.exp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ yield
99
task 2
1010
set event
1111
yield
12-
schedule
13-
schedule done
1412
wait task
1513
task 2 done
1614
----

0 commit comments

Comments
 (0)