From c684e112e6c5cee90fad27e4c464550e70c857f8 Mon Sep 17 00:00:00 2001 From: Sam Ruby Date: Mon, 16 Oct 2006 15:59:52 -0400 Subject: [PATCH] Check for dbhash before testing id indexes --- tests/test_idindex.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test_idindex.py b/tests/test_idindex.py index dda08d6..b88d1ea 100644 --- a/tests/test_idindex.py +++ b/tests/test_idindex.py @@ -51,8 +51,11 @@ class idIndexTest(unittest.TestCase): self.assertEqual(12,len(doc.getElementsByTagName('planet:name'))) try: + module = 'dbhash' + import dbhash + module = 'libxml2' import libxml2 except ImportError: - logger.warn("libxml2 is not available => can't test id index") + logger.warn(module + " is not available => can't test id index") for method in dir(idIndexTest): if method.startswith('test_'): delattr(idIndexTest,method)