Example #1
0
 def test_deck(self):
     deck = Deck()
     assert 52 == len(deck.get_deck()) and 0 == len(deck.get_discard_pile())
Example #2
0
    def test_inspect_discard(self):
        deck = Deck()

        deck.discard_card(deck.take_card())
        assert isinstance(deck.inspect_discard(), Card)
        assert len(deck.get_discard_pile()) == 1
Example #3
0
 def test_discard_card(self):
     deck = Deck()
     deck.discard_card(deck.take_card())
     assert len(deck.get_discard_pile()) == 1
Example #4
0
 def test_take_discard(self):
     deck = Deck()
     deck.discard_card(deck.take_card())
     discard = deck.take_discard()
     assert isinstance(discard, Card)
     assert len(deck.get_discard_pile()) == 0
Example #5
0
 def test_check_stack(self):
     deck = Deck()
     for _ in range(52):
         deck.discard_card(deck.take_card())
     deck.check_stack()
     assert 52 == len(deck.get_deck()) and 0 == len(deck.get_discard_pile())
Example #6
0
 def test_draw_all_cards(self):
     deck = Deck()
     for _ in range(52):
         deck.discard_card(deck.take_card())
     assert 0 == len(deck.get_deck()) and 52 == len(deck.get_discard_pile())