From 86964a7b4f32bb19267b42d0d530f54de0fb1347 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Tue, 3 Sep 2013 11:10:43 -0400 Subject: [PATCH] Silenced deprecation warning regarding old SQL location; refs #14300 --- tests/runtests.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/runtests.py b/tests/runtests.py index 8e3d2361b8..7f502299fa 100755 --- a/tests/runtests.py +++ b/tests/runtests.py @@ -206,8 +206,16 @@ def django_tests(verbosity, interactive, failfast, test_labels): interactive=interactive, failfast=failfast, ) - failures = test_runner.run_tests( - test_labels or get_installed(), extra_tests=extra_tests) + # Catch warnings thrown in test DB setup -- remove in Django 1.9 + with warnings.catch_warnings(): + warnings.filterwarnings( + 'ignore', + "Custom SQL location '/models/sql' is deprecated, " + "use '/sql' instead.", + PendingDeprecationWarning + ) + failures = test_runner.run_tests( + test_labels or get_installed(), extra_tests=extra_tests) teardown(state) return failures