Skip to content

Commit b950709

Browse files
committed
Fix tests that rely on sys.implementation.name to work with circutpython response.
1 parent 18c299b commit b950709

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

tests/basics/async_await2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# test await expression
22

33
import sys
4-
if sys.implementation.name == 'micropython':
4+
if sys.implementation.name in ('micropython', 'circuitpython'):
55
# uPy allows normal generators to be awaitables
66
coroutine = lambda f: f
77
else:

tests/basics/async_for2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# test waiting within "async for" aiter/anext functions
22

33
import sys
4-
if sys.implementation.name == 'micropython':
4+
if sys.implementation.name in ('micropython', 'circuitpython'):
55
# uPy allows normal generators to be awaitables
66
coroutine = lambda f: f
77
else:

tests/basics/async_with2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# test waiting within async with enter/exit functions
22

33
import sys
4-
if sys.implementation.name == 'micropython':
4+
if sys.implementation.name in ('micropython', 'circuitpython'):
55
# uPy allows normal generators to be awaitables
66
coroutine = lambda f: f
77
else:

tests/basics/sys1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
print(type(sys.argv))
88
print(sys.byteorder in ('little', 'big'))
99
print(sys.maxsize > 100)
10-
print(sys.implementation.name in ('cpython', 'micropython'))
10+
print(sys.implementation.name in ('cpython', 'micropython', 'circuitpython'))
1111

1212
try:
1313
sys.exit()

0 commit comments

Comments
 (0)