mirror of
https://github.com/micropython/micropython.git
synced 2026-01-07 20:50:14 +01:00
tests/unix/extra_coverage: Add test for str/bytes with invalid hash.
This commit is contained in:
@@ -5,4 +5,11 @@ except NameError:
|
||||
import sys
|
||||
sys.exit()
|
||||
|
||||
extra_coverage()
|
||||
data = extra_coverage()
|
||||
|
||||
# test hashing of str/bytes that have an invalid hash
|
||||
print(data)
|
||||
print(hash(data[0]))
|
||||
print(hash(data[1]))
|
||||
print(hash(bytes(data[0], 'utf8')))
|
||||
print(hash(str(data[1], 'utf8')))
|
||||
|
||||
@@ -35,3 +35,8 @@ ementation
|
||||
12345678
|
||||
0
|
||||
0
|
||||
('0123456789', b'0123456789')
|
||||
7300
|
||||
7300
|
||||
7300
|
||||
7300
|
||||
|
||||
Reference in New Issue
Block a user