ormsgpack icon indicating copy to clipboard operation
ormsgpack copied to clipboard

Return value checking

Open drewm1980 opened this issue 1 year ago • 1 comments

I added a bit of return value checking on a couple fallible calls to C functions.

It would probably be more correct to throw proper python errors, but some checking is better than none.

Green local test run results:

$ ./scripts/test.sh 
======================================================================================================= test session starts =======================================================================================================
platform linux -- Python 3.9.15, pytest-4.6.5, py-1.11.0, pluggy-0.13.1
rootdir: /home/awagner/src/ormsgpack
plugins: asyncio-0.10.0, anyio-3.6.2
collected 283 items                                                                                                                                                                                                               

tests/test_api.py .......................                                                                                                                                                                                   [  8%]
tests/test_canonical.py ...                                                                                                                                                                                                 [  9%]
tests/test_circular.py ...                                                                                                                                                                                                  [ 10%]
tests/test_dataclass.py ................                                                                                                                                                                                    [ 15%]
tests/test_datetime.py ...........s..s.s.s..ss...........s.............                                                                                                                                                     [ 32%]
tests/test_default.py ................                                                                                                                                                                                      [ 38%]
tests/test_enum.py .............                                                                                                                                                                                            [ 43%]
tests/test_non_str_keys.py ........................                                                                                                                                                                         [ 51%]
tests/test_numpy.py .....................................                                                                                                                                                                   [ 64%]
tests/test_pydantic.py ..                                                                                                                                                                                                   [ 65%]
tests/test_subclass.py ................                                                                                                                                                                                     [ 71%]
tests/test_type.py .......s....................................................................                                                                                                                             [ 97%]
tests/test_typeddict.py .                                                                                                                                                                                                   [ 98%]
tests/test_uuid.py .....                                                                                                                                                                                                    [100%]

============================================================================================== 275 passed, 8 skipped in 0.52 seconds ==============================================================================================

Thanks!

drewm1980 avatar Feb 02 '23 11:02 drewm1980