Skip to content
This repository has been archived by the owner on Nov 16, 2022. It is now read-only.

Commit

Permalink
add more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
prin-r committed Aug 18, 2020
1 parent 6dd19f4 commit 97765d8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions obi/pyobi/tests/test_pyobi.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,3 +413,13 @@ def test_encode_decode_not_all_data_is_consumed_fail():

assert str(e.value) == "Not all data is consumed after decoding input"

with pytest.raises(ValueError) as e:
PyObi("""[u32]""").decode(bytes.fromhex("00000000aabb"))

assert str(e.value) == "Not all data is consumed after decoding input"

with pytest.raises(ValueError) as e:
PyObi("""{ x:i16 }""").decode(bytes.fromhex("00000000"))

assert str(e.value) == "Not all data is consumed after decoding input"

0 comments on commit 97765d8

Please sign in to comment.