diff options
| author | mriduldhall <mriduldhall1@gmail.com> | 2025-07-25 16:26:36 +0100 |
|---|---|---|
| committer | nessita <124304+nessita@users.noreply.github.com> | 2025-07-28 16:41:06 -0300 |
| commit | 2d4ca621700eed97f0cb8a19d02a05fc088b26d2 (patch) | |
| tree | 1b6b56d4892334a8ccd7a92d5d57abf76d3012a9 /tests/template_tests | |
| parent | 0a4999b422702c64e21f5a10a4d60300b7074401 (diff) | |
Added test for various widths in tests/template_tests/filter_tests/test_center.py.
Diffstat (limited to 'tests/template_tests')
| -rw-r--r-- | tests/template_tests/filter_tests/test_center.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/template_tests/filter_tests/test_center.py b/tests/template_tests/filter_tests/test_center.py index 3aafa9f9bb..8d0bf38006 100644 --- a/tests/template_tests/filter_tests/test_center.py +++ b/tests/template_tests/filter_tests/test_center.py @@ -34,3 +34,9 @@ class FunctionTests(SimpleTestCase): def test_non_string_input(self): 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) |
