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
|
# test await expression
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
if sys.implementation.name == 'micropython':
|
if sys.implementation.name in ('micropython', 'circuitpython'):
|
||||||
# uPy allows normal generators to be awaitables
|
# uPy allows normal generators to be awaitables
|
||||||
coroutine = lambda f: f
|
coroutine = lambda f: f
|
||||||
else:
|
else:
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# test waiting within "async for" aiter/anext functions
|
# test waiting within "async for" aiter/anext functions
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
if sys.implementation.name == 'micropython':
|
if sys.implementation.name in ('micropython', 'circuitpython'):
|
||||||
# uPy allows normal generators to be awaitables
|
# uPy allows normal generators to be awaitables
|
||||||
coroutine = lambda f: f
|
coroutine = lambda f: f
|
||||||
else:
|
else:
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# test waiting within async with enter/exit functions
|
# test waiting within async with enter/exit functions
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
if sys.implementation.name == 'micropython':
|
if sys.implementation.name in ('micropython', 'circuitpython'):
|
||||||
# uPy allows normal generators to be awaitables
|
# uPy allows normal generators to be awaitables
|
||||||
coroutine = lambda f: f
|
coroutine = lambda f: f
|
||||||
else:
|
else:
|
||||||
|
@ -7,7 +7,7 @@ print(type(sys.path))
|
|||||||
print(type(sys.argv))
|
print(type(sys.argv))
|
||||||
print(sys.byteorder in ('little', 'big'))
|
print(sys.byteorder in ('little', 'big'))
|
||||||
print(sys.maxsize > 100)
|
print(sys.maxsize > 100)
|
||||||
print(sys.implementation.name in ('cpython', 'micropython'))
|
print(sys.implementation.name in ('cpython', 'micropython', 'circuitpython'))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
Loading…
Reference in New Issue
Block a user