summaryrefslogtreecommitdiff
path: root/tests/template_tests
diff options
context:
space:
mode:
authorza <za@python.or.id>2016-10-27 14:53:39 +0700
committerTim Graham <timograham@gmail.com>2016-11-10 21:30:21 -0500
commit321e94fa41b121f65c02119c02098df327bbd569 (patch)
treece5476c191d589aca4b124f841dfbccac8dd299f /tests/template_tests
parent4bb70cbcc60794f515c9bfefeca87b8272d33c0c (diff)
Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.
Diffstat (limited to 'tests/template_tests')
-rw-r--r--tests/template_tests/filter_tests/test_floatformat.py6
-rw-r--r--tests/template_tests/filter_tests/test_join.py3
-rw-r--r--tests/template_tests/filter_tests/test_timesince.py4
-rw-r--r--tests/template_tests/filter_tests/test_timeuntil.py2
-rw-r--r--tests/template_tests/syntax_tests/test_for.py2
-rw-r--r--tests/template_tests/syntax_tests/test_include.py4
-rw-r--r--tests/template_tests/test_context.py2
-rw-r--r--tests/template_tests/test_custom.py11
-rw-r--r--tests/template_tests/test_engine.py4
9 files changed, 18 insertions, 20 deletions
diff --git a/tests/template_tests/filter_tests/test_floatformat.py b/tests/template_tests/filter_tests/test_floatformat.py
index 099ec4d174..d2c39d3d48 100644
--- a/tests/template_tests/filter_tests/test_floatformat.py
+++ b/tests/template_tests/filter_tests/test_floatformat.py
@@ -56,14 +56,10 @@ class FunctionTests(SimpleTestCase):
self.assertEqual(floatformat(None), '')
def test_zero_values(self):
- """
- Check that we're not converting to scientific notation.
- """
self.assertEqual(floatformat(0, 6), '0.000000')
self.assertEqual(floatformat(0, 7), '0.0000000')
self.assertEqual(floatformat(0, 10), '0.0000000000')
- self.assertEqual(floatformat(0.000000000000000000015, 20),
- '0.00000000000000000002')
+ self.assertEqual(floatformat(0.000000000000000000015, 20), '0.00000000000000000002')
def test_infinity(self):
pos_inf = float(1e30000)
diff --git a/tests/template_tests/filter_tests/test_join.py b/tests/template_tests/filter_tests/test_join.py
index 12d2f7257e..2d2a9cf78e 100644
--- a/tests/template_tests/filter_tests/test_join.py
+++ b/tests/template_tests/filter_tests/test_join.py
@@ -27,8 +27,7 @@ class JoinTests(SimpleTestCase):
output = self.engine.render_to_string('join04', {'a': ['alpha', 'beta & me']})
self.assertEqual(output, 'alpha &amp; beta & me')
- # #11377 Test that joining with unsafe joiners doesn't result in
- # unsafe strings
+ # Joining with unsafe joiners doesn't result in unsafe strings.
@setup({'join05': '{{ a|join:var }}'})
def test_join05(self):
output = self.engine.render_to_string('join05', {'a': ['alpha', 'beta & me'], 'var': ' & '})
diff --git a/tests/template_tests/filter_tests/test_timesince.py b/tests/template_tests/filter_tests/test_timesince.py
index 0572b5bd1c..0cb975a90e 100644
--- a/tests/template_tests/filter_tests/test_timesince.py
+++ b/tests/template_tests/filter_tests/test_timesince.py
@@ -54,7 +54,7 @@ class TimesinceTests(TimezoneTestCase):
)
self.assertEqual(output, '1\xa0minute')
- # Check that timezone is respected
+ # Timezone is respected
@setup({'timesince06': '{{ a|timesince:b }}'})
def test_timesince06(self):
output = self.engine.render_to_string('timesince06', {'a': self.now_tz - timedelta(hours=8), 'b': self.now_tz})
@@ -83,7 +83,7 @@ class TimesinceTests(TimezoneTestCase):
output = self.engine.render_to_string('timesince10', {'now': self.now, 'later': self.now + timedelta(days=7)})
self.assertEqual(output, '0\xa0minutes')
- # Ensures that differing timezones are calculated correctly.
+ # Differing timezones are calculated correctly.
@setup({'timesince11': '{{ a|timesince }}'})
def test_timesince11(self):
output = self.engine.render_to_string('timesince11', {'a': self.now})
diff --git a/tests/template_tests/filter_tests/test_timeuntil.py b/tests/template_tests/filter_tests/test_timeuntil.py
index 2fe633ffa2..1b06a21c93 100644
--- a/tests/template_tests/filter_tests/test_timeuntil.py
+++ b/tests/template_tests/filter_tests/test_timeuntil.py
@@ -70,7 +70,7 @@ class TimeuntilTests(TimezoneTestCase):
output = self.engine.render_to_string('timeuntil09', {'now': self.now, 'later': self.now + timedelta(days=7)})
self.assertEqual(output, '1\xa0week')
- # Ensures that differing timezones are calculated correctly.
+ # Differing timezones are calculated correctly.
@requires_tz_support
@setup({'timeuntil10': '{{ a|timeuntil }}'})
def test_timeuntil10(self):
diff --git a/tests/template_tests/syntax_tests/test_for.py b/tests/template_tests/syntax_tests/test_for.py
index 4af7881e57..2891d16f67 100644
--- a/tests/template_tests/syntax_tests/test_for.py
+++ b/tests/template_tests/syntax_tests/test_for.py
@@ -87,7 +87,7 @@ class ForTagTests(SimpleTestCase):
@setup({'for-tag-unpack09': '{% for val in items %}{{ val.0 }}:{{ val.1 }}/{% endfor %}'})
def test_for_tag_unpack09(self):
"""
- Ensure that a single loopvar doesn't truncate the list in val.
+ A single loopvar doesn't truncate the list in val.
"""
output = self.engine.render_to_string('for-tag-unpack09', {'items': (('one', 1), ('two', 2))})
self.assertEqual(output, 'one:1/two:2/')
diff --git a/tests/template_tests/syntax_tests/test_include.py b/tests/template_tests/syntax_tests/test_include.py
index ebf3e8e7ab..ca7ee6f5b0 100644
--- a/tests/template_tests/syntax_tests/test_include.py
+++ b/tests/template_tests/syntax_tests/test_include.py
@@ -226,7 +226,7 @@ class IncludeTests(SimpleTestCase):
def test_include_missing_template(self):
"""
- Tests that the correct template is identified as not existing
+ The correct template is identified as not existing
when {% include %} specifies a template that does not exist.
"""
engine = Engine(app_dirs=True, debug=True)
@@ -237,7 +237,7 @@ class IncludeTests(SimpleTestCase):
def test_extends_include_missing_baseloader(self):
"""
- #12787 -- Tests that the correct template is identified as not existing
+ #12787 -- The correct template is identified as not existing
when {% extends %} specifies a template that does exist, but that
template has an {% include %} of something that does not exist.
"""
diff --git a/tests/template_tests/test_context.py b/tests/template_tests/test_context.py
index c061610a19..79f7b06794 100644
--- a/tests/template_tests/test_context.py
+++ b/tests/template_tests/test_context.py
@@ -116,7 +116,7 @@ class ContextTests(SimpleTestCase):
def test_render_context(self):
test_context = RenderContext({'fruit': 'papaya'})
- # Test that push() limits access to the topmost dict
+ # push() limits access to the topmost dict
test_context.push()
test_context['vegetable'] = 'artichoke'
diff --git a/tests/template_tests/test_custom.py b/tests/template_tests/test_custom.py
index 12331afce8..e1df10c760 100644
--- a/tests/template_tests/test_custom.py
+++ b/tests/template_tests/test_custom.py
@@ -127,7 +127,8 @@ class SimpleTagTests(TagTestCase):
self.assertEqual(t.render(c), "Hello Jack &amp; Jill!")
def test_simple_tag_registration(self):
- # Test that the decorators preserve the decorated function's docstring, name and attributes.
+ # The decorators preserve the decorated function's docstring, name,
+ # and attributes.
self.verify_tag(custom.no_params, 'no_params')
self.verify_tag(custom.one_param, 'one_param')
self.verify_tag(custom.explicit_no_context, 'explicit_no_context')
@@ -257,7 +258,8 @@ class InclusionTagTests(TagTestCase):
self.assertEqual(t.render(c), entry[1])
def test_inclusion_tag_registration(self):
- # Test that the decorators preserve the decorated function's docstring, name and attributes.
+ # The decorators preserve the decorated function's docstring, name,
+ # and attributes.
self.verify_tag(inclusion.inclusion_no_params, 'inclusion_no_params')
self.verify_tag(inclusion.inclusion_one_param, 'inclusion_one_param')
self.verify_tag(inclusion.inclusion_explicit_no_context, 'inclusion_explicit_no_context')
@@ -273,7 +275,7 @@ class InclusionTagTests(TagTestCase):
def test_15070_use_l10n(self):
"""
- Test that inclusion tag passes down `use_l10n` of context to the
+ Inclusion tag passes down `use_l10n` of context to the
Context of the included/rendered template as well.
"""
c = Context({})
@@ -313,7 +315,8 @@ class AssignmentTagTests(TagTestCase):
self.assertEqual(t.render(c), 'The result is: assignment_no_params - Expected result')
def test_assignment_tag_registration(self):
- # Test that the decorators preserve the decorated function's docstring, name and attributes.
+ # The decorators preserve the decorated function's docstring, name,
+ # and attributes.
self.verify_tag(custom.assignment_no_params, 'assignment_no_params')
def test_assignment_tag_missing_context(self):
diff --git a/tests/template_tests/test_engine.py b/tests/template_tests/test_engine.py
index 61ab7259ea..3b65dcb4f2 100644
--- a/tests/template_tests/test_engine.py
+++ b/tests/template_tests/test_engine.py
@@ -30,7 +30,7 @@ class LoaderTests(SimpleTestCase):
def test_loader_priority(self):
"""
- #21460 -- Check that the order of template loader works.
+ #21460 -- The order of template loader works.
"""
loaders = [
'django.template.loaders.filesystem.Loader',
@@ -42,7 +42,7 @@ class LoaderTests(SimpleTestCase):
def test_cached_loader_priority(self):
"""
- Check that the order of template loader works. Refs #21460.
+ The order of template loader works. Refs #21460.
"""
loaders = [
('django.template.loaders.cached.Loader', [