예제 #1
0
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"
예제 #2
0
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"
예제 #3
0
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"
예제 #4
0
def test_deck_size():
	d = Deck()
	size = len(d.cards)
	assert size == 52, "should be 52 cards"
예제 #5
0
def test_shuffle():
	deck_shuffled = Deck()
	deck_shuffled.shuffle()
	
	deck_regular = Deck()
	assert deck_shuffled.cards != deck_regular.cards, "Shouldn't be equal"
예제 #6
0
def test_card_play_size():
    d = Deck()
    h = Hand(d.cards)
    card = h.play_card()
    assert len(h.cards) == 51, "should be 51 cards"
예제 #7
0
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"
예제 #8
0
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"