Skip to content
Snippets Groups Projects

Resolve "Specify internal input/output dependencies of an Operation"

1 unresolved thread
+ 19
0
from b_asic import Addition, Butterfly
class TestDepends:
def test_depends_addition(self):
add1 = Addition()
assert set(add1.inputs_required_for_output(0)) == {0, 1}
def test_depends_butterfly(self):
bfly1 = Butterfly()
assert set(bfly1.inputs_required_for_output(0)) == {0, 1}
assert set(bfly1.inputs_required_for_output(1)) == {0, 1}
def test_depends_sfg(self, sfg_two_inputs_two_outputs):
assert set(sfg_two_inputs_two_outputs.inputs_required_for_output(0)) == {0, 1}
assert set(sfg_two_inputs_two_outputs.inputs_required_for_output(1)) == {0, 1}
def test_depends_sfg_independent(self, sfg_two_inputs_two_outputs_independent):
assert set(sfg_two_inputs_two_outputs_independent.inputs_required_for_output(0)) == {0}
assert set(sfg_two_inputs_two_outputs_independent.inputs_required_for_output(1)) == {1}
\ No newline at end of file
Loading