def test_adding_cards(): d = Deck() h = Hand(d.cards) temp_cards = [] temp_cards.append(h.play_card()) temp_cards.append(h.play_card()) temp_cards.append(h.play_card()) h.add_cards(temp_cards) assert len(h.cards) == 52, "should be 52 cards"
def test_cards_size_from_war_play(): d = Deck() player = Player("Luis", Hand(d.cards)) cards_facing_down = player.war_play() assert len(cards_facing_down) == 3, "should be 3 cards"
def test_players_hand_size_after_war(): d = Deck() player = Player("Luis", Hand(d.cards)) cards_facing_down = player.war_play() assert len(player.hand.cards) == 49, "should be 49 cards"
def test_deck_size(): d = Deck() size = len(d.cards) assert size == 52, "should be 52 cards"
def test_shuffle(): deck_shuffled = Deck() deck_shuffled.shuffle() deck_regular = Deck() assert deck_shuffled.cards != deck_regular.cards, "Shouldn't be equal"
def test_card_play_size(): d = Deck() h = Hand(d.cards) card = h.play_card() assert len(h.cards) == 51, "should be 51 cards"
def test_empty_hands(): d = Deck() h = Hand(d.cards) cards = h.empty_the_hand() assert h.is_empty() and len( cards) == 52, "should be empty and temp cards should be 52"
def test_card_play(): d = Deck() h = Hand(d.cards) card = h.play_card() assert not card in h.cards, "should not be in hand"