Skip these tests when using --emit native
.. in which case the __await__ attribute is not available due to "CIRCUITPY: no support for mp_type_native_coro_wrap" (emitglue.c)
This commit is contained in:
parent
b0bf36ef3b
commit
562520e158
@ -14,6 +14,13 @@ async def foo():
|
||||
return 42
|
||||
|
||||
|
||||
try:
|
||||
foo().__await__
|
||||
except AttributeError:
|
||||
print("SKIP")
|
||||
raise SystemExit
|
||||
|
||||
|
||||
async def main():
|
||||
# Call function directly via an await
|
||||
print(await foo())
|
||||
|
@ -8,6 +8,16 @@ except ImportError:
|
||||
raise SystemExit
|
||||
|
||||
|
||||
async def foo():
|
||||
return 42
|
||||
|
||||
|
||||
try:
|
||||
foo().__await__
|
||||
except AttributeError:
|
||||
print("SKIP")
|
||||
raise SystemExit
|
||||
|
||||
try:
|
||||
import utime
|
||||
|
||||
|
@ -11,6 +11,17 @@ except ImportError:
|
||||
raise SystemExit
|
||||
|
||||
|
||||
async def foo():
|
||||
return 42
|
||||
|
||||
|
||||
try:
|
||||
foo().__await__
|
||||
except AttributeError:
|
||||
print("SKIP")
|
||||
raise SystemExit
|
||||
|
||||
|
||||
async def task1(id):
|
||||
for i in range(4):
|
||||
print("sleep", id)
|
||||
|
@ -10,6 +10,17 @@ except ImportError:
|
||||
raise SystemExit
|
||||
|
||||
|
||||
async def foo():
|
||||
return 42
|
||||
|
||||
|
||||
try:
|
||||
foo().__await__
|
||||
except AttributeError:
|
||||
print("SKIP")
|
||||
raise SystemExit
|
||||
|
||||
|
||||
async def factorial(name, number):
|
||||
f = 1
|
||||
for i in range(2, number + 1):
|
||||
|
@ -10,6 +10,17 @@ except ImportError:
|
||||
raise SystemExit
|
||||
|
||||
|
||||
async def foo():
|
||||
return 42
|
||||
|
||||
|
||||
try:
|
||||
foo().__await__
|
||||
except AttributeError:
|
||||
print("SKIP")
|
||||
raise SystemExit
|
||||
|
||||
|
||||
def custom_handler(loop, context):
|
||||
print(repr(context["exception"]))
|
||||
|
||||
|
@ -10,6 +10,17 @@ except ImportError:
|
||||
raise SystemExit
|
||||
|
||||
|
||||
async def foo():
|
||||
return 42
|
||||
|
||||
|
||||
try:
|
||||
foo().__await__
|
||||
except AttributeError:
|
||||
print("SKIP")
|
||||
raise SystemExit
|
||||
|
||||
|
||||
async def task(i, lock, lock_flag):
|
||||
print("task", i, "start")
|
||||
try:
|
||||
|
@ -10,6 +10,17 @@ except ImportError:
|
||||
raise SystemExit
|
||||
|
||||
|
||||
async def foo():
|
||||
return 42
|
||||
|
||||
|
||||
try:
|
||||
foo().__await__
|
||||
except AttributeError:
|
||||
print("SKIP")
|
||||
raise SystemExit
|
||||
|
||||
|
||||
async def awaiting(t, return_if_fail):
|
||||
try:
|
||||
print("awaiting started")
|
||||
|
Loading…
Reference in New Issue
Block a user