summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_bsddb3.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_bsddb3.py')
-rw-r--r--Lib/test/test_bsddb3.py8
1 files changed, 7 insertions, 1 deletions
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 sys
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.