diff options
author | Neil Schemenauer <nascheme@enme.ucalgary.ca> | 2000-12-18 17:28:05 (GMT) |
---|---|---|
committer | Neil Schemenauer <nascheme@enme.ucalgary.ca> | 2000-12-18 17:28:05 (GMT) |
commit | 99664e455ba9e02e74563e369d7f70bc2faea3e0 (patch) | |
tree | 9dad2a03a40a0a072dc5d4d9fb24febab2f52fac /Lib | |
parent | 2b6d7bc151d4d15efc8bc428d51cea3286305f41 (diff) | |
download | cpython-99664e455ba9e02e74563e369d7f70bc2faea3e0.zip cpython-99664e455ba9e02e74563e369d7f70bc2faea3e0.tar.gz cpython-99664e455ba9e02e74563e369d7f70bc2faea3e0.tar.bz2 |
gdbm.open() no longer accepts garbage in the flags string. Fix the tests.
Diffstat (limited to 'Lib')
-rwxr-xr-x | Lib/test/test_gdbm.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Lib/test/test_gdbm.py b/Lib/test/test_gdbm.py index 900d737..67c67eb 100755 --- a/Lib/test/test_gdbm.py +++ b/Lib/test/test_gdbm.py @@ -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 |