-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_scorecard.py
72 lines (57 loc) · 2.28 KB
/
test_scorecard.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import unittest
import Scorecard
class Test_Scorecard(unittest.TestCase):
def setUp(self):
self.scorecard = Scorecard.Scorecard()
def test_change_score_ones(self):
self.scorecard.ones = 4
with self.assertRaises(ValueError):
self.scorecard.ones = 4
def test_change_score_twos(self):
self.scorecard.twos = 4
with self.assertRaises(ValueError):
self.scorecard.twos = 4
def test_change_score_threes(self):
self.scorecard.threes = 4
with self.assertRaises(ValueError):
self.scorecard.threes = 4
def test_change_score_fours(self):
self.scorecard.fours = 4
with self.assertRaises(ValueError):
self.scorecard.fours= 4
def test_change_score_fives(self):
self.scorecard.fives = 4
with self.assertRaises(ValueError):
self.scorecard.fives = 4
def test_change_score_sixes(self):
self.scorecard.sixes = 4
with self.assertRaises(ValueError):
self.scorecard.sixes = 4
def test_change_score_three_of_kind(self):
self.scorecard.three_of_kind = 4
with self.assertRaises(ValueError):
self.scorecard.three_of_kind = 4
def test_change_score_four_of_kind(self):
self.scorecard.four_of_kind = 4
with self.assertRaises(ValueError):
self.scorecard.four_of_kind = 4
def test_change_score_fullhouse(self):
self.scorecard.fullhouse = 4
with self.assertRaises(ValueError):
self.scorecard.fullhouse = 4
def test_change_score_sm_straight(self):
self.scorecard.sm_straight = 4
with self.assertRaises(ValueError):
self.scorecard.sm_straight = 4
def test_change_score_lg_straight(self):
self.scorecard.lg_straight = 4
with self.assertRaises(ValueError):
self.scorecard.lg_straight = 4
def test_change_score_yatzy(self):
self.scorecard.yatzy = 4
with self.assertRaises(ValueError):
self.scorecard.yatzy = 4
def test_change_score_chance(self):
self.scorecard.chance = 4
with self.assertRaises(ValueError):
self.scorecard.chance = 4