-
Notifications
You must be signed in to change notification settings - Fork 248
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
Exception strings: TYPE_NOT_SUPPORTED
#1024
Conversation
# TODO: Once all the specific exception types are thrown, | ||
# only `pytest.raises` the correct exception type instead of | ||
# all of them. | ||
with pytest.raises((InvalidBlock, InvalidTransaction)): | ||
add_block_to_chain(chain, json_block, load, mock_pow) |
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.
Wondering if we can make it more specific on our test consumption side as well. Treat InvalidBlock
and InvalidTransaction
separately based on block_exception
. Not urgent right now but some thing to consider going forward.
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.
That's what I was thinking, and intended to convey with the above TODO. We can't do it yet because I haven't converted all the transaction exceptions yet (just one specific case.)
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1024 +/- ##
==========================================
- Coverage 83.59% 83.59% -0.01%
==========================================
Files 644 650 +6
Lines 36123 36157 +34
==========================================
+ Hits 30198 30226 +28
- Misses 5925 5931 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
What was wrong?
Related to Issue #1021
How was it (partially) fixed?
Adding a new exception type to match
TransactionException.TYPE_NOT_SUPPORTED
.Cute Animal Picture