Esempio n. 1
0
def test_deal_hands():
    deck = Deck()

    assert isinstance(deck.deal_card(), Card)

    deck = Deck()
    deck.shuffle()
    card1, card2 = deck.deal_hand()

    assert isinstance(card1, Card)
    assert isinstance(card2, Card)
    assert card1.value != card2.value or card1.suit != card2.suit
Esempio n. 2
0
def test_deal_hand():
    deck = Deck()

    assert isinstance(deck.deal_card(), Card)

    card1, card2 = deck.deal_hand()

    assert isinstance(card1, Card)
    assert isinstance(card2, Card)

    assert card1 != card2

    deck = Deck()
    deck.shuffle()
    card1, card2 = deck.deal_hand()

    assert card1 != card2

    card1, card2 = deck.deal_card(), deck.deal_card()

    assert card1 != card2