Esempio n. 1
0
 def test_two_unsampled_arms(self):
     """Check that the two-unsampled-arms case always returns both arms as winning arms. This tests num_winning_arms == num_arms > 1."""
     assert EpsilonInterface.get_winning_arm_names(self.two_unsampled_arms_test_case.arms_sampled) == frozenset(["arm1", "arm2"])
Esempio n. 2
0
 def test_three_arms_two_winners(self):
     """Check that the three-arms cases with two winners return the expected winning arms. This tests num_arms > num_winning_arms > 1."""
     assert EpsilonInterface.get_winning_arm_names(self.three_arms_two_winners_test_case.arms_sampled) == frozenset(["arm1", "arm2"])
Esempio n. 3
0
 def test_empty_arm_invalid(self):
     """Test empty ``sample_arms`` causes an ValueError."""
     with pytest.raises(ValueError):
         EpsilonInterface.get_winning_arm_names({})