Merged revisions 77871,77910,77913 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r77871 | ezio.melotti | 2010-01-31 13:46:54 +0200 (Sun, 31 Jan 2010) | 1 line
#7092: silence more -3 and -Wd warnings
........
r77910 | ezio.melotti | 2010-02-02 10:37:35 +0200 (Tue, 02 Feb 2010) | 1 line
#7092: silence py3k warnings for bsddb. Patch by Florent Xicluna.
........
r77913 | ezio.melotti | 2010-02-02 19:34:37 +0200 (Tue, 02 Feb 2010) | 1 line
#7092: Silence py3k warnings in test_exceptions and test_pep352. Patch by Florent Xicluna.
........
diff --git a/Lib/test/test_bsddb3.py b/Lib/test/test_bsddb3.py
index 5925e15..50efd7e 100644
--- a/Lib/test/test_bsddb3.py
+++ b/Lib/test/test_bsddb3.py
@@ -7,7 +7,13 @@
import tempfile
import time
import unittest
-from test.test_support import requires, verbose, run_unittest, unlink, rmtree
+from test.test_support import (requires, verbose, run_unittest, unlink, rmtree,
+ import_module)
+
+# Skip test if _bsddb module was not built.
+import_module('_bsddb')
+# Silence Py3k warning
+import_module('bsddb', deprecated=True)
# When running as a script instead of within the regrtest framework, skip the
# requires test, since it's obvious we want to run them.