Skip to content

Commit ff6f2c0

Browse files
mrcfpscmccandless
authored andcommitted
yacht: add test case "Four of a kind is not a full house" (exercism#1387)
Overly simple implementations checking only for two unique numbers will otherwise pass the test suite.
1 parent 0ade6f9 commit ff6f2c0

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

exercises/yacht/yacht_test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from yacht import score
55

66

7-
# Tests adapted from `problem-specifications//canonical-data.json` @ v1.0.0
7+
# Tests adapted from `problem-specifications//canonical-data.json` @ v1.1.0
88

99
class YachtTests(unittest.TestCase):
1010
def test_yacht(self):
@@ -46,6 +46,9 @@ def test_full_house_three_small_two_big(self):
4646
def test_two_pair_is_not_a_full_house(self):
4747
self.assertEqual(score([2, 2, 4, 4, 5], yacht.FULL_HOUSE), 0)
4848

49+
def test_four_of_a_kind_is_not_a_full_house(self):
50+
self.assertEqual(score([1, 4, 4, 4, 4], yacht.FULL_HOUSE), 0)
51+
4952
def test_yacht_is_not_a_full_house(self):
5053
self.assertEqual(score([2, 2, 2, 2, 2], yacht.FULL_HOUSE), 0)
5154

0 commit comments

Comments
 (0)