tests: sha256: skip test if uhashlib module is not available.
This commit is contained in:
parent
5cf7ac7309
commit
c8b0229bc7
@ -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…
x
Reference in New Issue
Block a user