diff options
author | Collin Winter <collinw@gmail.com> | 2007-08-22 21:45:20 (GMT) |
---|---|---|
committer | Collin Winter <collinw@gmail.com> | 2007-08-22 21:45:20 (GMT) |
commit | a65e94c1bf30259e0367d136054328c107ff41da (patch) | |
tree | 3e52a58cdad9ac85144590d72641e2f065d7382e /Lib/bsddb/test | |
parent | 865ea892018f4ff823496b2d0636c47c7ef06231 (diff) | |
download | cpython-a65e94c1bf30259e0367d136054328c107ff41da.zip cpython-a65e94c1bf30259e0367d136054328c107ff41da.tar.gz cpython-a65e94c1bf30259e0367d136054328c107ff41da.tar.bz2 |
Convert raise statements in bsddb.
Diffstat (limited to 'Lib/bsddb/test')
-rw-r--r-- | Lib/bsddb/test/test_basics.py | 4 | ||||
-rw-r--r-- | Lib/bsddb/test/test_compare.py | 2 | ||||
-rw-r--r-- | Lib/bsddb/test/test_dbtables.py | 2 | ||||
-rw-r--r-- | Lib/bsddb/test/test_pickle.py | 4 |
4 files changed, 6 insertions, 6 deletions
diff --git a/Lib/bsddb/test/test_basics.py b/Lib/bsddb/test/test_basics.py index 7bfe03b..d7b2d2f 100644 --- a/Lib/bsddb/test/test_basics.py +++ b/Lib/bsddb/test/test_basics.py @@ -735,7 +735,7 @@ class BasicTransactionTestCase(BasicTestCase): except db.DBError as e: pass else: - raise RuntimeError, "DBTxn.abort() called after DB_TXN no longer valid w/o an exception" + raise RuntimeError("DBTxn.abort() called after DB_TXN no longer valid w/o an exception") txn = self.env.txn_begin() txn.commit() @@ -744,7 +744,7 @@ class BasicTransactionTestCase(BasicTestCase): except db.DBError as e: pass else: - raise RuntimeError, "DBTxn.commit() called after DB_TXN no longer valid w/o an exception" + raise RuntimeError("DBTxn.commit() called after DB_TXN no longer valid w/o an exception") class BTreeTransactionTestCase(BasicTransactionTestCase): diff --git a/Lib/bsddb/test/test_compare.py b/Lib/bsddb/test/test_compare.py index 522ff57..886c20d 100644 --- a/Lib/bsddb/test/test_compare.py +++ b/Lib/bsddb/test/test_compare.py @@ -192,7 +192,7 @@ class BtreeExceptionsTestCase (AbstractBtreeKeyCompareTestCase): if l == r: # pass the set_bt_compare test return 0 - raise RuntimeError, "i'm a naughty comparison function" + raise RuntimeError("i'm a naughty comparison function") self.createDB (bad_comparator) #print "\n*** test should print 2 uncatchable tracebacks ***" self.addDataToDB (['a', 'b', 'c']) # this should raise, but... diff --git a/Lib/bsddb/test/test_dbtables.py b/Lib/bsddb/test/test_dbtables.py index 970f253..b03971b 100644 --- a/Lib/bsddb/test/test_dbtables.py +++ b/Lib/bsddb/test/test_dbtables.py @@ -355,7 +355,7 @@ class TableDBTestCase(unittest.TestCase): # success, the string value in mappings isn't callable pass else: - raise RuntimeError, "why was TypeError not raised for bad callable?" + raise RuntimeError("why was TypeError not raised for bad callable?") # Delete key in select conditions values = self.tdb.Select( diff --git a/Lib/bsddb/test/test_pickle.py b/Lib/bsddb/test/test_pickle.py index a5ccfa3..66d421c 100644 --- a/Lib/bsddb/test/test_pickle.py +++ b/Lib/bsddb/test/test_pickle.py @@ -48,9 +48,9 @@ class pickleTestCase(unittest.TestCase): #print repr(pickledEgg) rottenEgg = pickle.loads(pickledEgg) if rottenEgg.args != egg.args or type(rottenEgg) != type(egg): - raise Exception, (rottenEgg, '!=', egg) + raise Exception(rottenEgg, '!=', egg) else: - raise Exception, "where's my DBError exception?!?" + raise Exception("where's my DBError exception?!?") self.db.close() self.env.close() |