mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gdbm.open() no longer accepts garbage in the flags string. Fix the tests.
This commit is contained in:
parent
2b6d7bc151
commit
99664e455b
1 changed files with 7 additions and 2 deletions
|
@ -26,12 +26,17 @@ else:
|
|||
raise TestFailed, "expected gdbm.error accessing closed database"
|
||||
g = gdbm.open(filename, 'r')
|
||||
g.close()
|
||||
g = gdbm.open(filename, 'rw')
|
||||
g.close()
|
||||
g = gdbm.open(filename, 'w')
|
||||
g.close()
|
||||
g = gdbm.open(filename, 'n')
|
||||
g.close()
|
||||
try:
|
||||
g = gdbm.open(filename, 'rx')
|
||||
g.close()
|
||||
except error:
|
||||
pass
|
||||
else:
|
||||
raise TestFailed, "expected gdbm.error when passing invalid open flags"
|
||||
|
||||
try:
|
||||
import os
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue