From 20a58b6e0286889e8261b6c4c2d0831bdee2a9bb Mon Sep 17 00:00:00 2001 From: chrisw Date: Thu, 9 Sep 2010 21:54:25 +0100 Subject: [PATCH] preserve the original stack strace --- migrate/tests/fixture/database.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/migrate/tests/fixture/database.py b/migrate/tests/fixture/database.py index 2a7a633..0095f6b 100644 --- a/migrate/tests/fixture/database.py +++ b/migrate/tests/fixture/database.py @@ -77,7 +77,7 @@ def usedb(supported=None, not_supported=None): @decorator def dec(f, self, *a, **kw): failed_for = [] - exception = None + fail = False for url in my_urls: try: log.debug("Running test with engine %s", url) @@ -104,12 +104,12 @@ def usedb(supported=None, not_supported=None): )%(setup_exception,teardown_exception)) except Exception,e: failed_for.append(url) - exception = exception or e + fail = True for url in failed_for: log.error('Failed for %s', url) - if exception: + if fail: # cause the failure :-) - raise exception + raise return dec