Example #1
0
 def test_run_monte_carlo_stats_invalid_permutations(self):
     with self.assertRaises(ValueError):
         _run_monte_carlo_stats(lambda e: 42, self.grouping, -1)
Example #2
0
 def test_run_monte_carlo_stats_no_permutations(self):
     obs = _run_monte_carlo_stats(lambda e: 42, self.grouping, 0)
     npt.assert_equal(obs, (42, np.nan))
Example #3
0
 def test_run_monte_carlo_stats_with_permutations(self):
     obs = _run_monte_carlo_stats(lambda e: 42, self.grouping, 50)
     npt.assert_equal(obs, (42, 1.0))
Example #4
0
 def test_run_monte_carlo_stats_invalid_permutations(self):
     with self.assertRaises(ValueError):
         _run_monte_carlo_stats(lambda e: 42, self.grouping, -1)
Example #5
0
 def test_run_monte_carlo_stats_no_permutations(self):
     obs = _run_monte_carlo_stats(lambda e: 42, self.grouping, 0)
     npt.assert_equal(obs, (42, np.nan))
Example #6
0
 def test_run_monte_carlo_stats_with_permutations(self):
     obs = _run_monte_carlo_stats(lambda e: 42, self.grouping, 50)
     npt.assert_equal(obs, (42, 1.0))