File: test_compounds.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 (20 lines) | stat: -rw-r--r-- 573 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from nose.tools import eq_

import inflect


class TestCompounds(object):
    def setup(self):
        self.p = inflect.engine()

    def test_compound_1(self):
        eq_(self.p.singular_noun('hello-out-there'), 'hello-out-there')

    def test_compound_2(self):
        eq_(self.p.singular_noun('hello out there'), 'hello out there')

    def test_compound_3(self):
        eq_(self.p.singular_noun('continue-to-operate'), 'continue-to-operate')

    def test_compound_4(self):
        eq_(self.p.singular_noun('case of diapers'), 'case of diapers')