Ejemplo n.º 1
0
 def test_yacht_as_choice(self):
     self.assertEqual(score([2, 2, 2, 2, 2], yacht.CHOICE), 10)
Ejemplo n.º 2
0
 def test_big_straight(self):
     self.assertEqual(score([4, 6, 2, 5, 3], yacht.BIG_STRAIGHT), 30)
Ejemplo n.º 3
0
 def test_little_straight(self):
     self.assertEqual(score([3, 5, 4, 1, 2], yacht.LITTLE_STRAIGHT), 30)
Ejemplo n.º 4
0
 def test_min_1_max_5_but_not_a_little_straight(self):
     self.assertEqual(score([1, 1, 3, 4, 5], yacht.LITTLE_STRAIGHT), 0)
Ejemplo n.º 5
0
 def test_full_house_two_small_three_big(self):
     self.assertEqual(score([2, 2, 4, 4, 4], yacht.FULL_HOUSE), 16)
Ejemplo n.º 6
0
 def test_yacht_is_not_a_full_house(self):
     self.assertEqual(score([2, 2, 2, 2, 2], yacht.FULL_HOUSE), 0)
Ejemplo n.º 7
0
 def test_yacht_as_choice(self):
     self.assertEqual(yacht.score([2, 2, 2, 2, 2], yacht.CHOICE), 10)
Ejemplo n.º 8
0
 def test_fours(self):
     self.assertEqual(score([1, 4, 1, 4, 1], yacht.FOURS), 8)
Ejemplo n.º 9
0
 def test_yacht(self):
     self.assertEqual(yacht.score([5, 5, 5, 5, 5], yacht.YACHT), 50)
Ejemplo n.º 10
0
 def test_choice(self):
     self.assertEqual(yacht.score([3, 3, 5, 6, 6], yacht.CHOICE), 23)
Ejemplo n.º 11
0
 def test_four_of_a_kind_is_not_a_full_house(self):
     self.assertEqual(yacht.score([1, 4, 4, 4, 4], yacht.FULL_HOUSE), 0)
Ejemplo n.º 12
0
 def test_no_pairs_but_not_a_big_straight(self):
     self.assertEqual(yacht.score([6, 5, 4, 3, 1], Category.BIG_STRAIGHT),
                      0)
Ejemplo n.º 13
0
 def test_big_straight_as_little_straight(self):
     self.assertEqual(
         yacht.score([6, 5, 4, 3, 2], Category.LITTLE_STRAIGHT), 0)
Ejemplo n.º 14
0
 def test_ones(self):
     self.assertEqual(score([1, 1, 1, 3, 5], yacht.ONES), 3)
Ejemplo n.º 15
0
 def test_not_yacht(self):
     self.assertEqual(score([1, 3, 3, 2, 5], yacht.YACHT), 0)
Ejemplo n.º 16
0
 def test_no_ones(self):
     self.assertEqual(score([4, 3, 6, 5, 5], yacht.ONES), 0)
Ejemplo n.º 17
0
 def test_ones(self):
     self.assertEqual(score([1, 1, 1, 3, 5], yacht.ONES), 3)
Ejemplo n.º 18
0
 def test_yacht_of_threes_counted_as_fives(self):
     self.assertEqual(score([3, 3, 3, 3, 3], yacht.FIVES), 0)
Ejemplo n.º 19
0
 def test_ones_out_of_order(self):
     self.assertEqual(score([3, 1, 1, 5, 1], yacht.ONES), 3)
Ejemplo n.º 20
0
 def test_two_pair_is_not_a_full_house(self):
     self.assertEqual(score([2, 2, 4, 4, 5], yacht.FULL_HOUSE), 0)
Ejemplo n.º 21
0
 def test_no_ones(self):
     self.assertEqual(score([4, 3, 6, 5, 5], yacht.ONES), 0)
Ejemplo n.º 22
0
 def test_yacht_can_be_scored_as_four_of_a_kind(self):
     self.assertEqual(score([3, 3, 3, 3, 3], yacht.FOUR_OF_A_KIND), 12)
Ejemplo n.º 23
0
 def test_twos(self):
     self.assertEqual(score([2, 3, 4, 5, 6], yacht.TWOS), 2)
Ejemplo n.º 24
0
 def test_four_in_order_but_not_a_little_straight(self):
     self.assertEqual(score([1, 1, 2, 3, 4], yacht.LITTLE_STRAIGHT), 0)
Ejemplo n.º 25
0
 def test_fours(self):
     self.assertEqual(score([1, 4, 1, 4, 1], yacht.FOURS), 8)
Ejemplo n.º 26
0
 def test_big_straight_as_little_straight(self):
     self.assertEqual(score([6, 5, 4, 3, 2], yacht.LITTLE_STRAIGHT), 0)
Ejemplo n.º 27
0
 def test_yacht_counted_as_threes(self):
     self.assertEqual(score([3, 3, 3, 3, 3], yacht.THREES), 15)
Ejemplo n.º 28
0
 def test_minimum_is_1_maximum_is_5_but_not_a_little_straight(self):
     self.assertEqual(
         yacht.score([1, 1, 3, 4, 5], Category.LITTLE_STRAIGHT), 0)
Ejemplo n.º 29
0
 def test_yacht_of_threes_counted_as_fives(self):
     self.assertEqual(score([3, 3, 3, 3, 3], yacht.FIVES), 0)
