示例#1
0
def pytest_generate_tests(metafunc):
    """Parametrize the `observation_function` fixture.

    Add observation functions here to have them automatically run all the tests that take
    `observation_function` as input.
    """
    if "observation_function" in metafunc.fixturenames:
        all_observation_functions = (
            O.Nothing(),
            O.NodeBipartite(),
            O.StrongBranchingScores(True),
            O.StrongBranchingScores(False),
        )
        metafunc.parametrize("observation_function", all_observation_functions)
示例#2
0
def test_Nothing_observation(model):
    """Observation of Nothing is None."""
    assert make_obs(O.Nothing(), model) is None
示例#3
0
def test_Nothing(model):
    assert O.Nothing().obtain_observation(model) is None