-
Notifications
You must be signed in to change notification settings - Fork 144
feat(specs,tests): exception_test
marker
#1436
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
Conversation
|
exception_test
marker
Selected |
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.
Really nice addition!! :D
Just a couple follow up comments/nits!
Co-authored-by: spencer <[email protected]>
f86a4da
to
fe4c01f
Compare
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.
LGTM!
* 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 <[email protected]> --------- Co-authored-by: spencer <[email protected]>
* 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 <[email protected]> --------- Co-authored-by: spencer <[email protected]>
🗒️ Description
exception_test
markerIntroduce a new marker to mark tests that produce an invalid transaction or block.
@pytest.mark.exception_test
Test 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
request
aPrivateAttr
inBaseTest
The pytest fixture request is now a private attribute of
BaseTest
and a new class methodfrom_test
is introduced as a generic to automatically generate a test type from an instance of another test type, whichBaseTest
attributes automatically.Also request has no longer to be passed to
generate
method, so it has been removed from all unit tests.🔗 Related Issues
None
✅ Checklist
mkdocs serve
locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.