diff --git a/tests/functional/builtins/codegen/test_extract32.py b/tests/functional/builtins/codegen/test_extract32.py index 010a2f1688..fa021d1d32 100644 --- a/tests/functional/builtins/codegen/test_extract32.py +++ b/tests/functional/builtins/codegen/test_extract32.py @@ -34,15 +34,15 @@ def extrakt32_storage(index: uint256, inp: Bytes[100]) -> bytes32: ) for S, i in test_cases: - if i < 0 or i > len(S) - 32: - with tx_failed(): - c.extrakt32(S, i) + if 0 <= i <= len(S) - 32: + expected_result = S[i : i + 32] + assert c.extrakt32(S, i) == expected_result + assert c.extrakt32_mem(S, i) == expected_result + assert c.extrakt32_storage(i, S) == expected_result continue - expected_result = S[i : i + 32] - assert c.extrakt32(S, i) == expected_result - assert c.extrakt32_mem(S, i) == expected_result - assert c.extrakt32_storage(i, S) == expected_result + with tx_failed(): + c.extrakt32(S, i) print("Passed bytes32 extraction test") diff --git a/tests/functional/codegen/features/test_logging.py b/tests/functional/codegen/features/test_logging.py index afd3b5922d..959371caca 100644 --- a/tests/functional/codegen/features/test_logging.py +++ b/tests/functional/codegen/features/test_logging.py @@ -204,7 +204,7 @@ def test_event_logging_cannot_have_more_than_three_topics( """ with tx_failed(EventDeclarationException): - lambda: get_contract_with_gas_estimation(loggy_code) + get_contract_with_gas_estimation(loggy_code) def test_event_logging_with_data(w3, tester, keccak, get_logs, get_contract_with_gas_estimation):