Skip to content

Commit 9417eec

Browse files
Reid00zhangbl
and
zhangbl
authored
feat: update test_hashlib fro CPython3.11 (#5053)
Co-authored-by: zhangbl <zhangbl@greatld.com>
1 parent d056201 commit 9417eec

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

Lib/hashlib.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ def __get_builtin_constructor(name):
114114
cache['shake_128'] = _sha3.shake_128
115115
cache['shake_256'] = _sha3.shake_256
116116
except ImportError:
117-
pass # no extension module, this hash is unsupported.'''
118-
117+
pass # no extension module, this hash is unsupported.
118+
119119
constructor = cache.get(name)
120120
if constructor is not None:
121121
return constructor

Lib/test/test_hashlib.py

-3
Original file line numberDiff line numberDiff line change
@@ -400,9 +400,6 @@ def check_file_digest(self, name, data, hexdigest):
400400
for digest in digests:
401401
buf = io.BytesIO(data)
402402
buf.seek(0)
403-
'''self.assertEqual(
404-
dir(hashlib), None
405-
)'''
406403
self.assertEqual(
407404
hashlib.file_digest(buf, digest).hexdigest(), hexdigest
408405
)

0 commit comments

Comments
 (0)