Fix tests that rely on sys.implementation.name to work with circutpython response.

This commit is contained in:
Scott Shawcroft 2017-02-14 10:57:00 +01:00
parent 18c299b13d
commit b950709bea
4 changed files with 4 additions and 4 deletions

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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()