Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix[ux]: shorten interface name in error messages #4359

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
test that "-f interface" outputs short interface names
  • Loading branch information
sandbubbles committed Nov 13, 2024
commit e93853e9c2d1c403e2f5fb05a2674db14c19b43c
12 changes: 12 additions & 0 deletions tests/functional/syntax/test_interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -599,3 +599,15 @@ def foobar(token: IERC20):
e.value.message
== "Contract does not implement all interface functions: foobar(interface IERC20)"
)


def test_interface_name_in_output_is_short(make_input_bundle):
code = """
from ethereum.ercs import IERC20
@external
def test(input: IERC20):
pass
"""
out = compiler.compile_code(code, output_formats=["interface"])

assert "def test(input: IERC20):" in out["interface"]
Loading