Beispiel #1
0
def test_inputs_target2(drain_setup):
    inputs = [Step(value=2), Step(value=3)]
    inputs[0].target = True

    step = Step(value=1)
    step.inputs = inputs
    step.target = True

    assert get_inputs(step, target=True) == set([Step(value=2)])
Beispiel #2
0
def test_inputs_no_target(drain_setup):
    inputs = [Step(value=2), Step(value=3, inputs=[Step(value=4)])]
    inputs[0].target = True

    step = Step(value=1, inputs=inputs)
    step.target = True

    assert get_inputs(step, target=False) ==\
            set([Step(value=3, inputs=[Step(value=4)]), Step(value=4)])