@pytest.mark.skipif(
"blake2b" not in hashlib.algorithms_available, reason="blake2b not built-in"
)
def test_new_hash_blake2b_builtin():
removed_hash = False
try:
if "blake2b512" in hashlib.algorithms_available:
removed_hash = True
hashlib.algorithms_available.remove("blake2b512")
with patch_blake2("hashlib.blake2b") as mock_blake2b:
mock_blake2b.return_value = sentinel = object()
h = hashutil._new_hash("blake2b512")
> assert h == sentinel
E assert <blake2b512 H...x7f9f5a017558> == <object objec...x7f9f5d041b50>
E +<blake2b512 HASH object @ 0x7f9f5a017558>
E -<object object at 0x7f9f5d041b50>
.tox/py3-full/lib/python3.7/site-packages/swh/model/tests/test_hashutil.py:226: AssertionError
TEST RESULT
TEST RESULT
- Run At
- Dec 6 2021, 4:09 PM