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.
diff --git a/Lib/test/test_bsddb.py b/Lib/test/test_bsddb.py
index f6e6ad0..56dade4 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'