diff --git a/CHANGES.rst b/CHANGES.rst index 594eff4d..beded264 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,6 +5,9 @@ Changelog 4.0.dev (unreleased) -------------------- +- Raise explicit error on another malformed content line case. + [hajdbo] + - Correctly parse datetime component property values with timezone information when parsed from ical strings. [untitaker] diff --git a/src/icalendar/tests/test_fixed_issues.py b/src/icalendar/tests/test_fixed_issues.py index 473058e4..7732a350 100644 --- a/src/icalendar/tests/test_fixed_issues.py +++ b/src/icalendar/tests/test_fixed_issues.py @@ -177,3 +177,15 @@ END:VCALENDAR""" cal = icalendar.Calendar.from_ical(ical_str) org_cn = cal.walk('VEVENT')[0]['ORGANIZER'].params['CN'] self.assertEqual(org_cn, u'acme, ädmin') + + def test_issue_114(self): + """Issue #114/#115 - invalid line in event breaks the parser + https://github.com/collective/icalendar/issues/114 + """ + + directory = os.path.dirname(__file__) + ics = open(os.path.join(directory, 'case_invalid_line.ics'), 'rb') + with self.assertRaises(ValueError): + cal = icalendar.Calendar.from_ical(ics.read()) + cal # pep 8 + ics.close()