mirror of
https://github.com/kennethreitz/dive-into-python3.git
synced 2026-06-05 23:10:17 +00:00
you wouldn't believe me if I told you
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
"""Unit test for plural2.py"""
|
||||
'''Unit test for plural2.py'''
|
||||
|
||||
import plural2
|
||||
import unittest
|
||||
|
||||
class KnownValues(unittest.TestCase):
|
||||
def test_sxz(self):
|
||||
"words ending in S, X, and Z"
|
||||
'words ending in S, X, and Z'
|
||||
nouns = {
|
||||
'bass': 'basses',
|
||||
'bus': 'buses',
|
||||
@@ -21,7 +21,7 @@ class KnownValues(unittest.TestCase):
|
||||
self.assertEqual(plural2.plural(singular), plural)
|
||||
|
||||
def test_h(self):
|
||||
"words ending in H"
|
||||
'words ending in H'
|
||||
nouns = {
|
||||
'coach': 'coaches',
|
||||
'glitch': 'glitches',
|
||||
@@ -34,7 +34,7 @@ class KnownValues(unittest.TestCase):
|
||||
self.assertEqual(plural2.plural(singular), plural)
|
||||
|
||||
def test_y(self):
|
||||
"words ending in Y"
|
||||
'words ending in Y'
|
||||
nouns = {
|
||||
'utility': 'utilities',
|
||||
'vacancy': 'vacancies',
|
||||
@@ -45,7 +45,7 @@ class KnownValues(unittest.TestCase):
|
||||
self.assertEqual(plural2.plural(singular), plural)
|
||||
|
||||
def test_default(self):
|
||||
"unexceptional words"
|
||||
'unexceptional words'
|
||||
nouns = {
|
||||
'papaya': 'papayas',
|
||||
'whip': 'whips',
|
||||
@@ -54,7 +54,7 @@ class KnownValues(unittest.TestCase):
|
||||
for singular, plural in nouns.items():
|
||||
self.assertEqual(plural2.plural(singular), plural)
|
||||
|
||||
if __name__ == "__main__":
|
||||
if __name__ == '__main__':
|
||||
unittest.main()
|
||||
|
||||
# Copyright (c) 2009, Mark Pilgrim, All rights reserved.
|
||||
|
||||
Reference in New Issue
Block a user