Example #1
0
def test_full_house():
    deck = [
        Card(CLUBS, 2),
        Card(SPADES, 2),
        Card(HEARTS, 2),
        Card(CLUBS, 3),
        Card(HEARTS, 3)
    ]
    ranking = HandScorer.build_power_range(deck)
    assert ranking[0][0] == Rankings.FULL_HOUSE.value
Example #2
0
def test_straight_flush():
    deck = [
        Card(CLUBS, 2),
        Card(CLUBS, 3),
        Card(CLUBS, 4),
        Card(CLUBS, 5),
        Card(CLUBS, 6)
    ]
    ranking = HandScorer.build_power_range(deck)
    assert ranking[0][0] == Rankings.STRAIGHT_FLUSH.value
Example #3
0
def test_four_of_kind():
    deck = [Card(CLUBS, 2), Card(SPADES, 2), Card(SPADES, 2), Card(SPADES, 2)]
    ranking = HandScorer.build_power_range(deck)
    assert ranking[0][0] == Rankings.FOUR_CARD.value
Example #4
0
def test_double():
    deck = [Card(CLUBS, 2), Card(SPADES, 2)]
    ranking = HandScorer.build_power_range(deck)
    assert ranking[0][0] == Rankings.PAIR.value