Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Caught warnings in the templates tests. Refs #17906.

This was missing from f49e9a5.
  • Loading branch information...
commit c10ed58746d341dc83169018030b8dbe823fc4eb 1 parent 17a28b3
@aaugustin aaugustin authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 tests/regressiontests/templates/tests.py
View
6 tests/regressiontests/templates/tests.py
@@ -17,6 +17,7 @@
from urllib.parse import urljoin
except ImportError: # Python 2
from urlparse import urljoin
+import warnings
from django import template
from django.core import urlresolvers
@@ -491,7 +492,10 @@ def test_templates(self):
for is_cached in (False, True):
try:
try:
- test_template = loader.get_template(name)
+ with warnings.catch_warnings():
+ # Ignore pending deprecations of the old syntax of the 'cycle' and 'firstof' tags.
+ warnings.filterwarnings("ignore", category=PendingDeprecationWarning, module='django.template.base')
+ test_template = loader.get_template(name)
except ShouldNotExecuteException:
failures.append("Template test (Cached='%s', TEMPLATE_STRING_IF_INVALID='%s', TEMPLATE_DEBUG=%s): %s -- FAILED. Template loading invoked method that shouldn't have been invoked." % (is_cached, invalid_str, template_debug, name))

0 comments on commit c10ed58

Please sign in to comment.
Something went wrong with that request. Please try again.