tests: sha256: skip test if uhashlib module is not available.

This commit is contained in:
Paul Sokolovsky 2014-12-18 00:31:49 +02:00
parent 5cf7ac7309
commit c8b0229bc7
1 changed files with 8 additions and 1 deletions

View File

@ -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()