Beispiel #1
0
 def test_a_single_five(self):
     self.assertEqual(50, greed_instance.score([5]))
Beispiel #2
0
 def test_too_many_dice(self):
     with self.assertRaises(ValueError):
         greed_instance.score([1, 2, 3, 4, 5, 6, 7])
Beispiel #3
0
 def test_a_single_one(self):
     self.assertEqual(100, greed_instance.score([1]))
Beispiel #4
0
 def test_straight(self):
     self.assertEqual(1200, greed_instance.score([1, 2, 3, 4, 5, 6]))
Beispiel #5
0
 def test_straight_out_of_order(self):
     self.assertEqual(1200, greed_instance.score([4, 5, 6, 1, 2, 3]))
Beispiel #6
0
 def test_six_of_a_kind(self):
     self.assertEqual(8000, greed_instance.score([1, 1, 1, 1, 1, 1]))
Beispiel #7
0
 def test_three_pairs(self):
     self.assertEqual(800, greed_instance.score([1, 1, 2, 2, 3, 3]))
Beispiel #8
0
 def test_triple_sixes(self):
     self.assertEqual(600, greed_instance.score([6, 6, 6]))
Beispiel #9
0
 def test_five_of_a_kind(self):
     self.assertEqual(4000, greed_instance.score([1, 1, 1, 1, 1]))
Beispiel #10
0
 def test_triple_fives(self):
     self.assertEqual(500, greed_instance.score([5, 5, 5]))
Beispiel #11
0
 def test_triple_fours(self):
     self.assertEqual(400, greed_instance.score([4, 4, 4]))
Beispiel #12
0
 def test_triple_threes(self):
     self.assertEqual(300, greed_instance.score([3, 3, 3]))
Beispiel #13
0
 def test_triple_twos(self):
     self.assertEqual(200, greed_instance.score([2, 2, 2]))
Beispiel #14
0
 def test_triple_ones(self):
     self.assertEqual(1000, greed_instance.score([1, 1, 1]))