Skip to content

Commit

Permalink
adds parsing failure test
Browse files Browse the repository at this point in the history
  • Loading branch information
jmbhughes committed Mar 4, 2024
1 parent 436ae58 commit e099032
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ccsdspy/tests/test_packet_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,11 @@ def test_parse_csv_array_shape(shape_str, expected_value):
assert _parse_csv_array_shape(shape_str) == expected_value


def test_parse_csv_array_shape_fails_on_invalid_shape_str():
with pytest.raises(ValueError):
_parse_csv_array_shape("uint(4, FIELD)")


def test_VariableLength_from_file():
"""Test that from_file returns a VariableLength instance"""
assert isinstance(VariableLength.from_file(csv_file_3col_with_expand), VariableLength)
Expand Down

0 comments on commit e099032

Please sign in to comment.