diff options
author | Matthias Klose <doko@ubuntu.com> | 2010-03-15 12:46:18 (GMT) |
---|---|---|
committer | Matthias Klose <doko@ubuntu.com> | 2010-03-15 12:46:18 (GMT) |
commit | 54cc539a2b06d4fc22358862dc72f3c9ede7b2d4 (patch) | |
tree | 536c3885d9e8123ff2f7b96499f0ad33ee787d7e /Lib/bsddb | |
parent | f56813997fb546207ef1f9d15325dff2929dc455 (diff) | |
download | cpython-54cc539a2b06d4fc22358862dc72f3c9ede7b2d4.zip cpython-54cc539a2b06d4fc22358862dc72f3c9ede7b2d4.tar.gz cpython-54cc539a2b06d4fc22358862dc72f3c9ede7b2d4.tar.bz2 |
- Issue #6949: Allow the _bsddb extension to be built with db-4.8.x.
Diffstat (limited to 'Lib/bsddb')
-rw-r--r-- | Lib/bsddb/test/test_basics.py | 11 | ||||
-rw-r--r-- | Lib/bsddb/test/test_distributed_transactions.py | 4 |
2 files changed, 8 insertions, 7 deletions
diff --git a/Lib/bsddb/test/test_basics.py b/Lib/bsddb/test/test_basics.py index c5579de..b713496 100644 --- a/Lib/bsddb/test/test_basics.py +++ b/Lib/bsddb/test/test_basics.py @@ -1000,11 +1000,12 @@ class CrashAndBurn(unittest.TestCase) : # # See http://bugs.python.org/issue3307 # self.assertRaises(db.DBInvalidArgError, db.DB, None, 65535) - def test02_DBEnv_dealloc(self): - # http://bugs.python.org/issue3885 - import gc - self.assertRaises(db.DBInvalidArgError, db.DBEnv, ~db.DB_RPCCLIENT) - gc.collect() + if db.version() < (4, 8) : + def test02_DBEnv_dealloc(self): + # http://bugs.python.org/issue3885 + import gc + self.assertRaises(db.DBInvalidArgError, db.DBEnv, ~db.DB_RPCCLIENT) + gc.collect() #---------------------------------------------------------------------- diff --git a/Lib/bsddb/test/test_distributed_transactions.py b/Lib/bsddb/test/test_distributed_transactions.py index f864b88..c6243a2 100644 --- a/Lib/bsddb/test/test_distributed_transactions.py +++ b/Lib/bsddb/test/test_distributed_transactions.py @@ -35,7 +35,7 @@ class DBTxn_distributed(unittest.TestCase): db.DB_INIT_TXN | db.DB_INIT_LOG | db.DB_INIT_MPOOL | db.DB_INIT_LOCK, 0666) self.db = db.DB(self.dbenv) - self.db.set_re_len(db.DB_XIDDATASIZE) + self.db.set_re_len(db.DB_GID_SIZE) if must_open_db : if db.version() > (4,1) : txn=self.dbenv.txn_begin() @@ -76,7 +76,7 @@ class DBTxn_distributed(unittest.TestCase): # let them be garbage collected. for i in xrange(self.num_txns) : txn = self.dbenv.txn_begin() - gid = "%%%dd" %db.DB_XIDDATASIZE + gid = "%%%dd" %db.DB_GID_SIZE gid = adapt(gid %i) self.db.put(i, gid, txn=txn, flags=db.DB_APPEND) txns.add(gid) |