Ejemplo n.º 30
0
 def test_not_yacht(self):
     self.assertEqual(score([1, 3, 3, 2, 5], yacht.YACHT), 0)
Ejemplo n.º 31
0
 def test_sixes(self):
     self.assertEqual(score([2, 3, 4, 5, 6], yacht.SIXES), 6)
Ejemplo n.º 32
0
 def test_ones_out_of_order(self):
     self.assertEqual(score([3, 1, 1, 5, 1], yacht.ONES), 3)
Ejemplo n.º 33
0
 def test_full_house_two_small_three_big(self):
     self.assertEqual(score([2, 2, 4, 4, 4], yacht.FULL_HOUSE), 16)
Ejemplo n.º 34
0
 def test_twos(self):
     self.assertEqual(score([2, 3, 4, 5, 6], yacht.TWOS), 2)
Ejemplo n.º 35
0
 def test_full_house_three_small_two_big(self):
     self.assertEqual(score([5, 3, 3, 5, 3], yacht.FULL_HOUSE), 19)
Ejemplo n.º 36
0
 def test_yacht_counted_as_threes(self):
     self.assertEqual(score([3, 3, 3, 3, 3], yacht.THREES), 15)
Ejemplo n.º 37
0
 def test_two_pair_is_not_a_full_house(self):
     self.assertEqual(score([2, 2, 4, 4, 5], yacht.FULL_HOUSE), 0)
Ejemplo n.º 38
0
 def test_sixes(self):
     self.assertEqual(score([2, 3, 4, 5, 6], yacht.SIXES), 6)
Ejemplo n.º 39
0
 def test_yacht_is_not_a_full_house(self):
     self.assertEqual(score([2, 2, 2, 2, 2], yacht.FULL_HOUSE), 0)
Ejemplo n.º 40
0
 def test_full_house_three_small_two_big(self):
     self.assertEqual(score([5, 3, 3, 5, 3], yacht.FULL_HOUSE), 19)
Ejemplo n.º 41
0
 def test_four_of_a_kind(self):
     self.assertEqual(score([6, 6, 4, 6, 6], yacht.FOUR_OF_A_KIND), 24)
Ejemplo n.º 42
0
 def test_four_of_a_kind_is_not_a_full_house(self):
     self.assertEqual(score([1, 4, 4, 4, 4], yacht.FULL_HOUSE), 0)
Ejemplo n.º 43
0
 def test_yacht_can_be_scored_as_four_of_a_kind(self):
     self.assertEqual(score([3, 3, 3, 3, 3], yacht.FOUR_OF_A_KIND), 12)
Ejemplo n.º 44
0
 def test_four_of_a_kind(self):
     self.assertEqual(score([6, 6, 4, 6, 6], yacht.FOUR_OF_A_KIND), 24)
Ejemplo n.º 45
0
 def test_full_house_is_not_four_of_a_kind(self):
     self.assertEqual(score([3, 5, 4, 1, 2], yacht.FOUR_OF_A_KIND), 0)
Ejemplo n.º 46
0
 def test_full_house_is_not_four_of_a_kind(self):
     self.assertEqual(score([3, 5, 4, 1, 2], yacht.FOUR_OF_A_KIND), 0)
Ejemplo n.º 47
0
 def test_little_straight(self):
     self.assertEqual(score([3, 5, 4, 1, 2], yacht.LITTLE_STRAIGHT), 30)
Ejemplo n.º 48
0
 def test_little_straight_as_big_straight(self):
     self.assertEqual(score([1, 2, 3, 4, 5], yacht.BIG_STRAIGHT), 0)
Ejemplo n.º 49
0
 def test_little_straight_as_big_straight(self):
     self.assertEqual(score([1, 2, 3, 4, 5], yacht.BIG_STRAIGHT), 0)
Ejemplo n.º 50
0
 def test_no_pairs_but_not_a_little_straight(self):
     self.assertEqual(score([1, 2, 3, 4, 6], yacht.LITTLE_STRAIGHT), 0)
Ejemplo n.º 51
0
 def test_four_in_order_but_not_a_little_straight(self):
     self.assertEqual(score([1, 1, 2, 3, 4], yacht.LITTLE_STRAIGHT), 0)
Ejemplo n.º 52
0
 def test_big_straight(self):
     self.assertEqual(score([4, 6, 2, 5, 3], yacht.BIG_STRAIGHT), 30)
Ejemplo n.º 53
0
 def test_no_pairs_but_not_a_little_straight(self):
     self.assertEqual(score([1, 2, 3, 4, 6], yacht.LITTLE_STRAIGHT), 0)
Ejemplo n.º 54
0
 def test_choice(self):
     self.assertEqual(score([3, 3, 5, 6, 6], yacht.CHOICE), 23)
Ejemplo n.º 55
0
 def test_min_1_max_5_but_not_a_little_straight(self):
     self.assertEqual(score([1, 1, 3, 4, 5], yacht.LITTLE_STRAIGHT), 0)
Ejemplo n.º 56
0
 def test_yacht(self):
     self.assertEqual(score([5, 5, 5, 5, 5], yacht.YACHT), 50)
Ejemplo n.º 57
0
 def test_full_house_is_not_four_of_a_kind(self):
     self.assertEqual(yacht.score([3, 3, 3, 5, 5], Category.FOUR_OF_A_KIND),
                      0)