Exemplo n.º 1
0
def test_make_distribution():
    outcomes = ['0', '1']
    pmf = [1 / 2] * 2
    d = _make_distribution(outcomes, pmf, None)
    assert type(d) is Distribution
    assert d.outcomes == ('0', '1')
Exemplo n.º 2
0
def test_make_distribution():
    outcomes = ['0', '1']
    pmf = [1/2, 1/2]
    d = _make_distribution(outcomes, pmf, None)
    assert type(d) is Distribution
    assert d.outcomes == ('0', '1')
Exemplo n.º 3
0
def test_make_distribution():
    outcomes = ['0', '1']
    pmf = [1/2, 1/2]
    d = _make_distribution(outcomes, pmf, None)
    assert_true(type(d) is Distribution)
    assert_equal(d.outcomes, ('0', '1'))
Exemplo n.º 4
0
def test_make_distribution():
    outcomes = ['0', '1']
    pmf = [1 / 2, 1 / 2]
    d = _make_distribution(outcomes, pmf, None)
    assert_true(type(d) is Distribution)
    assert_equal(d.outcomes, ('0', '1'))