Ejemplo n.º 1
0
 def test_moreThan1_dealer_raises_ValueErr(self):
     player0 = Player(role="Dealer")
     player1 = Player(role="Dealer")
     player2 = Player(role="Player")
     players = [player0, player1, player2]
     shoe = Shoe(1)
     with pytest.raises(ValueError):
         Game(players, shoe)
Ejemplo n.º 2
0
def shoe():
    return Shoe()
Ejemplo n.º 3
0
 def test_generates_card(self, decks):
     shoe = Shoe(decks=decks)
     assert type(shoe.cards) is list
     assert len(shoe.cards) == 52 * decks
Ejemplo n.º 4
0
 def test_deal_returns_a_card(self):
     shoe = Shoe()
     assert type(shoe.deal()) is Card
Ejemplo n.º 5
0
 def test_card_less_after_deal(self):
     shoe = Shoe()
     cards_len = len(shoe.cards) - 1
     shoe.deal()
     assert cards_len == len(shoe.cards)
Ejemplo n.º 6
0
 def test_deal_deals_a_card(self):
     shoe = Shoe()
     cards = shoe.cards
     card = shoe.deal()
     assert type(card) is Card
Ejemplo n.º 7
0
 def test_shuffles_card(self):
     shoe = Shoe()
     unshuffled = shoe.cards.copy()
     shoe.shuffle()
     shuffled = shoe.cards
     assert unshuffled != shuffled