Example #1
0
 def test_yacht_as_choice(self):
     self.assertEqual(score([2, 2, 2, 2, 2], yacht.CHOICE), 10)
Example #2
0
 def test_big_straight(self):
     self.assertEqual(score([4, 6, 2, 5, 3], yacht.BIG_STRAIGHT), 30)
Example #3
0
 def test_little_straight(self):
     self.assertEqual(score([3, 5, 4, 1, 2], yacht.LITTLE_STRAIGHT), 30)
Example #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)
Example #5
0
 def test_full_house_two_small_three_big(self):
     self.assertEqual(score([2, 2, 4, 4, 4], yacht.FULL_HOUSE), 16)
Example #6
0
 def test_yacht_is_not_a_full_house(self):
     self.assertEqual(score([2, 2, 2, 2, 2], yacht.FULL_HOUSE), 0)
 def test_yacht_as_choice(self):
     self.assertEqual(yacht.score([2, 2, 2, 2, 2], yacht.CHOICE), 10)
Example #8
0
 def test_fours(self):
     self.assertEqual(score([1, 4, 1, 4, 1], yacht.FOURS), 8)
 def test_yacht(self):
     self.assertEqual(yacht.score([5, 5, 5, 5, 5], yacht.YACHT), 50)
 def test_choice(self):
     self.assertEqual(yacht.score([3, 3, 5, 6, 6], yacht.CHOICE), 23)
 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)
Example #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)
Example #13
0
 def test_big_straight_as_little_straight(self):
     self.assertEqual(
         yacht.score([6, 5, 4, 3, 2], Category.LITTLE_STRAIGHT), 0)
Example #14
0
 def test_ones(self):
     self.assertEqual(score([1, 1, 1, 3, 5], yacht.ONES), 3)
Example #15
0
 def test_not_yacht(self):
     self.assertEqual(score([1, 3, 3, 2, 5], yacht.YACHT), 0)
Example #16
0
 def test_no_ones(self):
     self.assertEqual(score([4, 3, 6, 5, 5], yacht.ONES), 0)
Example #17
0
 def test_ones(self):
     self.assertEqual(score([1, 1, 1, 3, 5], yacht.ONES), 3)
Example #18
0
 def test_yacht_of_threes_counted_as_fives(self):
     self.assertEqual(score([3, 3, 3, 3, 3], yacht.FIVES), 0)
Example #19
0
 def test_ones_out_of_order(self):
     self.assertEqual(score([3, 1, 1, 5, 1], yacht.ONES), 3)
Example #20
0
 def test_two_pair_is_not_a_full_house(self):
     self.assertEqual(score([2, 2, 4, 4, 5], yacht.FULL_HOUSE), 0)
Example #21
0
 def test_no_ones(self):
     self.assertEqual(score([4, 3, 6, 5, 5], yacht.ONES), 0)
Example #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)
Example #23
0
 def test_twos(self):
     self.assertEqual(score([2, 3, 4, 5, 6], yacht.TWOS), 2)
Example #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)
Example #25
0
 def test_fours(self):
     self.assertEqual(score([1, 4, 1, 4, 1], yacht.FOURS), 8)
Example #26
0
 def test_big_straight_as_little_straight(self):
     self.assertEqual(score([6, 5, 4, 3, 2], yacht.LITTLE_STRAIGHT), 0)
Example #27
0
 def test_yacht_counted_as_threes(self):
     self.assertEqual(score([3, 3, 3, 3, 3], yacht.THREES), 15)
Example #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)
Example #29
0
 def test_yacht_of_threes_counted_as_fives(self):
     self.assertEqual(score([3, 3, 3, 3, 3], yacht.FIVES), 0)
Example #30
0
 def test_not_yacht(self):
     self.assertEqual(score([1, 3, 3, 2, 5], yacht.YACHT), 0)
Example #31
0
 def test_sixes(self):
     self.assertEqual(score([2, 3, 4, 5, 6], yacht.SIXES), 6)
Example #32
0
 def test_ones_out_of_order(self):
     self.assertEqual(score([3, 1, 1, 5, 1], yacht.ONES), 3)
Example #33
0
 def test_full_house_two_small_three_big(self):
     self.assertEqual(score([2, 2, 4, 4, 4], yacht.FULL_HOUSE), 16)
Example #34
0
 def test_twos(self):
     self.assertEqual(score([2, 3, 4, 5, 6], yacht.TWOS), 2)
Example #35
0
 def test_full_house_three_small_two_big(self):
     self.assertEqual(score([5, 3, 3, 5, 3], yacht.FULL_HOUSE), 19)
Example #36
0
 def test_yacht_counted_as_threes(self):
     self.assertEqual(score([3, 3, 3, 3, 3], yacht.THREES), 15)
Example #37
0
 def test_two_pair_is_not_a_full_house(self):
     self.assertEqual(score([2, 2, 4, 4, 5], yacht.FULL_HOUSE), 0)
Example #38
0
 def test_sixes(self):
     self.assertEqual(score([2, 3, 4, 5, 6], yacht.SIXES), 6)
Example #39
0
 def test_yacht_is_not_a_full_house(self):
     self.assertEqual(score([2, 2, 2, 2, 2], yacht.FULL_HOUSE), 0)
Example #40
0
 def test_full_house_three_small_two_big(self):
     self.assertEqual(score([5, 3, 3, 5, 3], yacht.FULL_HOUSE), 19)
Example #41
0
 def test_four_of_a_kind(self):
     self.assertEqual(score([6, 6, 4, 6, 6], yacht.FOUR_OF_A_KIND), 24)
Example #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)
Example #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)
Example #44
0
 def test_four_of_a_kind(self):
     self.assertEqual(score([6, 6, 4, 6, 6], yacht.FOUR_OF_A_KIND), 24)
Example #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)
Example #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)
Example #47
0
 def test_little_straight(self):
     self.assertEqual(score([3, 5, 4, 1, 2], yacht.LITTLE_STRAIGHT), 30)
Example #48
0
 def test_little_straight_as_big_straight(self):
     self.assertEqual(score([1, 2, 3, 4, 5], yacht.BIG_STRAIGHT), 0)
Example #49
0
 def test_little_straight_as_big_straight(self):
     self.assertEqual(score([1, 2, 3, 4, 5], yacht.BIG_STRAIGHT), 0)
Example #50
0
 def test_no_pairs_but_not_a_little_straight(self):
     self.assertEqual(score([1, 2, 3, 4, 6], yacht.LITTLE_STRAIGHT), 0)
Example #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)
Example #52
0
 def test_big_straight(self):
     self.assertEqual(score([4, 6, 2, 5, 3], yacht.BIG_STRAIGHT), 30)
Example #53
0
 def test_no_pairs_but_not_a_little_straight(self):
     self.assertEqual(score([1, 2, 3, 4, 6], yacht.LITTLE_STRAIGHT), 0)
Example #54
0
 def test_choice(self):
     self.assertEqual(score([3, 3, 5, 6, 6], yacht.CHOICE), 23)
Example #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)
Example #56
0
 def test_yacht(self):
     self.assertEqual(score([5, 5, 5, 5, 5], yacht.YACHT), 50)
Example #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)