+
    ¾¾jQ  ã            
       óØ  € R t ^ RIHt ^ RIt^ RIHtHtHt ^ RIH	t	 ]'       d   ^ RIH
t
 R R ltR R	 lt ! R
 R4      t]P                  R 4       t]P                  R 4       tR tR tR tR tR t]P,                  P/                  R. R.O4      R 4       tR tR tR tR tRRRRRRRR R!R"/t]P,                  P/                  R#R$R%.4      ]P,                  P/                  R/. R0O4      ]P,                  P/                  R&R$R%.4      R' 4       4       4       tR( tR) t R* t!]P,                  P/                  R1. R2O4      ]P,                  P/                  R&R$R%.4      R+ 4       4       t"R, t#R- t$R# )3zcTest lazy parsing of calendar components.

See https://github.com/collective/icalendar/issues/1050
)ÚTYPE_CHECKINGN)ÚAlarmÚEventÚLazyCalendar©ÚLazySubcomponent)ÚCalendarc                ó(   € V ^8„  d   QhR\         RR/# ©é   ÚcalendarÚreturnN©r   )Úformats   "Úk/home/ralf/ical-fahrzeuge/venv/lib/python3.14/site-packages/icalendar/tests/test_issue_1050_lazy_parsing.pyÚ__annotate__r      s   € ÷ ñ ¤lð °tñ ó    c                óª   € \        V \        4      '       g   Q hV P                  P                  4       '       g   Q hV P                  4       '       g   Q hR# )z,Assert that the calendar is a lazy calendar.N©Ú
isinstancer   Ú_subcomponentsÚis_lazy©r   s   &r   Úassert_is_lazy_calendarr      sE   € ä�h¤×-Ò-Ð-Ð-Ø×"Ñ"×*Ñ*×,Ò,Ð,Ð,Ø×Ñ×ÒÐÒr   c                ó(   € V ^8„  d   QhR\         RR/# r
   r   )r   s   "r   r   r      s   € ÷ "ñ "¬ð "¸ñ "r   c                óª   € \        V \        4      '       g   Q hV P                  P                  4       '       d   Q hV P                  4       '       d   Q hR# )z.Assert that the calendar is a parsed calendar.Nr   r   s   &r   Úassert_is_parsed_calendarr      sH   € ä�h¤×-Ò-Ð-Ð-Ø×&Ñ&×.Ñ.×0Ò0Ð0Ð0Ø×Ñ×!Ò!Ð!Ð!Ñ!r   c                   ó8   a € ] tR t^t o V 3R lR ltR tRtV tR# )Ú
MockParserc                ó$   <€ V ^8„  d   QhRS[ RR/# )r   Ú	componentr   N)Ústr)r   Ú__classdict__s   "€r   r   ÚMockParser.__annotate__    s   ø€ ÷ ñ ¡#ð ¨$ñ r   c                ó    € Wn         ^ V n        R# )é    N)Ú
_componentÚ_calls)Úselfr    s   &&r   Ú__init__ÚMockParser.__init__    s   € Ø#ŒØˆŽr   c                óN   € V ;P                   ^,          un         V P                  .# )zReturn the component.©r'   r&   )r(   s   &r   ÚparseÚMockParser.parse$   s   € à�Š�qÕ�Ø—‘Ð Ð r   r,   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r)   r-   Ú__static_attributes__Ú__classdictcell__)r"   s   @r   r   r      s   ø‡ € ÷ð ÷!ð !r   r   c                 ó   € \        R4      # )z-A mock parser that returns a fixed component.Úmock_component)r   © r   r   Úmock_parserr8   *   s   € ô Ð&Ó'Ð'r   c                ó   € \        RV 4      # )z.A lazy subcomponent that uses the mock parser.ÚVEVENTr   )r8   s   &r   Úlazy_subcomponentr;   0   s   € ô ˜H kÓ2Ð2r   c                ó€   € VP                  4       '       d   Q hVP                  V J g   Q hV P                  ^ 8X  g   Q hR# )z&The component is initially not parsed.N)Ú	is_parsedÚ_parserr'   )r8   r;   s   &&r   Ú1test_lazy_subcomponent_is_not_parsed_when_createdr?   6   s?   € à ×*Ñ*×,Ò,Ð,Ð,Ø×$Ñ$¨Ó3Ð3Ð3Ø×Ñ Ô"Ð"Ò"r   c                óŽ   € V P                  4       pVR8X  g   Q hVP                  ^8X  g   Q hV P                  4       '       g   Q hR# )z!We retrieve the component inside.r6   N)r-   r'   r=   ©r;   r8   r    s   && r   Ú(test_lazy_subcomponent_returns_componentrB   =   sH   € à!×'Ñ'Ó)€IØÐ(Ô(Ð(Ð(Ø×Ñ Ô"Ð"Ð"Ø×&Ñ&×(Ò(Ð(Ò(r   c                óz   € V P                  4       pV P                  4       pW#J g   Q hVP                  ^8X  g   Q hR# )z)Parsing twice returns the same component.N)r-   r'   )r;   r8   Ú
component1Ú
component2s   &&  r   Ú)test_parsing_twice_returns_same_componentrF   E   s>   € à"×(Ñ(Ó*€JØ"×(Ñ(Ó*€JØÓ#Ð#Ð#Ø×Ñ Ô"Ð"Ò"r   c                óX   € V P                  4       pVR8X  g   Q hV P                  e   Q hR# )z8Test that we can remove references to the content lines.r6   N)r-   r>   rA   s   && r   Ú test_when_parsed_parser_is_freedrH   M   s1   € à!×'Ñ'Ó)€IØÐ(Ô(Ð(Ð(Ø×$Ñ$Ò,Ð,Ò,r   c                óJ   € \        V P                  \        4      '       g   Q hR# )z7LazyCalendar.from_ical returns a LazyCalendar instance.N)r   Úemptyr   )Úlazy_calendarss   &r   Ú%test_lazy_calendar_returns_a_calendarrL   T   s   € ä�n×*Ñ*¬L×9Ò9Ð9Ò9r   Úcomponent_namer:   ÚVTODOÚ	VTIMEZONEc                ó”   € \         P                  ! RV  RV  24      pVP                  V 8X  g   Q hVP                  4       '       d   Q hR# )zLLazyCalendar.from_ical() returns components as Calendar and as Component do.zBEGIN:z
END:N)r   Ú	from_icalÚnamer   )rM   r    s   & r   Ú1test_non_calendar_components_are_parsed_correctlyrS   Y   sM   € ô
 ×&Ò&¨°Ð/?¸vÀnÐEUÐ'VÓW€IØ�>‰>˜^Ô+Ð+Ð+Ø× Ñ ×"Ò"Ð"Ð"Ñ"r   c                ó4   € V P                   p\        V4       R# )z,Test that the BigCalendar is initially lazy.N)Úexampler   ©rK   r   s   & r   Ú#test_big_calendar_is_initially_lazyrW   c   s   € à×%Ñ%€HÜ˜HÖ%r   c                óf   € V P                   pVP                  \        4       4       \        V4       R# )z4Test that we can add a component to a lazy calendar.N)rJ   Úadd_componentr   r   rV   s   & r   Ú*test_adding_a_component_to_a_lazy_calendarrZ   i   s%   € à+×1Ñ1€HØ×Ñœ5›7Ô#Ü˜HÖ%r   c                óª   € V P                   pVP                  p\        V4      ^8X  g   Q h\        V4       VP                   P                  V8X  g   Q hR# )z:Test that we can get the subcomponents of a lazy calendar.N)rU   ÚsubcomponentsÚlenr   )rK   Ú	calendarsr   r\   s   &&  r   Ú1test_getting_the_subcomponents_of_a_lazy_calendarr_   p   sM   € à+×3Ñ3€HØ×*Ñ*€MÜˆ}Ó Ô"Ð"Ð"Ü˜hÔ'Ø×Ñ×*Ñ*¨mÔ;Ð;Ò;r   c                ór   € V P                   pVP                  pVP                  pW#J g   Q h\        V4       R# )zCTest that parsing a lazy calendar twice does not change the result.N)rU   r\   r   )rK   r   Úsubcomponents1Úsubcomponents2s   &   r   Ú"test_parsing_a_lazy_calendar_twicerc   y   s7   € à+×3Ñ3€HØ×+Ñ+€NØ×+Ñ+€NØÓ+Ð+Ð+Ü˜hÖ'r   Ú	timezonesÚeventsÚtodosÚVJOURNALÚjournalsÚVAVAILABILITYÚavailabilitiesÚwalkTFÚfully_parsedc                ób  € VP                   pV'       d   VP                   V '       d   VP                  V4      M\        V\        V,          4      p\        V4      ^8X  g   Q R4       hV^ ,          P                  V8X  g   Q h\        V\        4      '       d   V'       g   \        WS4       R# R# R# )z„Check that only timezones are parsed.

