From e099032e9cf23361d67d0b3dc1397cd8506c485b Mon Sep 17 00:00:00 2001 From: Marcus Hughes <hughes.jmb@gmail.com> Date: Sun, 3 Mar 2024 17:32:37 -0700 Subject: [PATCH] adds parsing failure test --- ccsdspy/tests/test_packet_types.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ccsdspy/tests/test_packet_types.py b/ccsdspy/tests/test_packet_types.py index 34ecdba..aba2fab 100644 --- a/ccsdspy/tests/test_packet_types.py +++ b/ccsdspy/tests/test_packet_types.py @@ -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)