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

refactor(fixtures): Remove formats.py, embed properties as class vars #826

Merged
merged 9 commits into from
Sep 30, 2024

Conversation

marioevz
Copy link
Member

@marioevz marioevz commented Sep 20, 2024

🗒️ Description

Minor Major refactor to the ethereum_test_fixtures where each subclass of BaseFixture now contains all the properties of the format, and therefore ethereum_test_fixtures/formats.py is not longer necessary (nor is the Enum it defined).

FixtureFormats was widely used across many places in several libraries, hence the high number of files changed, but the changes are relatively minor.

🔗 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. skipped
  • All: Considered updating the online docs in the ./docs/ directory.
  • Tests: All converted JSON/YML tests from ethereum/tests have been added to converted-ethereum-tests.txt.
  • Tests: A PR with removal of converted JSON/YML tests from ethereum/tests have been opened.
  • 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 added type:chore Type: Chore type:refactor Type: Refactor scope:fw Scope: Framework (evm|tools|forks|pytest) labels Sep 20, 2024
danceratopz

This comment was marked as duplicate.

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.

Nice clean-up! In particular to fill's pytest_collection_modifyitems()! I'd just add a small comment to help the reader.

LGTM.

src/pytest_plugins/filler/filler.py Outdated Show resolved Hide resolved
@marioevz marioevz force-pushed the fixture-formats-method-refactor branch from a9b8ad6 to e1fb88a Compare September 24, 2024 23:10
@marioevz marioevz changed the title refactor(fixtures): Embed FixtureFormat methods in instance refactor(fixtures): Remove formats.py, embed properties as class vars Sep 24, 2024
@marioevz marioevz force-pushed the fixture-formats-method-refactor branch from 23275e8 to d7ad4f8 Compare September 30, 2024 15:21
@marioevz marioevz force-pushed the fixture-formats-method-refactor branch from d7ad4f8 to 613ce89 Compare September 30, 2024 21:05
@marioevz marioevz merged commit 6e4c3a1 into main Sep 30, 2024
5 checks passed
@marioevz marioevz deleted the fixture-formats-method-refactor branch September 30, 2024 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope:fw Scope: Framework (evm|tools|forks|pytest) type:chore Type: Chore type:refactor Type: Refactor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants