mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
The dbm module should use bytes for keys. This makes test_shelve pass.
This commit is contained in:
parent
5bcf109c73
commit
956e359579
2 changed files with 8 additions and 8 deletions
|
|
@ -26,10 +26,10 @@ def cleanup():
|
|||
def test_keys():
|
||||
d = dbm.open(filename, 'c')
|
||||
verify(d.keys() == [])
|
||||
d['a'] = 'b'
|
||||
d['12345678910'] = '019237410982340912840198242'
|
||||
d[b'a'] = b'b'
|
||||
d[b'12345678910'] = b'019237410982340912840198242'
|
||||
d.keys()
|
||||
if 'a' in d:
|
||||
if b'a' in d:
|
||||
if verbose:
|
||||
print('Test dbm keys: ', d.keys())
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue