コード例 #1
0
    def test_1(self):
        hand = CardHand()
        hand.add(Card('1', 'D'))
        hand.add(Card('2', 'D'))

        actual = hand.score()
        expected = 3
        self.assertEqual(actual, expected)
コード例 #2
0
    def test_7(self):
        hand = CardHand()
        hand.add(Card('7', 'D'))
        hand.add(Card('K', 'D'))

        actual = hand.score()
        expected = 17
        self.assertEqual(actual, expected)
コード例 #3
0
    def test_3(self):
        hand = CardHand()
        hand.add(Card('J', 'D'))
        hand.add(Card('A', 'D'))

        actual = hand.score()
        expected = 21
        self.assertEqual(actual, expected)