Ë
    #´˜j´
  ã                   ó  — d Z ddlmZ ddlmZ ddlZddlmZ ddlZej                  Z	de	j                  v ZdZedz   Z G d	„ d
ej                  «      Z G d„ dej                  «      Ze
dk(  r ej"                  d¬«       yy)a6  Test warnings replacement in pyshell.py and run.py.

This file could be expanded to include traceback overrides
(in same two modules). If so, change name.
Revise if output destination changes (http://bugs.python.org/issue18318).
Make sure warnings module is left unaltered (http://bugs.python.org/issue18081).
é    )Úrun)ÚpyshellN)Úcaptured_stderrÚidlezf
Warning (from warnings module):
  File "test_warning.py", line 99
    Line of code
UserWarning: Test
z>>> c                   óD   — e Zd Z ej                  ed«      d„ «       Zd„ Zy)ÚRunWarnTestú#Does not work when run within Idle.c                 óD  — | j                  t        j                  t        «       t        j                  d«       | j                  t        j                  t        j
                  «       t        j                  d«       | j                  t        j                  t        «       y ©NTF)ÚassertIsÚwarningsÚshowwarningr   Úcapture_warningsÚidle_showwarning_subproc©Úselfs    ú0lib/python3.12/idlelib/idle_test/test_warning.pyÚtest_showwarningszRunWarnTest.test_showwarnings!   s`   € à�‰”h×*Ñ*¬KÔ8Ü×Ñ˜TÔ"Ø�‰”h×*Ñ*¬C×,HÑ,HÔIÜ×Ñ˜UÔ#Ø�‰”h×*Ñ*¬KÕ8ó    c           	      óþ   — t        «       5 }t        j                  dt        dd|d«       | j	                  t
        j                  «       |j                  «       j                  «       «       d d d «       y # 1 sw Y   y xY w©NÚTestztest_warning.pyéc   zLine of code)r   r   r   ÚUserWarningÚassertEqualÚidlemsgÚ
splitlinesÚgetvalue©r   Úfs     r   Útest_run_showzRunWarnTest.test_run_show)   s]   € ÜÔ !Ü×(Ñ(ØœKÐ):¸BÀÀ>ôSð ×ÑœW×/Ñ/Ó1°1·:±:³<×3JÑ3JÓ3LÔM÷	 ×Ñúó   ‹AA3Á3A<N)Ú__name__Ú
__module__Ú__qualname__ÚunittestÚskipIfÚrunning_in_idler   r!   © r   r   r   r      s)   „ à€X‡_�_�_Ð&KÓLñ9ó Mð9óNr   r   c                   óJ   — e Zd Z ej                  ed«      d„ «       Zd„ Zd„ Zy)ÚShellWarnTestr	   c                 óD  — | j                  t        j                  t        «       t        j                  d«       | j                  t        j                  t        j
                  «       t        j                  d«       | j                  t        j                  t        «       y r   )r   r   r   Úshellr   Úidle_showwarningr   s    r   r   zShellWarnTest.test_showwarnings3   s`   € à�‰”h×*Ñ*¬KÔ8Ü×Ñ˜tÔ$Ø�‰”h×*Ñ*¬E×,BÑ,BÔCÜ×Ñ˜uÔ%Ø�‰”h×*Ñ*¬KÕ8r   c                 ój   — t        j                  dt        ddd«      }| j                  t        |«       y r   )r-   Úidle_formatwarningr   r   r   )r   Úss     r   Útest_idle_formatterz!ShellWarnTest.test_idle_formatter;   s/   € ä×$Ñ$ØœÐ%6¸¸NóLˆà×Ñœ !Õ$r   c           	      óþ   — t        «       5 }t        j                  dt        dd|d«       | j	                  t
        j                  «       |j                  «       j                  «       «       d d d «       y # 1 sw Y   y xY wr   )r   r-   r.   r   r   Úshellmsgr   r   r   s     r   Útest_shell_showzShellWarnTest.test_shell_showA   s[   € ÜÔ !Ü×"Ñ"ØœKÐ):¸BÀÀ>ôSà×ÑœX×0Ñ0Ó2°A·J±J³L×4KÑ4KÓ4MÔN÷ ×Ñúr"   N)	r#   r$   r%   r&   r'   r(   r   r2   r5   r)   r   r   r+   r+   1   s.   „ à€X‡_�_�_Ð&KÓLñ9ó Mð9ò%óOr   r+   Ú__main__é   )Ú	verbosity)Ú__doc__Úidlelibr   r   r-   r&   Útest.supportr   r   r   r#   r(   r   r4   ÚTestCaser   r+   Úmainr)   r   r   Ú<module>r>      s’   ðñõ Ý $Û Ý (Û ð ×"Ñ"€ð ˜K×0Ñ0Ð0€ð€ð �VÑ€ôN�(×#Ñ#ô Nô$O�H×%Ñ%ô Oð. ˆzÒØ€H‡M�M˜AÖð r   