diff options
| author | Moayad Mardini <moayad.m@gmail.com> | 2014-06-10 21:28:32 +0300 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2014-06-10 16:04:43 -0400 |
| commit | 868ff4e37c1e4cfaf7283496c24f6e711ad66005 (patch) | |
| tree | 12313f4aad04c89f16fc5e53bf154d4b0f146a54 /tests | |
| parent | f97c53c0989336563c535c9737dff197b403054d (diff) | |
Fixed #22798 -- `pluralize()` now adds plural_suffix for any `1 < d < 2`
Thanks Odd_Bloke for the report.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/defaultfilters/tests.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/defaultfilters/tests.py b/tests/defaultfilters/tests.py index ab6ff80961..7ebef193fa 100644 --- a/tests/defaultfilters/tests.py +++ b/tests/defaultfilters/tests.py @@ -654,6 +654,11 @@ class DefaultFiltersTests(TestCase): self.assertEqual(pluralize(1), '') self.assertEqual(pluralize(0), 's') self.assertEqual(pluralize(2), 's') + + # Ticket #22798 + self.assertEqual(pluralize(0.5), 's') + self.assertEqual(pluralize(1.5), 's') + self.assertEqual(pluralize(decimal.Decimal(1)), '') self.assertEqual(pluralize(decimal.Decimal(0)), 's') self.assertEqual(pluralize(decimal.Decimal(2)), 's') |
