Exemple #1
0
 def test_play_n_game_1(self):
     expected = 0
     random.seed(1)
     self.assertEqual(play_n_game(1, 1)[1], expected)
Exemple #2
0
 def test_play_n_game_1000(self):
     expected = 0.08
     random.seed(1)
     self.assertAlmostEqual(play_n_game(1000, 100)[50], expected, places=2)
Exemple #3
0
 def test_play_n_game_1(self):
     expected = {1: 1.0}
     random.seed(1)
     self.assertEqual(play_n_game(1, 1), expected)