summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2014-11-25 09:09:13 -0500
committerTim Graham <timograham@gmail.com>2014-11-25 09:09:13 -0500
commitd43dd03ca3afecc27f43fbc932f239470a2f07db (patch)
treebaaea361040e684970c47b586ebb12aa46baef0e
parentc1552af1fe5832011e3b1c3e5b40c20ff3dbe6f9 (diff)
Fixed #23890 -- Silenced numpy DeprecationWarnings in template tests.
-rw-r--r--tests/template_tests/tests.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/template_tests/tests.py b/tests/template_tests/tests.py
index 18c2e1703c..71da1ee40a 100644
--- a/tests/template_tests/tests.py
+++ b/tests/template_tests/tests.py
@@ -604,6 +604,13 @@ class TemplateTests(TestCase):
# Ignore deprecations of old style unordered_list
# and removetags.
warnings.filterwarnings("ignore", category=RemovedInDjango20Warning, module="django.template.defaultfilters")
+ # Ignore numpy deprecation warnings (#23890)
+ warnings.filterwarnings(
+ "ignore",
+ "Using a non-integer number instead of an "
+ "integer will result in an error in the future",
+ DeprecationWarning
+ )
output = self.render(test_template, vals)
except ShouldNotExecuteException:
failures.append("Template test (Cached='%s', TEMPLATE_STRING_IF_INVALID='%s', TEMPLATE_DEBUG=%s): %s -- FAILED. Template rendering invoked method that shouldn't have been invoked." % (is_cached, invalid_str, template_debug, name))