From 64e1f081f44fab1459f063377d4237d3a4e44ce2 Mon Sep 17 00:00:00 2001 From: Sam Ruby Date: Mon, 9 Oct 2006 12:17:57 -0400 Subject: [PATCH] Attempt to produce better error messages if dependencies aren't met --- runtests.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/runtests.py b/runtests.py index 9fd5f70..3ebe331 100755 --- a/runtests.py +++ b/runtests.py @@ -26,7 +26,12 @@ import planet planet.getLogger("WARNING") # 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 unittest.TextTestRunner().run(suite)