-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_word.py
42 lines (38 loc) · 1.02 KB
/
test_word.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import unittest
from word import WordForm
from letter import Letter, Vowel, LongVowel, ShortVowel
class TestWordForm(unittest.TestCase):
def test_vowel_neq_longvowel(self):
self.assertNotEqual(
WordForm(
LongVowel('u'),
Letter('s'),
Letter('c'),
Letter('r'),
LongVowel('a')
),
WordForm(
Vowel('u'),
Letter('s'),
Letter('c'),
Letter('r'),
LongVowel('a')
)
)
def test_shortvowel_neq_longvowel(self):
self.assertNotEqual(
WordForm(
LongVowel('u'),
Letter('s'),
Letter('c'),
Letter('r'),
LongVowel('a')
),
WordForm(
ShortVowel('u'),
Letter('s'),
Letter('c'),
Letter('r'),
LongVowel('a')
)
)