示例#1
0
    def test_player_bet_and_lose(self):
        player = Player()
        game = Game()
        bet = Bet(1)

        player.place_bet(bet, game)

        player.hand = game.deal_cards()

        game.resolve_bust()

        self.assertEquals("House wins!", game.result)
示例#2
0
 def test_player_loses_with_null_bet(self):
     player = Player()
     game = Game()
     self.assertRaises(InvalidBetException, lambda: player.place_bet(None, game))