diff options
| author | Scott Shawcroft <scott.shawcroft@gmail.com> | 2017-02-14 10:57:00 +0100 |
|---|---|---|
| committer | Scott Shawcroft <scott.shawcroft@gmail.com> | 2017-02-14 10:57:00 +0100 |
| commit | b950709beafbfe3a20b95b4cd978fb50db3e8eb8 (patch) | |
| tree | 1afde36f5b50bfffc75503bc72c538f3808b0f53 | |
| parent | 18c299b13dd568669176fb1c713c79dfb4890bbe (diff) | |
Fix tests that rely on sys.implementation.name to work with circutpython response.
| -rw-r--r-- | tests/basics/async_await2.py | 2 | ||||
| -rw-r--r-- | tests/basics/async_for2.py | 2 | ||||
| -rw-r--r-- | tests/basics/async_with2.py | 2 | ||||
| -rw-r--r-- | tests/basics/sys1.py | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/tests/basics/async_await2.py b/tests/basics/async_await2.py index 129d3751a..7097ce85a 100644 --- a/tests/basics/async_await2.py +++ b/tests/basics/async_await2.py @@ -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: diff --git a/tests/basics/async_for2.py b/tests/basics/async_for2.py index 89584fcb1..025ff9c4d 100644 --- a/tests/basics/async_for2.py +++ b/tests/basics/async_for2.py @@ -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: diff --git a/tests/basics/async_with2.py b/tests/basics/async_with2.py index 44421ae91..5fb06ba60 100644 --- a/tests/basics/async_with2.py +++ b/tests/basics/async_with2.py @@ -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: diff --git a/tests/basics/sys1.py b/tests/basics/sys1.py index 816c8823a..702cf1aeb 100644 --- a/tests/basics/sys1.py +++ b/tests/basics/sys1.py @@ -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() |
