mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
improve result output of a pelican run
* display count of hidden pages * pluralize only if necessary * add maybe_pluralize to utils * add tests for maybe_pluralize
This commit is contained in:
parent
940eb76b7f
commit
39fd4936b5
3 changed files with 50 additions and 7 deletions
|
|
@ -358,6 +358,12 @@ class TestUtils(LoggedTestCase):
|
|||
locale.setlocale(locale.LC_ALL, old_locale)
|
||||
|
||||
|
||||
def test_maybe_pluralize(self):
|
||||
self.assertEqual(utils.maybe_pluralize(0, 'Article', 'Articles'), '0 Articles')
|
||||
self.assertEqual(utils.maybe_pluralize(1, 'Article', 'Articles'), '1 Article')
|
||||
self.assertEqual(utils.maybe_pluralize(2, 'Article', 'Articles'), '2 Articles')
|
||||
|
||||
|
||||
class TestCopy(unittest.TestCase):
|
||||
'''Tests the copy utility'''
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue