コード例 #1
0
 def test_play_n_game_1(self):
     expected = 0
     random.seed(1)
     self.assertEqual(play_n_game(1, 1)[1], expected)
コード例 #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)
コード例 #3
0
 def test_play_n_game_1(self):
     expected = {1: 1.0}
     random.seed(1)
     self.assertEqual(play_n_game(1, 1), expected)