From 601e6e0cce3af9a2521e6bf4e6d50740c84dc653 Mon Sep 17 00:00:00 2001 From: Elrond Date: Sun, 23 Dec 2012 23:52:08 +0100 Subject: [PATCH] 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. --- mediagoblin/tests/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) 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 -- 2.25.1