diff --git a/tests/extmod/sha256.py b/tests/extmod/sha256.py index f74a7da224..ff51f2ffa5 100644 --- a/tests/extmod/sha256.py +++ b/tests/extmod/sha256.py @@ -1,7 +1,14 @@ +import sys try: import uhashlib as hashlib except ImportError: - import hashlib + try: + import hashlib + except ImportError: + # This is neither uPy, nor cPy, so must be uPy with + # uhashlib module disabled. + print("SKIP") + sys.exit() h = hashlib.sha256()