def test_threeOfAKind(self): ranks = [7, 7, 7, 4, 5] suits = ['d', 'c', 'h', 's'] hand = Hand( [Card(suits[random.randint(0, 3)], ranks[i]) for i in range(5)]) assert hand.isThreeOfAKind() == True
def test_twoPairNotThreeOfAKind(self): ranks = [7, 7, 4, 4, 5] suits = ['d', 'c', 'h', 's', 'd'] hand = Hand([Card(suits[i], ranks[i]) for i in range(5)]) assert hand.isThreeOfAKind() != True