Skipping FREEBUSY for now is ok as they are for requests and need the whole calendar anyway.
z8We only have one component of each type in the calendar.N)
Úissue_1050_all_componentsr\   rk   ÚgetattrÚname2getterr]   rR   r   r   Úassert_only_parsed)rk   r^   rR   Úparsedrl   r   Ú
componentss   &&&&&  r   Útest_accessing_timezonesrt   ‹   s�   € ð" #×<Ñ<€HßØ×Òß(,�—‘˜tÔ$´'¸(ÄKÐPTÕDUÓ2V€JÜˆz‹?˜aÔð ØBóÐð �a�=×Ñ Ô%Ð%Ð%Ü�(œL×)Ò)·,Ü˜8Ö,ñ 3?Ñ)r   c                óN  € V P                  4       '       g   Q R4       hV P                  P                   Uu0 uF&  q"P                  4       '       g   K  VP                  kK(  	  ppV\        V4      8X  g-   Q RRP                  V4       RRP                  V4       R24       hR# u upi )z6Check that only certain types of components are parsedz(The calendar should not be fully parsed.zWe expect only z, z to be parsed, not Ú.N)r   r   Ú_componentsr=   rR   ÚsetÚjoin)r   rr   ÚlcÚparsed_in_calendars   &&  r   rq   rq   ¨   s›   € à×Ñ×ÒÐIÐIÓIÐà"×1Ñ1×=Ò=óÙ=�BÇÁÇŒˆ�ŒÑ=ð ð ð ¤ V£Ô,ð Ø
˜$Ÿ)™) FÓ+Ð,Ð,?ÀÇ	Á	ÐJ\Ó@]Ð?^Ð^_Ð`óÒ,ùòs   ¶B"ÁB"c                ó’   € V P                   pVP                  4       p\        V4      ^	8X  g   Q hVP                  4       '       d   Q hR# )zWalk goes through them all.N)rn   rk   r]   r   ©r^   r   rs   s   &  r   Ú#test_walk_parses_the_whole_calendarr~   ³   sB   € à×2Ñ2€HØ—‘“€JÜˆz‹?˜aÔÐÐØ×Ñ×!Ò!Ð!Ð!Ñ!r   c                ó˜   € V P                   P                  R4      p\        V4      ^8X  g   Q hV^ ,          pVP                  R8X  g   Q hR# )z%Walking and finding the alarm inside.ÚVALARMN)rn   rk   r]   rR   )r^   ÚalarmsÚalarms   &  r   Útest_walk_and_find_an_alarmrƒ   »   sE   € à#×=Ñ=×BÑBÀ8ÓL€FÜˆv‹;˜!ÔÐÐØ�1�I€EØ�:‰:˜Ô!Ð!Ò!r   c                 ó  € V P                   pV'       d   VP                   VP                  V4      p\        V4      ^8X  g   Q hV^ ,          P                  V8X  g   Q h\        V\        4      '       d   V'       g   \        WB4       R# R# R# )é   N)rn   r\   Úwith_uidr]   Úuidr   r   rq   )r^   r‡   rr   rl   r   rs   s   &&&&  r   Útest_get_with_uidrˆ   Ã   st   € ð ×2Ñ2€HßØ×ÒØ×"Ñ" 3Ó'€JÜˆz‹?˜aÔÐÐØ�a�=×Ñ Ô#Ð#Ð#Ü�(œL×)Ò)·,Ü˜8Ö,ñ 3?Ñ)r   c                 ód   € V P                   pVP                  R 4      p\        V4      ^ 8X  g   Q hR# )znon-existent-uidN©rn   r†   r]   r}   s   &  r   Útest_absent_uidr‹   Ú   s0   € Ø×2Ñ2€HØ×"Ñ"Ð#5Ó6€JÜˆz‹?˜aÔÐÒr   c                ó`   € V P                   P                  R4      p\        V4      ^ 8X  g   Q hR# )zšCheck that even if the UID is present somewhere the component is not
returned.

