summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-02-24 23:07:21 +0000
committerGerrit Code Review <review@openstack.org>2015-02-24 23:07:21 +0000
commit8a638ce9d6f1103ce688117e7c78b8f6eb392e49 (patch)
tree08a35446f28e1ecdd5c53129cf4a323d76153103
parent24521798bc2e089c29f7d611015403ef5746399b (diff)
parent5feeaba69f7b090d187b7cf4e0ff4f6293369f6a (diff)
downloadsqlalchemy-migrate-8a638ce9d6f1103ce688117e7c78b8f6eb392e49.tar.gz
Merge "Don't run the test if _setup() fails"0.9.5
-rw-r--r--migrate/tests/fixture/database.py14
1 files changed, 2 insertions, 12 deletions
diff --git a/migrate/tests/fixture/database.py b/migrate/tests/fixture/database.py
index 20ca50a..93bd69b 100644
--- a/migrate/tests/fixture/database.py
+++ b/migrate/tests/fixture/database.py
@@ -90,9 +90,7 @@ def usedb(supported=None, not_supported=None):
log.info('Backend %s is not available, skip it', url)
continue
except Exception as e:
- setup_exception = e
- else:
- setup_exception = None
+ raise RuntimeError('Exception during _setup(): %r' % e)
try:
f(self, *a, **kw)
@@ -100,15 +98,7 @@ def usedb(supported=None, not_supported=None):
try:
self._teardown()
except Exception as e:
- teardown_exception=e
- else:
- teardown_exception=None
- if setup_exception or teardown_exception:
- raise RuntimeError((
- 'Exception during _setup/_teardown:\n'
- 'setup: %r\n'
- 'teardown: %r\n'
- )%(setup_exception,teardown_exception))
+ raise RuntimeError('Exception during _teardown(): %r' % e)
except Exception:
failed_for.append(url)
fail = sys.exc_info()