Browse Source

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

pull/1015/head
Paul Sokolovsky 10 years ago
parent
commit
c8b0229bc7
  1. 9
      tests/extmod/sha256.py

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

Loading…
Cancel
Save