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.
This commit is contained in:
Elrond 2012-12-23 23:52:08 +01:00
parent 57c6473aa2
commit 601e6e0cce

View File

@ -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