From: Neil Schemenauer Date: Mon, 18 Dec 2000 17:28:05 +0000 (+0000) Subject: gdbm.open() no longer accepts garbage in the flags string. Fix the tests. X-Git-Tag: v2.1a1~542 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=99664e455ba9e02e74563e369d7f70bc2faea3e0;p=python gdbm.open() no longer accepts garbage in the flags string. Fix the tests. --- diff --git a/Lib/test/test_gdbm.py b/Lib/test/test_gdbm.py index 900d737865..67c67eb6e7 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