Fix tests that rely on sys.implementation.name to work with circutpython response.
This commit is contained in:
parent
18c299b13d
commit
b950709bea
|
@ -1,7 +1,7 @@
|
|||
# test await expression
|
||||
|
||||
import sys
|
||||
if sys.implementation.name == 'micropython':
|
||||
if sys.implementation.name in ('micropython', 'circuitpython'):
|
||||
# uPy allows normal generators to be awaitables
|
||||
coroutine = lambda f: f
|
||||
else:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# test waiting within "async for" aiter/anext functions
|
||||
|
||||
import sys
|
||||
if sys.implementation.name == 'micropython':
|
||||
if sys.implementation.name in ('micropython', 'circuitpython'):
|
||||
# uPy allows normal generators to be awaitables
|
||||
coroutine = lambda f: f
|
||||
else:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# test waiting within async with enter/exit functions
|
||||
|
||||
import sys
|
||||
if sys.implementation.name == 'micropython':
|
||||
if sys.implementation.name in ('micropython', 'circuitpython'):
|
||||
# uPy allows normal generators to be awaitables
|
||||
coroutine = lambda f: f
|
||||
else:
|
||||
|
|
|
@ -7,7 +7,7 @@ print(type(sys.path))
|
|||
print(type(sys.argv))
|
||||
print(sys.byteorder in ('little', 'big'))
|
||||
print(sys.maxsize > 100)
|
||||
print(sys.implementation.name in ('cpython', 'micropython'))
|
||||
print(sys.implementation.name in ('cpython', 'micropython', 'circuitpython'))
|
||||
|
||||
try:
|
||||
sys.exit()
|
||||
|
|
Loading…
Reference in New Issue