From: Elrond Date: Sun, 23 Dec 2012 22:52:08 +0000 (+0100) Subject: Testsuite: Turn SQLAlchemy warnings into errors X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=601e6e0cce3af9a2521e6bf4e6d50740c84dc653;p=mediagoblin.git 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. --- 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