Skip to content

Conversation

@marioevz
Copy link
Member

🗒️ Description

Moves the deploy_contract, fund_eoa and fund_address to a pytest-plugin in src/pytest_plugins/test_filler/pre_alloc.py.

This allows a more modular approach to setting pre-allocation functionality directly in the pytest runner that is currently executing the tests.

For example, in the current test_filler (only test runner implementation) it will automatically generate a new pre-alloc on every single test, but in the case of combining multiple tests into a single fixture, it should be possible to modify this pre fixture to have a different scope and different functionality.

Also it fixes typing in src/pytest_plugins/test_filler/test_filler.py.

🔗 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: 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 the type:refactor Type: Refactor label Jul 18, 2024
@marioevz marioevz requested a review from spencer-tb July 18, 2024 16:03
@marioevz
Copy link
Member Author

@spencer-tb @danceratopz finally renamed test_filler.py -> filler.py 😉

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.

LGTM! Docs look all good too

I rebased onto #687 locally to see if there are any conflicts but it none at all!

@marioevz marioevz changed the title refactor(plugins): Move pre-alloc logic to a separate filler plugin refactor(plugins): Move pre-alloc logic to a separate filler plugin, rename test_filler Jul 19, 2024
@marioevz marioevz merged commit 00b4fb3 into main Jul 19, 2024
@marioevz marioevz deleted the refactor-alloc branch July 19, 2024 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:refactor Type: Refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants