def test_notTwoPair(self): ranks = [1, 2, 3, 4, 5] suits = ['d', 'c', 'h', 's'] hand = Hand( [Card(suits[random.randint(0, 3)], ranks[i]) for i in range(5)]) assert hand.isTwoPair() == False
def test_twoPair(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.isTwoPair() == True