()
| 44 | '|_##| \n' |
| 45 | |
| 46 | def test_getCardValue(): |
| 47 | # Test the pip card values: |
| 48 | for i in range(2, 11): |
| 49 | assert blackjack.getCardValue([(str(i), blackjack.HEARTS)]) == i |
| 50 | |
| 51 | # Test the pip card values (multiple cards): |
| 52 | for i in range(2, 11): |
| 53 | for j in range(2, 11): |
| 54 | assert blackjack.getCardValue([(str(i), blackjack.HEARTS), (str(j), blackjack.HEARTS)]) == i + j |
| 55 | |
| 56 | # Test the face cards: |
| 57 | for i in ('J', 'Q', 'K'): |
| 58 | assert blackjack.getCardValue([(i, blackjack.HEARTS)]) == 10 |
| 59 | |
| 60 | # Test the ace cards: |
| 61 | assert blackjack.getCardValue([('A', blackjack.HEARTS)]) == 11 |
| 62 | assert blackjack.getCardValue([('A', blackjack.HEARTS), ('K', blackjack.HEARTS)]) == 21 |
| 63 | assert blackjack.getCardValue([('A', blackjack.HEARTS), ('K', blackjack.HEARTS), ('K', blackjack.DIAMONDS)]) == 21 |
| 64 | assert blackjack.getCardValue([('A', blackjack.HEARTS), ('6', blackjack.HEARTS), ('6', blackjack.DIAMONDS)]) == 13 |
| 65 | |
| 66 | |
| 67 | def test_getDeck(): |
nothing calls this directly
no outgoing calls
no test coverage detected