mirror of
https://github.com/django/django.git
synced 2025-09-04 19:35:05 +03:00
Added test for various widths in tests/template_tests/filter_tests/test_center.py.
This commit is contained in:
parent
0a4999b422
commit
2d4ca62170
|
@ -34,3 +34,9 @@ class FunctionTests(SimpleTestCase):
|
||||||
|
|
||||||
def test_non_string_input(self):
|
def test_non_string_input(self):
|
||||||
self.assertEqual(center(123, 5), " 123 ")
|
self.assertEqual(center(123, 5), " 123 ")
|
||||||
|
|
||||||
|
def test_widths(self):
|
||||||
|
value = "something"
|
||||||
|
for i in range(-1, len(value) + 1):
|
||||||
|
with self.subTest(i=i):
|
||||||
|
self.assertEqual(center(value, i), value)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user