forked from nfigz/python-game
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUnitTest.py
More file actions
46 lines (38 loc) · 1.25 KB
/
UnitTest.py
File metadata and controls
46 lines (38 loc) · 1.25 KB
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
43
44
45
46
"""
UnitTest class first imports unittest module
then imports PandasToList class
"""
import unittest
from PandasToList import PandasToList
class UnitTest(unittest.TestCase):
"""
The UnitTest class runs two unit test on the
PandasToList class
"""
def test_upright_deck_list(self):
"""
test_upright_deck_list verifies that the
return of upright_deck() in PandasToList class
returns a list
expected is type(list())
result should be type(list())
"""
p = PandasToList()
upright_result = type(p.upright_deck('files/TarotCardsUpright.csv'))
upright_expected = type(list())
self.assertEqual(upright_expected, upright_result)
def test_reverse_deck_list(self):
"""
test_reverse_deck_list verifies that the
return of reverse_deck() in PandasToList class
returns a list
expected is type(list())
result should be type(list())
"""
p = PandasToList()
reverse_result = type(p.reverse_deck('files/TarotCardsReversed.csv'))
reverse_expected = type(list())
self.assertEqual(reverse_expected, reverse_result)
if __name__ == "__main__":
# runs the unittest to see results
unittest.main()