See https://github.com/collective/icalendar/pull/1201/changes#r2869287074
r‚   NrŠ   )r^   rs   s   & r   Ú/test_uid_is_present_but_not_in_the_uid_propertyr�   à   s,   € ð ×4Ñ4×=Ñ=¸gÓF€JÜˆz‹?˜aÔÐÒr   )r:   rN   r€   zX-COMPONENTrO   )rR   rr   ))rO   ©rO   )r:   ©rO   r:   )rN   ©rO   rN   )rg   ©rO   rg   )ri   ©rO   ri   )r‡   rr   ))zevent-1r�   )z
calendar-1rŽ   )ztodo-1r�   )z	journal-1r‘   )zavailability-1r’   )zalarm-1r�   )%Ú__doc__Útypingr   ÚpytestÚ	icalendarr   r   r   Úicalendar.parser.ical.lazyr   r   r   r   r   Úfixturer8   r;   r?   rB   rF   rH   rL   ÚmarkÚparametrizerS   rW   rZ   r_   rc   rp   rt   rq   r~   rƒ   rˆ   r‹   r�   r7   r   r   Ú<module>r›      s¨  ðñõ
 !ã ç 0Ñ 0Ý 7çÝ"õõ"÷!ñ !ð ‡�ñ(ó ð(ð
 ‡�ñ3ó ð3ò
#ò)ò#ò-ò:ð
 ‡�×ÑØÒOóñ#óð#ò&ò&ò<ò(ð �ØˆhØˆWØ�
ØÐ%ð€ð ‡�×Ñ˜ $¨ Ó/Ø‡�×ÑØòó	ð ‡�×Ñ˜¨$°¨Ó7ñ-ó 8ó	ó 0ð-ò"ò"ò"ð ‡�×ÑØòó
ð ‡�×Ñ˜¨$°¨Ó7ñ-ó 8ó
ð-ò ô r   