summaryrefslogtreecommitdiff
path: root/Lib/test/test_bsddb.py
diff options
context:
space:
mode:
authorR. David Murray <rdmurray@bitdance.com>2009-03-31 18:32:17 +0000
committerR. David Murray <rdmurray@bitdance.com>2009-03-31 18:32:17 +0000
commit597ebab74466593dc05a35faad0f5c316900153b (patch)
treeaab4f8b1ee66ddd3fb4ad4a841509eab43b5ad1f /Lib/test/test_bsddb.py
parent9e0b363629d62259965a4bc2806370b152d8baac (diff)
downloadcpython-git-597ebab74466593dc05a35faad0f5c316900153b.tar.gz
A few more test skips via import_module, and change import_module to
return the error message produced by importlib, so that if an import in the package whose import is being wrapped is what failed the skip message will contain the name of that module instead of the name of the wrapped module. Also fixed formatting of some previous comments.
Diffstat (limited to 'Lib/test/test_bsddb.py')
-rwxr-xr-xLib/test/test_bsddb.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/Lib/test/test_bsddb.py b/Lib/test/test_bsddb.py
index f6e6ad0b98..56dade4cc9 100755
--- a/Lib/test/test_bsddb.py
+++ b/Lib/test/test_bsddb.py
@@ -4,11 +4,16 @@
"""
import os, sys
import copy
-import bsddb
-import dbhash # Just so we know it's imported
import unittest
from test import test_support
+# Skip test if _bsddb wasn't built.
+test_support.import_module('_bsddb')
+
+import bsddb
+import dbhash # Just so we know it's imported
+
+
class TestBSDDB(unittest.TestCase):
openflag = 'c'