feat(specs,tests): exception_test marker#1436
Merged
Merged
Conversation
Member
|
|
exception_test marker
Member
Author
Selected |
spencer-tb
reviewed
Apr 11, 2025
spencer-tb
left a comment
Collaborator
There was a problem hiding this comment.
Really nice addition!! :D
Just a couple follow up comments/nits!
17 tasks
Co-authored-by: spencer <spencer.taylor-brown@ethereum.org>
f86a4da to
fe4c01f
Compare
pacrob
pushed a commit
to pacrob/execution-spec-tests
that referenced
this pull request
May 5, 2025
* feat(specs): Introduce/enforce `negative` marker * feat(tests): Add marker to all invalid transaction/block tests * changelog * refactor(specs): Rename marker to `pytest.mark.exception_test` * refactor(tests): Rename marker to `pytest.mark.exception_test` * refactor(specs): Make `request` a `PrivateAttr` * nit * fix(specs): Review suggestions Co-authored-by: spencer <spencer.taylor-brown@ethereum.org> --------- Co-authored-by: spencer <spencer.taylor-brown@ethereum.org>
felix314159
pushed a commit
to felix314159/execution-spec-tests
that referenced
this pull request
May 16, 2025
* feat(specs): Introduce/enforce `negative` marker * feat(tests): Add marker to all invalid transaction/block tests * changelog * refactor(specs): Rename marker to `pytest.mark.exception_test` * refactor(tests): Rename marker to `pytest.mark.exception_test` * refactor(specs): Make `request` a `PrivateAttr` * nit * fix(specs): Review suggestions Co-authored-by: spencer <spencer.taylor-brown@ethereum.org> --------- Co-authored-by: spencer <spencer.taylor-brown@ethereum.org>
kclowes
pushed a commit
to kclowes/execution-spec-tests
that referenced
this pull request
Oct 20, 2025
* feat(specs): Introduce/enforce `negative` marker * feat(tests): Add marker to all invalid transaction/block tests * changelog * refactor(specs): Rename marker to `pytest.mark.exception_test` * refactor(tests): Rename marker to `pytest.mark.exception_test` * refactor(specs): Make `request` a `PrivateAttr` * nit * fix(specs): Review suggestions Co-authored-by: spencer <spencer.taylor-brown@ethereum.org> --------- Co-authored-by: spencer <spencer.taylor-brown@ethereum.org>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
exception_testmarkerIntroduce a new marker to mark tests that produce an invalid transaction or block.
@pytest.mark.exception_testTest filling now fails if this marker is not applied and the test contains either an invalid transaction or an invalid block.
This PR also marks all existing negative tests.
Make
requestaPrivateAttrinBaseTestThe pytest fixture request is now a private attribute of
BaseTestand a new class methodfrom_testis introduced as a generic to automatically generate a test type from an instance of another test type, whichBaseTestattributes automatically.Also request has no longer to be passed to
generatemethod, so it has been removed from all unit tests.🔗 Related Issues
None
✅ Checklist
mkdocs servelocally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.