diff --git a/test/test_operation.py b/test/test_operation.py index b07ca24ee52bfe69e5a048daecbb3330ac43bb04..f07a751e89df66c308bff1d99a8180a1f4217bcf 100644 --- a/test/test_operation.py +++ b/test/test_operation.py @@ -189,13 +189,21 @@ class TestExecutionTime: class TestCopyOperation: - def test_copy_buttefly_latency_offsets(self): + def test_copy_butterfly_latency_offsets(self): bfly = Butterfly(latency_offsets={'in0': 4, 'in1': 2, 'out0': 10, 'out1': 9}) bfly_copy = bfly.copy_component() assert bfly_copy.latency_offsets == {'in0': 4, 'in1': 2, 'out0': 10, 'out1': 9} + def test_copy_execution_time(self): + add = Addition() + add.execution_time = 2 + + add_copy = add.copy_component() + + assert add_copy.execution_time == 2 + class TestPlotCoordinates(): def test_simple_case(self): @@ -209,11 +217,11 @@ class TestPlotCoordinates(): def test_complicated_case(): bfly = Butterfly(latency_offsets={'in0': 2, 'in1': 3, 'out0': 5, 'out1': 10}) - bfly.set_execution_time(7) + bfly.execution_time(7) lat, exe = bfly.get_plot_coordinates() - assert lat = [[2, 0], [2, 0.5], [3, 0.5], [3, 1], [10, 1], [10, 0.5], [5, 0.5], [5, 0], [2, 0]] - assert exe = [[0, 0], [0, 1], [7, 1], [7, 0], [0, 0]] + assert lat == [[2, 0], [2, 0.5], [3, 0.5], [3, 1], [10, 1], [10, 0.5], [5, 0.5], [5, 0], [2, 0]] + assert exe == [[0, 0], [0, 1], [7, 1], [7, 0], [0, 0]] class TestIOCoordinates(): @@ -231,5 +239,5 @@ class TestIOCoordinates(): bfly.set_execution_time(7) i_c, o_c = bfly.get_io_coordinates() - assert i_c = [[2, 0.25], [3, 0.75]] - assert o_c = [[5, 0.25], [10, 0.75]] + assert i_c == [[2, 0.25], [3, 0.75]] + assert o_c == [[5, 0.25], [10, 0.75]]