Skip to content

Commit dc7c6c6

Browse files
committed
only skip on value error specific for blake2 if not in builtins in test_algorithms_available
1 parent 3c1de38 commit dc7c6c6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Lib/test/test_hashlib.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,11 @@ def test_algorithms_available(self):
242242
except ValueError as verr:
243243
# builtins may be absent if python built with
244244
# a subset of --with-builtin-hashlib-hashes or none.
245-
self.skipTest(verr)
245+
if ("blake2" in name and
246+
"blake2" not in sysconfig.get_config_var("PY_BUILTIN_HASHLIB_HASHES").split(",")):
247+
self.skipTest(verr)
248+
else:
249+
raise
246250

247251
def test_usedforsecurity_true(self):
248252
hashlib.new("sha256", usedforsecurity=True)

0 commit comments

Comments
 (0)