Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Cover missing statements * Change deprecation text in felt.py * Update starknet_py/cairo/type_parser.py Co-authored-by: war-in <61014013+war-in@users.noreply.github.com> Co-authored-by: war-in <61014013+war-in@users.noreply.github.com>
- Loading branch information
Showing
4 changed files
with
40 additions
and
2 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import pytest | ||
|
||
from starknet_py.cairo.serialization._context import SerializationContext | ||
from starknet_py.cairo.serialization.errors import ( | ||
InvalidTypeException, | ||
InvalidValueException, | ||
) | ||
|
||
|
||
@pytest.mark.parametrize( | ||
"initial_exception, wrapped_class", | ||
[ | ||
(ValueError("Test"), InvalidValueException), | ||
(TypeError("Test"), InvalidTypeException), | ||
], | ||
) | ||
def test_if_exceptions_are_wrapped(initial_exception, wrapped_class): | ||
with pytest.raises(wrapped_class, match="Error: Test"): | ||
with SerializationContext.create(): | ||
raise initial_exception |
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
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