From 4c998ed259fb6779294fce8165616a8733dbb0ee Mon Sep 17 00:00:00 2001 From: Abe Date: Mon, 19 Dec 2022 16:09:37 -0500 Subject: [PATCH] print content of example In order for the test in https://github.com/collective/icalendar/blob/master/src/icalendar/tests/test_with_doctest.py not to fail it was necessary to normilize the whitespace --- docs/usage.rst | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/usage.rst b/docs/usage.rst index 9d56359d..d0815493 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -317,6 +317,26 @@ Write to disk:: 522 >>> f.close() +Print out the calendar:: + + >>> print(cal.to_ical().decode("utf-8")) # doctest: +NORMALIZE_WHITESPACE + BEGIN:VCALENDAR + VERSION:2.0 + PRODID:-//My calendar product//mxm.dk// + BEGIN:VEVENT + SUMMARY:Python meeting about calendaring + DTSTART:20050404T080000Z + DTEND:20050404T100000Z + DTSTAMP:20050404T001000Z + UID:20050115T101010/27346262376@mxm.dk + ATTENDEE;CN="Max Rasmussen";ROLE=REQ-PARTICIPANT:MAILTO:maxm@example.com + ATTENDEE;CN="The Dude";ROLE=REQ-PARTICIPANT:MAILTO:the-dude@example.com + LOCATION:Odense\, Denmark + ORGANIZER;CN="Max Rasmussen";ROLE=CHAIR:MAILTO:noone@example.com + PRIORITY:5 + END:VEVENT + END:VCALENDAR + More documentation ==================