-
Notifications
You must be signed in to change notification settings - Fork 111
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
feat(plugins,fixtures,specs): Labeled fixture and execute formats #1220
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 tasks
f47fef2
to
0334a20
Compare
8 tasks
spencer-tb
approved these changes
Feb 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice PR. Easy to see what's going on. Only a few thoughts but nothing major!
Approved and LGTM (as I would be happy to merge as is)!
Ohh and I'm being pedantic but could we add a changelog entry too 😅 |
0334a20
to
b2d3265
Compare
8 tasks
3 tasks
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)
scope:pytest
Scope: Changes EEST's pytest plugins
type:feat
type: Feature
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🗒️ Description
Labeled Fixture Formats in Spec Types
Adds labeled fixture and execute formats that can be defined by the spec tests for the fixtures they produce.
For example,
state_test
generated Blockchain and Blockchain engine fixtures now have the following labels:LabeledFixtureFormat(BlockchainFixture, "blockchain_test_from_state_test")
LabeledFixtureFormat(BlockchainEngineFixture, "blockchain_test_engine_from_state_test")
This translates in the test IDs now showing "blockchain_test_from_state_test" and "blockchain_test_engine_from_state_test" instead of "blockchain_test" and "blockchain_test_engine" respectively.
These test cases now also have an extra marker that is the label.
blockchain_test_from_state_test
andblockchain_test
markers for Blockchain test.blockchain_test_engine_from_state_test
andblockchain_test_engine
markers for Blockchain test.This enables a bit more granularity when selecting the cases to fill (or execute in the case of execute), as we don't lose the
-m blockchain_test
, instead we now also can use-m blockchain_test_from_state_test
to only fill blockchain tests that were generated from a State test.I.e.
-m blockchain_test
still selects Blockchain tests generated from state tests, but we now also have-m blockchain_test_from_state_test
which selects only Blockchain tests that were generated from a state test.Remove
StateTestOnly
andBlockchainTestEngine
Removes
StateTestOnly
andBlockchainTestEngine
(andEOFTestOnly
after #783) classes in favor of using markers to signal that a test should only be filled for a given fixture format:pytest.mark.state_test_only
pytest.mark.blockchain_test_only
pytest.mark.blockchain_test_engine_only
pytest.mark.eof_test_only
in feat(specs): EOF:eof_test
generates state tests, andexecute
in live devnets #783This makes it easier to add the marker to a single parameter during parametrization, instead of having to write a new test function to single out tests that have this requirement.
Notes
Required for #783.
🔗 Related Issues
✅ Checklist
mkdocs serve
locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.