Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Silenced deprecation warning regarding old SQL location; refs #14300

  • Loading branch information...
commit 86964a7b4f32bb19267b42d0d530f54de0fb1347 1 parent 2fd03b3
Tim Graham timgraham authored
Showing with 10 additions and 2 deletions.
  1. +10 −2 tests/runtests.py
12 tests/runtests.py
View
@@ -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 '<app_label>/models/sql' is deprecated, "
+ "use '<app_label>/sql' instead.",
+ PendingDeprecationWarning
+ )
+ failures = test_runner.run_tests(
+ test_labels or get_installed(), extra_tests=extra_tests)
teardown(state)
return failures
Please sign in to comment.
Something went wrong with that request. Please try again.