diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2017-04-03 00:27:01 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2017-04-03 00:27:01 +0300 |
commit | 806c07c8989e44e1be4832fd37688e2b5828b3af (patch) | |
tree | d34a9ec6312a0b357eb5cc7d8b9d49fd62eda5d0 /tests | |
parent | 28876d3902c84774018f81204f81b6cc01784855 (diff) | |
download | micropython-806c07c8989e44e1be4832fd37688e2b5828b3af.tar.gz micropython-806c07c8989e44e1be4832fd37688e2b5828b3af.zip |
tests/micropython/heapalloc_iter: Improve skippability.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/micropython/heapalloc_iter.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/micropython/heapalloc_iter.py b/tests/micropython/heapalloc_iter.py index e1ed3daa3b..45d3519e45 100644 --- a/tests/micropython/heapalloc_iter.py +++ b/tests/micropython/heapalloc_iter.py @@ -1,10 +1,15 @@ # test that iterating doesn't use the heap +try: + import array +except ImportError: + import sys + print("SKIP") + sys.exit() try: from micropython import heap_lock, heap_unlock except (ImportError, AttributeError): heap_lock = heap_unlock = lambda:0 -import array def do_iter(l): for i in l: @@ -20,7 +25,7 @@ ar = array.array('H', (123, 456)) t = (1, 2, 3) l = [1, 2] d = {1:2} -s = {1} +s = set((1,)) fs = frozenset((1,)) g1 = (100 + x for x in range(2)) g2 = gen_func() |