diff options
Diffstat (limited to 'Lib/bsddb/test/test_basics.py')
-rw-r--r-- | Lib/bsddb/test/test_basics.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Lib/bsddb/test/test_basics.py b/Lib/bsddb/test/test_basics.py index 155705d..d3bbb4f 100644 --- a/Lib/bsddb/test/test_basics.py +++ b/Lib/bsddb/test/test_basics.py @@ -397,10 +397,14 @@ class BasicTestCase(unittest.TestCase): try: rec = c.current() except db.DBKeyEmptyError, val: - assert val[0] == db.DB_KEYEMPTY - if verbose: print val + if get_raises_error: + assert val[0] == db.DB_KEYEMPTY + if verbose: print val + else: + self.fail("unexpected DBKeyEmptyError") else: - self.fail('exception expected') + if get_raises_error: + self.fail('DBKeyEmptyError exception expected') c.next() c2 = c.dup(db.DB_POSITION) @@ -612,7 +616,6 @@ class BasicTransactionTestCase(BasicTestCase): self.txn = self.env.txn_begin() - def test06_Transactions(self): d = self.d if verbose: |