From 0b6ec0ddf57f536cd005dedafe83d3578aa80bd9 Mon Sep 17 00:00:00 2001 From: Jan Vesely Date: Thu, 18 Aug 2022 15:25:41 -0400 Subject: [PATCH] tests/TransferMechanism: Use the correct execution mode in test_transfer_mech_integration_rate_0_8 EX encapsulates compiled (or GPU) execution, use that instead of always executing Python version. Fixes: cf57224670a0830dd555f34e04c0d4a083d3b996 ("test/mechanisms/TransferMechanism: Only run benchmarks if enabled") Signed-off-by: Jan Vesely --- tests/mechanisms/test_transfer_mechanism.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/mechanisms/test_transfer_mechanism.py b/tests/mechanisms/test_transfer_mechanism.py index e6a295ce05a..aae892ef081 100644 --- a/tests/mechanisms/test_transfer_mechanism.py +++ b/tests/mechanisms/test_transfer_mechanism.py @@ -903,14 +903,14 @@ def test_transfer_mech_integration_rate_0_8(self, benchmark, mech_mode): ) EX = pytest.helpers.get_mech_execution(T, mech_mode) - val1 = T.execute([1 for i in range(VECTOR_SIZE)]) - val2 = T.execute([1 for i in range(VECTOR_SIZE)]) + val1 = EX([1 for i in range(VECTOR_SIZE)]) + val2 = EX([1 for i in range(VECTOR_SIZE)]) assert np.allclose(val1, [[0.8 for i in range(VECTOR_SIZE)]]) assert np.allclose(val2, [[0.96 for i in range(VECTOR_SIZE)]]) if benchmark.enabled: - benchmark(T.execute, [0 for i in range(VECTOR_SIZE)]) + benchmark(EX, [0 for i in range(VECTOR_SIZE)]) @pytest.mark.mechanism @pytest.mark.transfer_mechanism