diff options
author | Elrond <elrond+mediagoblin.org@samba-tng.org> | 2012-12-23 23:52:08 +0100 |
---|---|---|
committer | Elrond <elrond+mediagoblin.org@samba-tng.org> | 2012-12-23 23:52:08 +0100 |
commit | 601e6e0cce3af9a2521e6bf4e6d50740c84dc653 (patch) | |
tree | 9bbcc16616f2f4e6d4cb1af1f54d486d10c394f5 | |
parent | 57c6473aa2146f3337a42cb4b9c54dc164b7b76a (diff) | |
download | mediagoblin-601e6e0cce3af9a2521e6bf4e6d50740c84dc653.tar.lz mediagoblin-601e6e0cce3af9a2521e6bf4e6d50740c84dc653.tar.xz mediagoblin-601e6e0cce3af9a2521e6bf4e6d50740c84dc653.zip |
Testsuite: Turn SQLAlchemy warnings into errors
We should handle SQLAlchemy warnings. And to make that a
lot easier, turn them into real errors. That way they
1) Turn up more prominently.
2) Have a useful backtrace.
This only happens in the testsuite, so that normal useage
is not impacted.
-rw-r--r-- | mediagoblin/tests/__init__.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mediagoblin/tests/__init__.py b/mediagoblin/tests/__init__.py index 4e84914a..5a3235c6 100644 --- a/mediagoblin/tests/__init__.py +++ b/mediagoblin/tests/__init__.py @@ -25,6 +25,10 @@ from mediagoblin.tests.tools import ( def setup_package(): suicide_if_bad_celery_environ() + import warnings + from sqlalchemy.exc import SAWarning + warnings.simplefilter("error", SAWarning) + def teardown_package(): # Remove and reinstall user_dev directories |