Attempt to produce better error messages if dependencies aren't met

This commit is contained in:
Sam Ruby 2006-10-09 12:17:57 -04:00
parent 3fece19638
commit 64e1f081f4

View File

@ -26,7 +26,12 @@ import planet
planet.getLogger("WARNING") planet.getLogger("WARNING")
# load all of the tests into a suite # load all of the tests into a suite
suite = unittest.TestLoader().loadTestsFromNames(modules) try:
suite = unittest.TestLoader().loadTestsFromNames(modules)
except Exception, exception:
# attempt to produce a more specific message
for module in modules: __import__(module)
raise
# run test suite # run test suite
unittest.TextTestRunner().run(suite) unittest.TextTestRunner().run(suite)