mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 03:30:14 +01:00
tests: sha256: skip test if uhashlib module is not available.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user