コード例 #1
0
def test_reorder2():
    outcomes = ['00', '11', '22']
    pmf = [1 / 3] * 3
    sample_space = ('00', '01', '10', '11')
    with pytest.raises(InvalidOutcome):
        reorder(outcomes, pmf, sample_space)
コード例 #2
0
ファイル: test_helpers.py プロジェクト: Autoplectic/dit
def test_reorder2():
    outcomes = ['00', '11', '22']
    pmf = [1/3]*3
    sample_space = ('00', '01', '10', '11')
    with pytest.raises(InvalidOutcome):
        reorder(outcomes, pmf, sample_space)
コード例 #3
0
def test_reorder1():
    outcomes = ['00', '11', '01']
    pmf = [1 / 3] * 3
    sample_space = ('00', '01', '10', '11')
    new = reorder(outcomes, pmf, sample_space)
    assert new[0] == ['00', '01', '11']
コード例 #4
0
ファイル: test_helpers.py プロジェクト: Autoplectic/dit
def test_reorder1():
    outcomes = ['00', '11', '01']
    pmf = [1/3]*3
    sample_space = ('00', '01', '10', '11')
    new = reorder(outcomes, pmf, sample_space)
    assert new[0] == ['00', '01', '11']