-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_cap.py
35 lines (25 loc) · 885 Bytes
/
test_cap.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
import unittest
import cap
class TestCap(unittest.TestCase):
def setup(self):
pass
def tearDown(self):
pass
def test_one_word(self):
text = "duck"
result = cap.just_do_it(text)
self.assertEqual(result, "Duck")
def test_multi_words(self):
text = "a veritable flock of ducks"
result = cap.just_do_it(text)
self.assertEqual(result, "A Veritable Flock Of Ducks")
def test_words_with_apostrophes(self):
text = "I'm fresh out of ideas"
result = cap.just_do_it(text)
self.assertEqual(result, "I'm Fresh Out Of Ideas")
def test_words_with_quotes(self):
text = "\"You're despicable, \" said Daffy Duck"
result = cap.just_do_it(text)
self.assertEqual(result, "\"You're Despicable, \" Said Daffy Duck")
if __name__ == "__main__":
unittest.main()