-
-
Notifications
You must be signed in to change notification settings - Fork 849
fix[lang]: fix missing HexBytes paths #4630
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
base: master
Are you sure you want to change the base?
Conversation
maybe we should also fix this #4604 in the scope of this PR |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #4630 +/- ##
==========================================
+ Coverage 92.49% 92.50% +0.01%
==========================================
Files 128 128
Lines 18528 18529 +1
Branches 3213 3213
==========================================
+ Hits 17138 17141 +3
+ Misses 945 944 -1
+ Partials 445 444 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
("0123456789abcdef", 0x0123456789ABCDEF), | ||
], | ||
) | ||
def test_convert_bytes_literal_int(get_contract, val, expected): |
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.
we should probably add test cases which would trigger sign extension
@@ -244,6 +244,9 @@ def _literal_decimal(expr, arg_typ, out_typ): | |||
val = decimal.Decimal(int(expr.value, 16)) | |||
else: | |||
val = decimal.Decimal(expr.value) # should work for Int, Decimal | |||
# decimal.Decimal() can't be constructed from bytes | |||
# this assert guards against a potential constructor change | |||
assert not isinstance(expr.value, bytes) |
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.
assert not isinstance(expr.value, bytes) | |
assert isinstance(expr.value, int) |
|
||
|
||
@pytest.mark.parametrize( | ||
"val,expected", |
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.
can we compute expected
from val
?
What I did
HexBytes
#4608How I did it
HexBytes
to the type checksHow to verify it