def test_rand(i): outcomes = ['00', '01', '10', '11'] pmf = [1/4]*4 d = Distribution(outcomes, pmf) assert d.rand() in outcomes
def test_rand(): outcomes = ['00', '01', '10', '11'] pmf = [1/4]*4 d = Distribution(outcomes, pmf) for _ in range(10): yield assert_true, d.rand() in outcomes
def test_rand(): outcomes = ['00', '01', '10', '11'] pmf = [1 / 4] * 4 d = Distribution(outcomes, pmf) for _ in range(10): yield assert_true, d.rand() in outcomes