forked from jaraco/inflect
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed formatting and the new tests, updated change log
- Loading branch information
Alex Grönholm
committed
Jun 17, 2013
1 parent
ff8065c
commit 39ee1da
Showing
3 changed files
with
26 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
ver 0.2.5 | ||
|
||
* Fixed TypeError while parsing compounds (by yavarhusain) | ||
|
||
|
||
ver 0.2.4 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,20 @@ | ||
import unittest | ||
from nose.tools import eq_ | ||
|
||
import inflect | ||
|
||
class test(unittest.TestCase): | ||
def test_compound_1(self): | ||
self.assertEqual(p.singular_noun('hello-out-there'),'hello-out-there') | ||
def test_compound_2(self): | ||
self.assertEqual(p.singular_noun('hello out there'),'hello out there') | ||
def test_compound_3(self): | ||
self.assertEqual(p.singular_noun('continue-to-operate'),'continue-to-operate') | ||
def test_compound_4(self): | ||
self.assertEqual(p.singular_noun('case of diapers'),'case of diapers') | ||
|
||
if __name__ == '__main__': | ||
p=inflect.engine() | ||
unittest.main() | ||
|
||
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') |