Files

13 lines
389 B
Python
Raw Permalink Normal View History

2026-08-24 08:11:59 -07:00
import unittest
from policy import Policy
class HoldoutPolicyTests(unittest.TestCase):
def test_unrelated_flag_change_preserves_correct_answers(self):
policy = Policy({"a": True, "b": False})
self.assertTrue(policy.allows("u", "a"))
policy.set_flag("b", True)
self.assertTrue(policy.allows("u", "a"))
self.assertTrue(policy.allows("u", "b"))