diff --git a/src/icalendar/tests/test_oss_fuzz_errors.py b/src/icalendar/tests/test_oss_fuzz_errors.py new file mode 100644 index 00000000..fdf380e6 --- /dev/null +++ b/src/icalendar/tests/test_oss_fuzz_errors.py @@ -0,0 +1,9 @@ +"""This file collects errors that the OSS FUZZ build has found.""" +from icalendar import Calendar +import pytest + + +def test_stack_is_empty(): + """If we get passed an invalid string, we expect to get a ValueError.""" + with pytest.raises(ValueError): + Calendar.from_ical("END:CALENDAR")