File: test_classical_zero.py

package info (click to toggle)
python-inflect 0.2.5-1.1~deb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 568 kB
  • sloc: python: 4,899; makefile: 14
file content (24 lines) | stat: -rw-r--r-- 806 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from nose.tools import eq_

import inflect


def test_ancient_1():
    p = inflect.engine()

    # DEFAULT...

    eq_(p.plural_noun('error', 0), 'errors', msg="classical 'zero' not active")

    # "person" PLURALS ACTIVATED...

    p.classical(zero=True)
    eq_(p.plural_noun('error', 0), 'error', msg="classical 'zero' active")

    # OTHER CLASSICALS NOT ACTIVATED...

    eq_(p.plural_noun('wildebeest'), 'wildebeests', msg="classical 'herd' not active")
    eq_(p.plural_noun('formula'),    'formulas',    msg="classical 'ancient' active")
    eq_(p.plural_noun('person'),     'people',      msg="classical 'persons' not active")
    eq_(p.plural_noun('brother'),    'brothers',    msg="classical 'all' not active")
    eq_(p.plural_noun('Sally'),      'Sallys',      msg="classical 'names' active")