feat: update test_hashlib fro CPython3.11 (#5053)

Co-authored-by: zhangbl <zhangbl@greatld.com>
This commit is contained in:
Reid00andzhangbl authored and GitHub committed 2023-08-30 00:09:21 +09:00
1 parent d056201e5b
commit 9417eec81e
2 files changed
+2 -5

No files matched your search

+2 -2
View File
@@ -114,8 +114,8 @@ def __get_builtin_constructor(name):
cache['shake_128'] = _sha3.shake_128
cache['shake_256'] = _sha3.shake_256
except ImportError:
pass # no extension module, this hash is unsupported.'''
pass # no extension module, this hash is unsupported.
constructor = cache.get(name)
if constructor is not None:
return constructor
-3
View File
@@ -400,9 +400,6 @@ class HashLibTestCase(unittest.TestCase):
for digest in digests:
buf = io.BytesIO(data)
buf.seek(0)
'''self.assertEqual(
dir(hashlib), None
)'''
self.assertEqual(
hashlib.file_digest(buf, digest).hexdigest(), hexdigest
)