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

tools(feat): Add defined exceptions #384

Merged
merged 10 commits into from
Jan 25, 2024

Conversation

marioevz
Copy link
Member

@marioevz marioevz commented Jan 15, 2024

🗒️ Description

Adds BlockException and TransactionException enums, which supersede the string-based exceptions, in order to provide a set of defined exceptions, which results in better control of the tests that produce exception conditions.

🔗 Related Issues

None

✅ Checklist

  • All: Set appropriate labels for the changes.
  • All: Considered squashing commits to improve commit history.
  • All: Added an entry to CHANGELOG.md.
  • All: Considered updating the online docs in the ./docs/ directory.
  • Tests: Included the type and version of evm t8n tool used to locally execute test cases: e.g., ref with commit hash or geth 1.13.1-stable-3f40e65.
  • Tests: Ran mkdocs serve locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.

@marioevz marioevz force-pushed the add-defined-exceptions branch 2 times, most recently from 00d767d to ed5aa65 Compare January 23, 2024 21:54
@marioevz marioevz added scope:tests Scope: Test cases scope:docs Scope: Documentation type:chore Type: Chore type:test Type: Test type:feat type: Feature scope:fw Scope: Framework (evm|tools|forks|pytest) labels Jan 24, 2024
Copy link
Collaborator

@spencer-tb spencer-tb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing! LGTM

I'd actually like this for consume via engine api ASAP :)

These expected errors will make invalid tests work!

@marioevz
Copy link
Member Author

Rebased to main.

Copy link
Member

@danceratopz danceratopz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really love this. Very clean! And the docs look great, too. I added a link to an example in the tests for each exception type in /writing_tests/exception_tests/ in 1d8c570.

docs/writing_tests/exception_tests.md Outdated Show resolved Hide resolved
docs/consuming_tests/exceptions.md Show resolved Hide resolved
Co-authored-by: danceratopz <danceratopz@gmail.com>
@marioevz marioevz merged commit 10d045f into ethereum:main Jan 25, 2024
5 checks passed
@marioevz marioevz deleted the add-defined-exceptions branch January 25, 2024 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope:docs Scope: Documentation scope:fw Scope: Framework (evm|tools|forks|pytest) scope:tests Scope: Test cases type:chore Type: Chore type:feat type: Feature type:test Type: Test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants