From c8b0229bc7c615a636c05442e3ad590fb7cc0ec0 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Thu, 18 Dec 2014 00:31:49 +0200 Subject: tests: sha256: skip test if uhashlib module is not available. --- tests/extmod/sha256.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'tests/extmod/sha256.py') 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() -- cgit v1.2.3