From a64072f994d8ddc748948e0b8376e69881cf26ac Mon Sep 17 00:00:00 2001 From: Jesus Cea Date: Wed, 3 Sep 2008 22:07:33 +0000 Subject: [PATCH] Python3.0 bsddb testsuite compatibility improvements --- Lib/bsddb/test/test_all.py | 4 ++++ Lib/test/test_bsddb3.py | 10 +++++++--- Modules/bsddb.h | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/Lib/bsddb/test/test_all.py b/Lib/bsddb/test/test_all.py index 9a4d3ee372..559d41b282 100644 --- a/Lib/bsddb/test/test_all.py +++ b/Lib/bsddb/test/test_all.py @@ -67,6 +67,10 @@ if sys.version_info[0] >= 3 : v = self._dbcursor.next_dup() return self._fix(v) + def next_nodup(self) : + v = self._dbcursor.next_nodup() + return self._fix(v) + def put(self, key, value, flags=0, dlen=-1, doff=-1) : if isinstance(key, str) : key = bytes(key, charset) diff --git a/Lib/test/test_bsddb3.py b/Lib/test/test_bsddb3.py index 41d0e219de..9079b0ee6b 100644 --- a/Lib/test/test_bsddb3.py +++ b/Lib/test/test_bsddb3.py @@ -11,9 +11,6 @@ from test.support import requires, verbose, run_unittest, unlink, rmtree # When running as a script instead of within the regrtest framework, skip the # requires test, since it's obvious we want to run them. -if __name__ != '__main__': - requires('bsddb') - verbose = False if 'verbose' in sys.argv: verbose = True @@ -52,6 +49,10 @@ class TimingCheck(unittest.TestCase): def test_main(): from bsddb import db from bsddb.test import test_all + + # This must be improved... + test_all.do_proxy_db_py3k(True) + test_all.set_test_path_prefix(os.path.join(tempfile.gettempdir(), 'z-test_bsddb3-%s' % os.getpid())) @@ -73,6 +74,9 @@ def test_main(): except: pass + # This must be improved... + test_all.do_proxy_db_py3k(False) + if __name__ == '__main__': test_main() diff --git a/Modules/bsddb.h b/Modules/bsddb.h index 274bcc236f..f796681bf9 100644 --- a/Modules/bsddb.h +++ b/Modules/bsddb.h @@ -105,7 +105,7 @@ #error "eek! DBVER can't handle minor versions > 9" #endif -#define PY_BSDDB_VERSION "4.7.3pre4" +#define PY_BSDDB_VERSION "4.7.3pre5" /* Python object definitions */ -- 2.50.1