diff --git a/tests/functional/codegen/modules/test_interface_imports.py b/tests/functional/codegen/modules/test_interface_imports.py index 3f0f8cb010..6f7905e8bd 100644 --- a/tests/functional/codegen/modules/test_interface_imports.py +++ b/tests/functional/codegen/modules/test_interface_imports.py @@ -67,8 +67,9 @@ def test_import_interface_flags(make_input_bundle, get_contract): MOO POO -interface IFoo: - def foo() -> Foo: nonpayable +@nonpayable +def foo() -> Foo: + ... """ contract = """ diff --git a/tests/functional/codegen/test_interfaces.py b/tests/functional/codegen/test_interfaces.py index 8887bf07cb..ce1647a353 100644 --- a/tests/functional/codegen/test_interfaces.py +++ b/tests/functional/codegen/test_interfaces.py @@ -136,6 +136,9 @@ def test_log_interface_event(make_input_bundle, assert_compile_failed): interface_code = """ event Foo: a: uint256 + +def bar() -> uint256: + ... """ input_bundle = make_input_bundle({"a.vyi": interface_code}) diff --git a/tests/unit/compiler/test_abi.py b/tests/unit/compiler/test_abi.py index 430cd75344..a781e48f49 100644 --- a/tests/unit/compiler/test_abi.py +++ b/tests/unit/compiler/test_abi.py @@ -458,6 +458,10 @@ def bar(): def test_event_no_export_implements(make_input_bundle): # test events are not exported even if they are in implemented interface ifoo = """ +@external +def foo(): + ... + event MyEvent: pass """ @@ -465,12 +469,16 @@ def test_event_no_export_implements(make_input_bundle): import ifoo implements: ifoo + +@external +def foo(): + pass """ input_bundle = make_input_bundle({"ifoo.vyi": ifoo}) out = compile_code(main, input_bundle=input_bundle, output_formats=["abi"]) - expected = {"abi": []} - assert out == expected + assert len(out["abi"]) == 1 + assert out["abi"][0]["name"] == "foo" def test_event_export_interface(make_input_bundle):