diff --git a/bin/weedb/test/test_errors.py b/bin/weedb/test/test_errors.py index d83bd9b3..49fba3f2 100644 --- a/bin/weedb/test/test_errors.py +++ b/bin/weedb/test/test_errors.py @@ -5,8 +5,6 @@ import stat import sys import unittest -import MySQLdb - import weedb # @@ -51,6 +49,10 @@ class Common(unittest.TestCase): def setUp(self): """Drop the old databases, in preparation for running a test.""" + try: + import MySQLdb + except ImportError as e: + raise unittest.case.SkipTest(e.message) try: weedb.drop(mysql1_dict) except weedb.NoDatabase: diff --git a/makefile b/makefile index cee202a5..170f6a5a 100644 --- a/makefile +++ b/makefile @@ -89,7 +89,8 @@ test: echo >> $(BLDDIR)/test-results; \ done @grep "ERROR:\|FAIL:" $(BLDDIR)/test-results || echo "no failures" - @echo "see $(BLDDIR)/test-results" + @grep "skipped=" $(BLDDIR)/test-results || echo "no tests were skipped" + @echo "see $(BLDDIR)/test-results for output from the tests" test-setup: bin/weedb/test/setup_mysql