+
    Bia                       ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RI	H
t
 ^ RIHt ^ RIHtHtHtHtHtHtHtHt ^ RIHt ^ RIHtHt ^ RIHt ^ R	IHt  ^ RIt^ R
IH t   ! R R]"4      t# ! R R]"4      t$ ! R R]"4      t% ! R R]PL                  4      t' ! R R]PL                  4      t( ! R R]PL                  4      t) ! R R]PL                  4      t*R t+ ! R R]PL                  4      t,]PZ                   ! R R]PL                  4      4       t. ! R R]PL                  4      t/ ! R  R!]PL                  4      t0]1R"8X  d   ]Pd                  ! 4        R# R#   ]! d	    RtR#t  ELi ; i)$    N)BOM_UTF8)product)dedent)captured_stderrcheck_impl_detailcpython_only
gc_collect
no_tracingscript_helperSuppressCrashReportforce_not_colorized)import_module)TESTFNunlink)check_warnings)support)INT_MAXc                   &   a  ] tR t^ t o R tRtV tR# )NaiveExceptionc                    Wn         R # Nxselfr   s   &&+/usr/lib/python3.14/test/test_exceptions.py__init__NaiveException.__init__!           r   N__name__
__module____qualname____firstlineno__r   __static_attributes____classdictcell____classdict__s   @r   r   r       s      r    r   c                   *   a  ] tR t^$t o RtR tRtV tR# )SlottedNaiveExceptionc                    Wn         R # r   r   r   s   &&r   r   SlottedNaiveException.__init__&   r   r    r   N)r"   r#   r$   r%   	__slots__r   r&   r'   r(   s   @r   r+   r+   $   s     I r    r+   c                   &   a  ] tR t^)t o R tRtV tR# )BrokenStrExceptionc                    \        R 4      h)zstr() is broken	Exceptionr   s   &r   __str__BrokenStrException.__str__*   s    )**r     Nr"   r#   r$   r%   r5   r&   r'   r(   s   @r   r0   r0   )   s     + +r    r0   c                     a  ] tR t^0t o R tR tR tR tRYR ltR t	R t
]P                  ! ]]P                  8  R	4      ]P"                  ! R
4      ]P$                  ! ]^RR7      R 4       4       4       t]R 4       tR t]P.                  ! ]P0                  R8H  R4      R 4       tR tR tR tR tR tR tR t R t!R t"R t#R t$R t%]&R 4       t'R  t(R! t)R" t*R# t+R$ t,R% t-R& t.R' t/R( t0R) t1R* t2R+ t3R, t4R- t5R. t6R/ t7R0 t8R1 t9R2 t:R3 t;R4 t<R5 t=R6 t>R7 t?R8 t@R9 tAR: tBR; tCR< tDR= tER> tF]&R? 4       tG]P                  ! 4       ]P                  ! 4       ]]P"                  ! R
4      R@ 4       4       4       4       tJ]P                  ! 4       ]RA 4       4       tK]]P                  ! ]LRJ RB4      ]MRC 4       4       4       tN]P                  ! 4       RD 4       tO]]P                  ! ]P                  RE4      ]P                  ! ]LRJ RB4      RF 4       4       4       tQ]]P                  ! ]LRJ RB4      RG 4       4       tR]]P                  ! ]LRJ RB4      RH 4       4       tS]]P                  ! ]LRJ RB4      RI 4       4       tT]&RJ 4       tURK tVRL tWRM tX]]P                  ! ]P                  RE4      ]P                  ! ]LRJ RB4      RN 4       4       4       tYRO tZRP t[RQ t\]P.                  ! RRRS4      RT 4       t]RU t^]P                  ! ]LRJ RB4      RV 4       t_RW t`RXtaV tbR# )ZExceptionTestsc                n   V P                  WR 7      ;_uu_ 4         V! R4      h  T d   p\        T4      p Rp?MRp?ii ; i T! R4      h  T d   p\        T4      p Rp?MRp?ii ; iT P                  YE4       T P                  TP                  T4       RRR4       R#   + '       g   i     R# ; i))excexcnamespamN)subTeststrassertEqualr"   )r   r<   r=   errbuf1buf2s   &&&   r   raise_catchExceptionTests.raise_catch2   s    \\c\33 &k!  3x  &k!  3x T(S\\73 4333sL   B#%A<B#AB#AA)A$B#$A))0B##B4	c                   V P                  \        R 4       V P                  \        \        \        R4       V P                  \
        R4       \        \        RRR7      pVP                  4        \        \        RRR7      p\        P                  p  ^ RI
pVP                  R4       V\        n	        VP                  4        \        \        4       V P                  \        R	4       V P                  \        \        R
R4       V P                  \        R4       V P                  \        \        R4       V P                  \         R4       . pV P                  \         VP"                  ^
4       V P                  \$        R4       / pV P                  \$        VP"                  R4       V P                  \&        R4       V P                  \(        R4       V P                  \*        R4       \,        pV P                  \.        R4       ^p\1        ^4       F  pWD,          pK  	  V P                  \2        R4       V P                  \4        R4       V P                  \6        R4       \9        R4       V P                  \:        R4       V P                  \<        R4       \?        RRR4       V PA                  R4       V P                  \B        R4       V P                  \D        R4       V P                  \D        \        PF                  ^ 4       V P                  \H        R 4       . R%,            V P                  \J        R!4       V P                  \J        \L        R&4       V P                  \N        R"4       ^^ ,          pV P                  \P        R#4       ^^ ,          pV P                  \R        R$4       R#   \
         d     ELi ; i  T\        n	        TP                  4        \        \        4       i ; i  \*         d     ELi ; i  \6         d     ELi ; i  \<         d     ELji ; i  \H         d     ELi ; i  \N         d     Li ; i  \P         d   p Rp?LRp?ii ; i)'AttributeErrorundefined_attributeEOFErrorwutf-8encodingrNr    OSErrorzthis file does not existImportErrorundefined_module
IndexErrorKeyErrorkeyKeyboardInterruptMemoryError	NameErrorOverflowErrorRuntimeErrorRecursionErrorSyntaxErrorz/
IndentationErrorTabErrorz"try:
	1/0
    	1/0
finally:
 pass
<string>execzTabError not raisedSystemError
SystemExit	TypeError
ValueErrorZeroDivisionErrorr3   StopAsyncIterationr7   i   )*rE   rH   assertRaisesgetattrsysrJ   openr   closestdinmarshalloadsr   rP   rQ   
__import__rS   __getitem__rT   rV   rW   rX   undefined_variablerY   rangerZ   r[   r\   r`   r]   r^   compilefailra   rb   exitrc   rd   chrre   r3   rf   )r   fp	savestdinrm   r   dummyes   &      r   testRaisingExceptionTests.testRaising?   sU   )9:.'38MN:.&#0

&#0II			c" "CIHHJ6N),'4)CSIm4+z3EF\2*ammR8:.(AMM59*,?@m4K0#Q 	83ZEFA   	~6)9:m4%[ 	)+=>:.@) ii-.m4\2*chh2K0"W 	\2*c62*,?@1Q 	K01Q 	+-ABK   "CIHHJ6N, $  D   $ !&$& #t#s   N/ )O0 #P P 	P& /	P8 	Q	 /N>:O =N>>O ,O-0O?>O?PPP#"P#&P54P58QQ	QQc                N   a  V 3R  lpRpV! VR4       V! RR4       V! RR4       R# )c           	      L  < SP                  WR 7      ;_uu_ 4         \        V RR4       SP                  R4       RRR4       R#   \         d?   pTP                  T8w  d$   SP                  RT: RTP                  : 24        Rp?LNRp?ii ; i  + '       g   i     R# ; i))srcmsg
<fragment>r`   "failed to get expected SyntaxError	expected , got N)r?   rs   rt   r\   r   )r   r   rz   r   s   && r   ckmsg4ExceptionTests.testSyntaxErrorMessage.<locals>.ckmsg   s~    #//DCv6
 IIBC 0/ # Huu|		3"FGH 0//s3   BABB4B
B
BBB#	zHif 1:
        try:
            continue
        except:
            passz'continue' not properly in loopz	continue
zf'{6 0}'z+invalid syntax. Perhaps you forgot a comma?Nr7   r   r   ss   f  r   testSyntaxErrorMessage%ExceptionTests.testSyntaxErrorMessage   s3    	D 	a23l=>jGHr    c                   a  \         3V 3R  llpRpV! VR4       RpV! VR4       RpV! VR4       RpV! VR4       RpV! VR4       RpV! VR	4       R
pV! VR	4       RpV! VR\        4       RpV! VR\        4       R# )c                    <  \        V R R4       SP                  R4       R#   T dF   pTP                  T8w  d*   SP                  RT: RTP                  : 24        Rp?R#  Rp?R# Rp?ii ; i)r   r`   r   r   r   N)rs   rt   r   )r   r   	exceptionrz   r   s   &&& r   r   :ExceptionTests.testSyntaxErrorMissingParens.<locals>.ckmsg   s`    @\62
 		>?	  D55C<IIsAEEBCC  Ds   # A/4A**A/zprint "old style"z@Missing parentheses in call to 'print'. Did you mean print(...)?zprint "old style",zprint f(a+b,c)zexec "old style"z>Missing parentheses in call to 'exec'. Did you mean exec(...)?zexec f(a+b,c)zprint (a+b,c) $ 42zinvalid syntaxzexec (a+b,c) $ 42zif True:
print "No indent"z9expected an indented block after 'if' statement on line 1z6if True:
        print()
	exec "mixed tabs and spaces"z2inconsistent use of tabs and spaces in indentationN)r\   r]   r^   r   s   f  r   testSyntaxErrorMissingParens+ExceptionTests.testSyntaxErrorMissingParens   s    &1 	@ $aST$aSTaST"aQRaQR
 !a!"a!" .aLN^_KaExPr    Nc           	     L   V P                  WVR 7      ;_uu_ 4        V P                  \        4      ;_uu_ 4       p\        VRR4       RRR4       V P	                  XP
                  P                  V4       V P	                  VP
                  P                  V4       Ve'   V P	                  VP
                  P                  V4       Ve'   V P	                  VP
                  P                  V4       VP
                  P                  em   \        V\        4      '       g   VP                  VR4      pVP                  R4      V^,
          ,          pV P                  WP
                  P                  4       RRR4       R#   + '       g   i     EL?; i  + '       g   i     R# ; i))sourcelinenooffsetr   r`   Nreplace
)r?   rg   r\   rs   rA   r   r   r   
end_lineno
end_offsettext
isinstancer@   decodesplitassertIn)	r   r   r   r   r   r   rN   cmlines	   &&&&&&&  r   checkExceptionTests.check   s&   \\F\CC"";//2\62 0R\\00&9R\\00&9%  !8!8*E%  !8!8*E||  ,!#s++**Xy9Cyyvax0dLL$5$56 DC/// DCCs#   FE>	D,F>F		FF#	c                2    V P                   pV! R ^^4       R# )z"\
"(1 for c in I,\
\N)r   r   r   s   & r   )test_error_offset_continuation_characters8ExceptionTests.test_error_offset_continuation_characters   s    

*Aq1r    c                B   V P                   pV! R ^^
4       V! R^^4       V! R^^
4       V! R^^4       V! R^^4       V! R^^RR7       V! R^^
4       V! R	^^4       V! R
^^4       V! R^^4       V! R^^4       V! R^^4       V! R^^4       V! R^^4       V! R^^	4       V! R^^4       V! R^^4       V! R^^4       V! R^^^^4       V! R^^^^4       V! R^^^^4       V! R^^^^4       V! R^^4       V! R^^4       V! R^^4       V! R^^4       V! R^^4       V! R^^4       V! R^^4       V! R^^4       V! R ^^4       V! R!^^4       V! R"^^4       V! R#^^4       V! R$^^4       V! R%^^R&R7       V! R'^	^4       V! R(^^4       V! R)^^4       V! R*^^4       V! R+^ RC4       V! R,^^4       V! R-^^4       V! R.^^4       V! R/P                  4       ^^^^
4       V! R0^^4       V! R1^^4       V! R2^^
4       V! R3^^&4       V! R4^^4       V! R5^^4       V! R6^^4       V! R7^^4       V! R8^^4       V! R9^^4       V! R:^^4       V! R;^^4       V! R<^^4       V! R=^^4       V! R>^^4       V! R?^^4       V! R@^^4       V! RA^^4       RB# )Dzdef fact(x):
	return x!
z1 +
z def spam():
  print(1)
 print(2)zPython = "Python" +u   Python = "Ṕýţĥòñ" +s+   # -*- coding: cp1251 -*-
Python = "ϳ" +cp1251rM   s   Python = "ϳ" +zx = "azlambda x: x = 2zf{a + b + c}z[file for str(file) in []
]u   a = « hello » « world »z[
file
for str(file)
in
[]
]z[file for
 str(file) in []]zages = {'Alice'=22, 'Bob'=23}z7match ...:
    case {**rest, "key": value}:
        ...z[a b c d e f]zfor x yfff:zf(a for a in b, c)zf(a for a in b if a, c)zf(a, b for b in c)zf(a, b for b in c, d)zclass foo:return 1zdef f():
  continuezdef f():
  breakz4try:
  pass
except:
  pass
except ValueError:
  passztry:
  pass
except*:
  passz6try:
  pass
except*:
  pass
except* ValueError:
  passz(0x+1)zx = 0xIz0010 + 2z
x = 32e-+4zx = 0o9u   α = 0xIs   α = 0xIs#   # -*- coding: iso8859-7 -*-
 = 0xIz	iso8859-7s   if 1:
            def foo():
                '''

            def bar():
                pass

            def baz():
                '''quux'''
            z"pass
pass
pass
(1+)
pass
pass
passz(1+)z[interesting
foo()
s   ﻿#coding: utf8
print('我')
z7f'''
            {
            (123_a)
            }'''ztf'''
            {
            f"""
            {
            (123_a)
            }
            """
            }'''z4f"""


            {
            6
            0="""u   b"fooжжж"z!x = [(yield i) for i in range(3)]zdef f():
  from _ import *zdef f(x, x):
  passz3{i for i in range(5) if (j := 0) for j in range(5)}zdef f(x):
  nonlocal xzdef f(x):
  x = 1
  global xz
nonlocal xz def f():
  global x
  nonlocal xz#from __future__ import doesnt_existzfrom __future__ import bracesz#x=1
from __future__ import divisionzfoo(1=2)zdef f():
  x, y: intz[*x for x in xs]zfoo(x for x in range(10), 100)zfor 1 in []: passz(yield i) = 2zdef f(*):
  passN)r   encoder   s   & r   testSyntaxErrorOffset$ExceptionTests.testSyntaxErrorOffset   s   

+Q3gq!2Ar:#Q+;QCLh	(2Ar:h1A&na#,a4+Q211a8,a3-q!4I1bQoq!$mQ""Aq!R0'Aq"5"Aq!R0%q!Q3 	"Ar*$a+!1a(I1aP.15KQPQR 	h1iAj!QlAq!iAna#A&8!Q"	$ 	 B		 	8!Q?fa%q!,CQK  	 	  	 	 
 	 	n##%q!Q3 	11a8+Q3$a,CQK'A..15lAq!2Aq9 	3Q;-q"54a;j!Q%q!, !Q'.15!1a(oq!$!1a(r    z)Downcasting to int is safe for col_offsetcpuF)memusedry_runc                    R VR3,          pV P                  \        R4      ;_uu_ 4        \        VRR4       RRR4       R#   + '       g   i     R# ; i)s   if True:
%*ss   passzParser column offset overflowr   r`   N)assertRaisesRegexrY   rs   )r   sizer   s   && r   testMemoryErrorBigSource'ExceptionTests.testMemoryErrorBigSourceM  sB     $0##M3RSSCv. TSSSs   AA	c                R  a aa  ! R  R\         4      o ! R R4      o\        P                  ! \        RJ R4      VV 3R l4       p\        P                  ! \        RJ R4      VV 3R l4       p\        P                  ! \        RJ R4      VV 3R l4       pV! 4        V! 4        V! 4        R# )	c                   &   a  ] tR tRt o R tRtV tR# )9ExceptionTests.testSettingException.<locals>.BadExceptioniZ  c                    \        R 4      h)zcan't instantiate BadException)rZ   )self_s   &r   r   BExceptionTests.testSettingException.<locals>.BadException.__init__[  s    "#CDDr    r7   Nr!   r(   s   @r   BadExceptionr   Z  s     E Er    r   c                       ] tR tRtRtR# )=ExceptionTests.testSettingException.<locals>.InvalidExceptioni^  r7   Nr"   r#   r$   r%   r&   r7   r    r   InvalidExceptionr   ^      r    r   Nrequires _testcapic                  <  <  \         P                  ! S^4       SP                  R4       R#   \         dd   p T P                  P
                  P                  pSP                  TP                  R4       SP                  TP                  R4        Rp ? R# Rp ? ii ; i)   Expected exception
test_capi1test_exceptions.pyN)	_testcapiraise_exceptionrt   rc   __traceback__tb_framef_coderA   co_nameassertEndsWithco_filename)rB   cor   r   s     r   r   7ExceptionTests.testSettingException.<locals>.test_capi1a  s~    0)),: 		./  J&&//66  \:##BNN4HIIJs   - BABBc                    <  \         P                  ! S^ 4       SP                  R4       R#   \         d   p T P                  P
                  pTP                  P                  pSP                  TP                  R4       SP                  TP                  R4       TP                  P                  P                  pSP                  TP                  R4        Rp ? R# Rp ? ii ; i)r   r   r   r   
test_capi2N)r   r   rt   rZ   r   tb_nextr   r   rA   r   r   r   f_back)rB   tbr   co2r   r   s       r   r   7ExceptionTests.testSettingException.<locals>.test_capi2l  s    
0)),: 		./   <&&..[[''  Z8##BNN4HIkk((//  l;;<s   - C#B CC#c                  T   < SP                  \        \        P                  S ^4       R# r   N)rg   ra   r   r   )r   r   s   r   
test_capi37ExceptionTests.testSettingException.<locals>.test_capi3z  s     k9+D+D.3r    )r3   unittestskipIfr   )r   r   r   r   r   r   s   f   @@r   testSettingException#ExceptionTests.testSettingExceptionU  s    
	E9 	E	 	 
d*,@	A	0 
B	0 
d*,@	A	0 
B	0 
d*,@	A	3 
B	3 	r    c                    \          V P                  \         \        4       V P                  \	        \        R 4      4      R4       V P                  \	        \        R R4      4      R4       \        ^	RR4      pV P                  VP
                  ^	4       V P                  VP                  R4       V P                  \	        V4      R4       \        ^ RR^4      pV P                  VP
                  ^4       V P                  VP                  ^4       V P                  VP                  R4       V P                  VP                  R4       V P                  VP                  R4       V P                  \	        V4      R4       \        ^ RRR 4      pV P                  VP
                  ^4       V P                  VP                  R 4       V P                  VP                  R4       V P                  VP                  R4       V P                  VP                  R4       V P                  \	        V4      R	4       \        RR4      pV P                  VP
                  R4       V P                  VP                  R4       V P                  VP                  R4       V P                  VP                  R4       V P                  VP                  R4       R#   \         d     R# i ; i)
i  1001messagez[Errno 1001] messagefoobarNz[Errno 9] foo: 'bar'z[WinError 3] foo: 'bar'z[WinError 1001] foo)WindowsErrorassertIsrP   rA   r@   errnowinerrorstrerrorfilename	filename2rX   )r   rK   s   & r   test_WindowsError ExceptionTests.test_WindowsError  s6   $	0 MM,0S/8Sy!9:35 5%(AQWWa(QZZ.SV%;<5%+AQWWa(QZZ+QZZ/QZZ/Q[[$/SV%>?5$-AQWWb)QZZ.QZZ/QZZ.Q[[$/SV%:;u%AQWWe,QZZ.QZZ/QZZ.Q[[$/E  		s   K KKwin32ztest specific to Windowsc                    \        R4      pRpV P                  \        RV,          4      ;_uu_ 4        VP                  P	                  V4       RRR4       R#   + '       g   i     R# ; i)z:Should fill in unknown error code in Windows error messagectypesl   cs@ zWindows Error 0x%xN)r   r   rP   	pythonapiPyErr_SetFromWindowsErr)r   r   codes   &  r   test_windows_message#ExceptionTests.test_windows_message  sP     x(##G-AD-HII44T: JIIIs   AA*	c           #     >   \         R6/ R R6/3\         R7/ R R7/3\         R8/ R R8/3\         R9/ R R9/3\        R8/ R R8RR/3\        R8/ R R8RRRRRRRR/3\        R:/ R R:RRRRRRRR/3\        R;/ R R:RR	RRRRRR/3\        R</ R R:RR	RR
/3\        R=/ R R>RRRRRR/3\        R?/ R R@R^RRRRRR/3\        R6/ RRRRRRRRRRRRRR/3\        RA/ R RARRRRRRRRRRRRRR/3\        RB/ RRRRR RBRRRRRRRRRRRR/	3\        RC/ RRR RCRRRRRRRRRRRRRR/	3\        R6/ R R6/3\
        RD/ R RDRRRRR ^ R!R/3\        R\        R"4      ^ ^R3/ R R\        R"4      ^ ^R3RRRR"R ^ R!R/3\        RE/ R RERRRR"R ^ R!R/3\        RF/ R RFRR#R!R$R ^ R%^/3\        R8/ R R8R&R/3\        R8/ R R8R&R/3\        R8\        R'R(R)7      \        R8R'R(R*7      3.p VP                  \        R?/ R R@RRR+RR^RRRR/34       V EFw  w  r#rE V! V/ VB p\!        V4      P"                  P%                  R,4      '       g&   V P'                  \!        V4      P(                  R-4       \+        V4      pV FN  p\-        Wh4      p	V P'                  \/        V	4      \/        WX,          4      V: R.V: R/V	: R0WX,          : 24       KP  	  \0        3 F  p
\3        V
P4                  ^,           4       F  pV
P7                  Wk4      pV
P9                  V4      pV F`  p\/        \-        W4      4      pV\        8X  d   VR(8X  d   \/        R4      pM\/        WX,          4      pV P'                  WR1V: R2V: 24       Kb  	  K  	  K  	  EKz  	  R#   \         d     ELi ; i   \;        R3T: R4T: 2\<        P>                  R57        EK  ; i)Gargsr   r   r   Nr   r   r   r   bazquuxerrnoStrstrErrorStrfilenameStrr   r   r   r   r   print_file_and_linemsgStr	linenoStr	offsetStrtextStrendLinenoStrendOffsetStrr   asciiaordinal not in rangerN   objectstartreason      あouchendr   nameobjr  r  )r   r  r  r   r   builtins.z == z, expected z	pickled "z", attribute "z
exc=z, args=)filer7   r   )r   )r   r   )r   r   )r   r   r   )r   r   r   Nr   )r   r   r   )r   r   )r   r   r   )r   r   )r   )r   )r   r   r   r   r  r  )r   r   r   r   r   r  r  print_file_and_lineStr)r  r  r   r   r  )r  r	  r   r   r  )r
  r   r   r  ) BaseExceptionrb   rP   r\   UnicodeErrorUnicodeEncodeErrorUnicodeDecodeError	bytearrayUnicodeTranslateErrorr   r+   rH   dictappendr   rX   typer"   endswithrA   r#   r@   rh   reprpicklerr   HIGHEST_PROTOCOLdumpsrn   printri   stderr)r   exceptionListr<   r   kwargsexpectedrz   r   checkArgNamevaluepprotocolnewgotwants   &              r   testAttributesExceptionTests.testAttributes  so    BVbM2E27Hb(#%J*%'2(FU35h(J{T4d45 nb.dK$5*u67 +R.e[45*u67 92.*uk6RT@"5mWzm-. 7,gmm[4AB "b54$T8dHtd$9D#B C +r+v&uxdHtXt%&
  GHJK) G 'uxmX~|^MN  568$ 5 'uxdHtXt\49	: 2rFR>2 ":;= Cgx#1h)?AB  '9W+=q!"8":;=7Ig$61+ACgx'1h)?AB   ":;= Cgx'1h)?AB #$<b2Hh1ea)* Xr3.0"Hb3.0XtU'C(U;=iV
n
	  @"0-dq-tEF ,9'Cv"@(( Aw''001ABB$$T!W%7%7DF$,L#A4E$$T%[%)(*@%A%&%*H,B&DE %- !A$)!*<*<q*@$AGGA0ggaj,4L"&ws'A"BC"n49N (,Dz'+H,B'C ,,S$./.?@ -5 %B "+ ,9  		HsgWTH5CJJGGs   <%M! +M3!M0/M03%Nc                "   \        ^*4      p^5Vn        V P                  VP                  R4       V P                  VP                  ^54       V P	                  \
        \        VR4       V P	                  \
        \        VR4       VP                  R^R^/4       V P                  VP                  R4       V P                  VP                  ^54       V P                  VP                  ^4       V P                  VP                  ^4       VP                  R^RRR^#/4       V P                  VP                  R4       V P                  VP                  ^#4       V P                  VP                  ^4       V P                  VP                  ^4       R# )*   r  br   blahN)r2  )r         )
r3   r4  rA   r   rg   rH   rh   __setstate__r  r3  r   rz   s   & r   test_setstateExceptionTests.test_setstate?  s0   bM'$.'1c:.'1c:	Qa()'$a a 	R&"=>)$b!a r    c                    \        ^*4      pV P                  \        R4      ;_uu_ 4        VP                  ^*4       RRR4       R#   + '       g   i     R# ; i)r2  zstate is not a dictionaryN)r3   r   rc   r7  r8  s   & r   test_invalid_setstate$ExceptionTests.test_invalid_setstateQ  s;    bM##I/JKKNN2 LKKKs   AA	c           
        \        ^4      \        ^4      \        ^4      3 EF  pV P                  VR7      ;_uu_ 4        V P	                  VR4       VP                  R4       V P                  VP                  R.4       V P                  \        4      ;_uu_ 4        VP                  ^*4       RRR4       V P                  VP                  R.4       VP                  R4       V P                  VP                  RR.4       V=V P	                  VR4       VP                  R4       V P                  VP                  R.4       ^*Vn        V P                  VP                  ^*4       V P                  \        4      ;_uu_ 4        VP                  R4       RRR4       V P                  VP                  ^*4       RRR4       EK  	  R#   + '       g   i     EL$; i  + '       g   i     LO; i  + '       g   i     EK  ; i)r   rz   	__notes__zMy NoteNz	Your NotezOur Notezwill not work)
r  r3   rd   r?   assertNotHasAttradd_noterA   r@  rg   rc   r8  s   & r   
test_notesExceptionTests.test_notesV  sq   "IaL*Q-@A""%%a5

9%  yk:&&y11JJrN 2  yk:

;'  y+.FGK%%a5

:&  zl;   b1&&y11JJ/ 2  b1/ #" A 211  21+ #""s=   AG1G
/CG1G$G1
G	G1G.)G11Hc                8    \        ^4      h  \         d   pTP                  p Rp?MRp?ii ; i\        4       P	                  T4      pT P                  T\        4       T P                  TP                  T4       \        ^4      P	                  T4      pT P                  T\         4       T P                  TP                  T4        ! R R\        4      pT! 4       P	                  T4      pT P                  Y4       T P                  TP                  T4       R# )   Nc                       ] tR tRtRtR# )5ExceptionTests.testWithTraceback.<locals>.MyExceptioni  r7   Nr   r7   r    r   MyExceptionrH    r   r    rI  )rS   r3   r   r  with_tracebackassertIsInstancerA   )r   rz   r   rI  s   &   r   testWithTraceback ExceptionTests.testWithTracebackq  s    	!Q- 	!B	! O**2.a/"-qM((,a,"-	) 	 M((,a-"-    .).c                     ^\        4       n        V P                  R4       R#   \         d'   pT P	                  R\        T4      4        Rp?R# Rp?ii ; i)   No exception raisedz!__traceback__ must be a tracebackN)r3   r   rt   rc   r   r@   r8  s   & r   testInvalidTraceback#ExceptionTests.testInvalidTraceback  sJ    	-()IK% II+,  	GMM=s1vFF	Gs   $ AAAc                    \         p\        4       pR pV P                  W\        VR^4       RpV P                  W\        VR^4       RpV P                  W\        VR^4       RpV P                  W\        VR^4       R# )	z'int' object is not iterabler   z)__traceback__ must be a traceback or Noner   z9exception cause must be None or derive from BaseException	__cause__z;exception context must be None or derive from BaseException__context__N)rc   r3   r   setattr)r   TEr<   r   s   &   r   test_invalid_setattr#ExceptionTests.test_invalid_setattr  sz    k,rfa@9roqIIrk1EKrmQGr    c                "   \         p \        ^4      h  \         d   pTp Rp?MRp?ii ; iRpT P                  Y\        TR4       T P                  Y\        TR4       T P                  Y\        TR4       T P                  Y\        TR4       R# )rF  Nzmay not be deletedr   r   rU  rV  )rc   rS   r3   r   delattr)r   rX  rz   r<   r   s   &    r   test_invalid_delattr#ExceptionTests.test_invalid_delattr  s    	Q- 	C	 #rf=roFrkBrmDs    *%*c                     \        ^4      h  \         d   pTP                  p Rp?MRp?ii ; i\        4       pY!n        RTn        T P                  TP                  R4       R# )rF  N)rS   r3   r   rA   )r   rz   r   s   &  r   testNoneClearsTracebackAttr*ExceptionTests.testNoneClearsTracebackAttr  sS    	!Q- 	!B	! K$/rN  c                   \        4       pV P                  VP                  4       V P                  VP                  4       \	        4       pV P                  VP                  4       V P                  VP                  4        ! R  R\
        4      pV! 4       pV P                  VP                  4       V P                  VP                  4       R# )c                       ] tR tRtRtR# )5ExceptionTests.testChainingAttrs.<locals>.MyExceptioni  r7   Nr   r7   r    r   rI  rd    r   r    rI  N)r3   assertIsNonerV  rU  rc   rP   )r   rz   rI  s   &  r   testChainingAttrs ExceptionTests.testChainingAttrs  s    K!--(!++&K!--(!++&	' 	 M!--(!++&r    c                    \        4       h  \          d   pTp R p?MR p?ii ; iT P                  TP                  4       T P                  TP                  4       T P	                  TP
                  4       \        4       Tn        R Tn        T P                  TP                  \        4       T P                  TP                  4       T P                  TP
                  4       RTn        T P	                  TP
                  4       R # )NF)	r3   re  rV  rU  assertFalse__suppress_context__rX   rK  
assertTrue)r   r<   rz   s   &  r   testChainingDescriptors&ExceptionTests.testChainingDescriptors  s    	+ 	A	 	!--(!++&//0!ammY7!++&../!&//0s   
 ##c                    V P                  \        \        ^R7        ! R R\        4      pV! ^*R7      pV P                  VP                  ^*4       R# )r   )r  c                   &   a  ] tR tRt o R tRtV tR# )8ExceptionTests.testKeywordArgs.<locals>.DerivedExceptioni  c                <    \         P                  V 4       Wn        R # r   )r  r   	fancy_arg)r   rr  s   &&r   r   AExceptionTests.testKeywordArgs.<locals>.DerivedException.__init__  s    &&t,!*r    rr  Nr!   r(   s   @r   DerivedExceptionrp    s     + +r    ru  rt  N)rg   rc   r  rA   rr  )r   ru  r   s   &  r   testKeywordArgsExceptionTests.testKeywordArgs  sE     	)]a8	+} 	+
 r*b)r    c                z   aa V3R  loV P                  \        S4       V3R loV P                  \        S4       R# )c                     < S ! 4       # r   r7   )fs   r   rz  /ExceptionTests.testInfiniteRecursion.<locals>.f  s
    3Jr    c                  :   <  S ! 4       #   \          d    Ru # i ; i)r   r   rd   gs   r   r  /ExceptionTests.testInfiniteRecursion.<locals>.g  s#    s
 	s   
 N)rg   r[   )r   rz  r  s   &@@r   testInfiniteRecursion$ExceptionTests.testInfiniteRecursion  s/    	.!,	
 	.!,r    c                    V P                  \        \        4      4       V P                  \        \        R 4      4      4       V P                  \        \        R R4      4      4       R# )r  r3  N)rk  r@   r3   r4   s   &r   test_strExceptionTests.test_str  s?    I'IcN+,Ic3/01r    c                $    \        4       h  \          d!   pT P                  T\         4        R p?MR p?ii ; iT P                  R\        4       4       T P	                  \
        4      ;_uu_ 4        X R R R 4       R #   + '       g   i     R # ; iNrz   r3   rK  assertNotInlocalsrg   UnboundLocalErrorr8  s   & r   test_exception_cleanup_names+ExceptionTests.test_exception_cleanup_names  sh    	0+ 	0!!!Y//	0fh'011 2111s   
 7271A>>B	c                &    \        4       h  \          d"   pT P                  T\         4       ? R p?MR p?ii ; iT P                  R\        4       4       T P	                  \
        4      ;_uu_ 4        X R R R 4       R #   + '       g   i     R # ; ir  r  r8  s   & r   test_exception_cleanup_names2,ExceptionTests.test_exception_cleanup_names2  sj    	+ 	!!!Y/	 	fh'011 2111s   
 8382A??B	c                J  aa  ! R  R\         4      o ! R R4      pVV3R lpV! 4       o\        P                  ! S4      p V! 4        Ro\        4        V! 4       oV P	                  S4       V! 4       o\        P                  ! S4      p V! 4        Ro\        4        V! 4       oV P	                  S4       V! 4       o\        P                  ! S4      p V! 4        Ro\        4        T! 4       oT P	                  S4       T! 4       o\        P                  ! S4      pR
 F  p T! 4        K  	  Ro\        4        T! 4       oT P	                  S4       T! 4       o\        P                  ! S4      p  T! 4        T! 4       o\        P                  ! S4      p T! 4        Ro\        RR7      '       d   \        4        T! 4       oT P	                  S4        ! R R	4      pT! 4       o\        P                  ! S4      pT! 4       ;_uu_ 4        T! 4        RRR4       Ro\        RR7      '       d   \        4        T! 4       oT P	                  S4       R#   S d   p Rp?ELRp?ii ; i  S d     ELi ; i    EL; i     EKU  ; i   \
        h; i  \
         dS   pRTn        Ro\        4        T! 4       o\        RR7      '       d   \        4        T P	                  S4        Rp?ELqRp?ii ; i  S d      h   h ; i  S d      ELni ; ii ; i  + '       g   i     EL; i)c                   &   a  ] tR tRt o R tRtV tR# )=ExceptionTests.testExceptionCleanupState.<locals>.MyExceptioni  c                    Wn         R # r   r  r   r  s   &&r   r   FExceptionTests.testExceptionCleanupState.<locals>.MyException.__init__      r    r  Nr!   r(   s   @r   rI  r          r    rI  c                       ] tR tRtRtR# )7ExceptionTests.testExceptionCleanupState.<locals>.MyObji  r7   Nr   r7   r    r   MyObjr    r   r    r  c                     < Sp S! S4      hr   r7   )	local_refrI  r  s    r   inner_raising_funcDExceptionTests.testExceptionCleanupState.<locals>.inner_raising_func  s    Ic""r    NF)cpythonc                   ,   a  ] tR tRt o R tR tRtV tR# )9ExceptionTests.testExceptionCleanupState.<locals>.Contextit  c                    V # r   r7   r4   s   &r   	__enter__CExceptionTests.testExceptionCleanupState.<locals>.Context.__enter__u      r    c                    R # )Tr7   )r   exc_type	exc_valueexc_tbs   &&&&r   __exit__BExceptionTests.testExceptionCleanupState.<locals>.Context.__exit__w  s    r    r7   Nr"   r#   r$   r%   r  r  r&   r'   r(   s   @r   Contextr  t  s      r    r  )r   )r3   weakrefrefr	   re  rT   rV  r   )	r   r  r  wrrz   ir  rI  r  s	   &      @@r   testExceptionCleanupState(ExceptionTests.testExceptionCleanupState
  s   	) 		 		# g[[	  d# g[[	  d# g[[	  d# g[[A"$ 
 d# g[[	#"$$ g[[		  U++Ld#	 	
 g[[YY  U++Ld#G  		  			 	#
 !AMCL$C //c""	#&  	 	, YYs   I 
I$ I2 !I:/J K/ LI!I!$I/.I/2I7:JJJ K,AK''K,/L8K99K;;K>>L
L	L

LL"	c                b   a V3R  lp \          R#   \         d   oT! 4         Ro>R# Ro>ii ; i)c                     < S  R # r   r7   r?  s   r   print_errorIExceptionTests.test_exception_target_in_nested_scope.<locals>.print_error  s    r    N)	somethingr3   )r   r  rz   s   & @r   %test_exception_target_in_nested_scope4ExceptionTests.test_exception_target_in_nested_scope  s'    		 	MM	s    .).c                R   R  pV! 4       pV P                  \        V4      \        4       V P                  \        P
                  ! 4       4       V P                  \        V4      \        4       V P                  \        P
                  ! 4       4       V P                  \        V4      4        \        R4      h  \         d    T! 4       pT P                  \        T4      \        4       T P                  \        P
                  ! 4       \        4       T P                  \        T4      \        4       T P                  \        P
                  ! 4       \        4       T P                  \        T4      \        4       ?T P                  \        P
                  ! 4       \        4        R# i ; i)c               3      "    \        R 4      h  \          d2    \        P                  ! 4       x  \        P                  ! 4       x   Mi ; i\        P                  ! 4       x  R# 5i)caughtN)rT   ri   r   r7   r    r   yield_raise:ExceptionTests.test_generator_leaking.<locals>.yield_raise  sJ     &x(( &mmo%mmo%& --/!s    A' 9AA'
AA'r   N)rK  nextrT   re  ri   r   rc   )r   r  r  s   &  r   test_generator_leaking%ExceptionTests.test_generator_leaking  s   	" Md1gx0#--/*d1gx0#--/*$q'"
	>E"" 	>A!!$q'84!!#--/9=!!$q'84!!#--/9=!!$q'95!!#--/9=	>s   ,B7 7C+F&%F&c                    R  p \         h  \          d    T! 4       p\        T4        Mi ; i \        T4       M  \         d     Mi ; iT P                  \        P
                  ! 4       4       R# )c               3      "   R x  R # 5ir   r7   r7   r    r   r  1ExceptionTests.test_generator_leaking2.<locals>.g  s        	N)rZ   r  StopIterationre  ri   r   r   r  its   &  r   test_generator_leaking2&ExceptionTests.test_generator_leaking2  sa    		 	BH		H 		#--/*s    ++; A	A	c                   R  pV! 4       p\        V4        ^^ ,           V P                  \        P                  ! 4       4       R#   \         dw   pT P                  \        P                  ! 4       T4       TP                  T4      pT P                  \        P                  ! 4       T4       T P                  YC4        Rp?LRp?ii ; i)c               3   j   "    R x  R #   \          d    \        P                  ! 4       x   R # i ; i5ir   re   ri   r   r7   r    r   r  1ExceptionTests.test_generator_leaking3.<locals>.g  s'     &$ &mmo%&s   3
 3"0303N)r  re   r   ri   r   throwre  )r   r  r  rz   gen_excs   &    r   test_generator_leaking3&ExceptionTests.test_generator_leaking3  s    	&
 SR	&aC 	#--/* ! 	&MM#--/1-hhqkGMM#--/1-MM'%%		&s   	A CA,CCc                z   R  pV! 4       p \         h  \          d    \        \        T4      4      p Mi ; iT P                  T\        4        \        T4       M=  \         d0   pT P                  \
        P                  ! 4       T4        Rp?MRp?ii ; iT P                  \
        P                  ! 4       4       R# )c               3   p   "    ^^ ,           R#   \          d    \        P                  ! 4       x  h i ; i5ir   r  r7   r    r   r  1ExceptionTests.test_generator_leaking4.<locals>.g  s0     !$ mmo%s   6	 6$36N)rc   r  r  r   re   ri   r   re  )r   r  r  tprz   s   &    r   test_generator_leaking4&ExceptionTests.test_generator_leaking4  s    	 S	 O 	  d2hB	  	b+,	.H ! 	.MM#--/1--	. 	#--/*s$    44A B%%BBc                   a  V 3R  lpV! 4       p \         h  \          d    \        T4        Mi ; iS P                  \        \        T4       R# )c               3      <"   S P                  \        P                  ! 4       \        4       R x  S P	                  \        P                  ! 4       4       R # 5ir   )rK  ri   r   rZ   re  r4   s   r   r  >ExceptionTests.test_generator_doesnt_retain_old_exc.<locals>.g  s3     !!#--/<@cmmo.s   AAN)rZ   r  rg   r  r  s   f  r   $test_generator_doesnt_retain_old_exc3ExceptionTests.test_generator_doesnt_retain_old_exc  sD    	/ S	 	H	-r2s    //c                   a R  oV3R lpV! 4        \        4        V P                  \        P                  ! 4       4       R# )c               3      "   ^x  R# 5ir   r7   r7   r    r   
simple_genNExceptionTests.test_generator_finalizing_and_sys_exception.<locals>.simple_gen  s
     Gr  c                  X   < S! 4       p  \         h  \          d    \        T 4      u # i ; ir   )rZ   r  )genr  s    r   run_genKExceptionTests.test_generator_finalizing_and_sys_exception.<locals>.run_gen  s.    ,C!"" !Cy !s    ))N)r	   re  ri   r   )r   r  r  s   & @r   +test_generator_finalizing_and_sys_exception:ExceptionTests.test_generator_finalizing_and_sys_exception  s-    		! 		#--/*r    c                  aa  ! R  R\         4      o ! R R4      pVV3R lpV! 4       o\        P                  ! S4      pV! 4       p\        V4       V! V4       R;po\	        4        V! 4       oV P                  S4       R# )c                   &   a  ] tR tRt o R tRtV tR# )FExceptionTests._check_generator_cleanup_exc_state.<locals>.MyExceptioni  c                    Wn         R # r   r  r  s   &&r   r   OExceptionTests._check_generator_cleanup_exc_state.<locals>.MyException.__init__  r  r    r  Nr!   r(   s   @r   rI  r    r  r    rI  c                       ] tR tRtRtR# )@ExceptionTests._check_generator_cleanup_exc_state.<locals>.MyObji	  r7   Nr   r7   r    r   r  r  	  r   r    r  c               3   B   <"    S ! S4      h  S  d	    R x   R # i ; i5ir   r7   )rI  r  s   r   raising_genFExceptionTests._check_generator_cleanup_exc_state.<locals>.raising_gen  s'     !#&& s    N)r3   r  r  r  r	   re  )r   testfuncr  r  r  r  rI  r  s   &&    @@r   "_check_generator_cleanup_exc_state1ExceptionTests._check_generator_cleanup_exc_state  sm    	) 		 		 g[[MQCd#r    c                .    R  pV P                  V4       R# )c                 ^     V P                  \        4       4       R #   \         d     R # i ; ir   )r  rZ   r~  s   &r   do_throwGExceptionTests.test_generator_throw_cleanup_exc_state.<locals>.do_throw  s'    ' s    ,,Nr  )r   r  s   & r   &test_generator_throw_cleanup_exc_state5ExceptionTests.test_generator_throw_cleanup_exc_state  s    	
 	//9r    c                .    R  pV P                  V4       R# )c                 &    V P                  4        R # r   )rk   r~  s   &r   do_closeGExceptionTests.test_generator_close_cleanup_exc_state.<locals>.do_close%  s    GGIr    Nr  )r   r  s   & r   &test_generator_close_cleanup_exc_state5ExceptionTests.test_generator_close_cleanup_exc_state$  s    	//9r    c                .    R  pV P                  V4       R# )c                 
    R p R # r   r7   r~  s   &r   do_delCExceptionTests.test_generator_del_cleanup_exc_state.<locals>.do_del*  s    Ar    Nr  )r   r  s   & r   $test_generator_del_cleanup_exc_state3ExceptionTests.test_generator_del_cleanup_exc_state)  s    	//7r    c                6   a  V 3R  lpS P                  V4       R# )c                 f   <  \        V 4       SP                  R 4       R#   \         d     R# i ; i) should have raised StopIterationN)r  rt   r  r  r   s   &r   do_nextEExceptionTests.test_generator_next_cleanup_exc_state.<locals>.do_next/  s2    >Q 		<= ! s   ! 00Nr  )r   r  s   f r   %test_generator_next_cleanup_exc_state4ExceptionTests.test_generator_next_cleanup_exc_state.      	> 	//8r    c                6   a  V 3R  lpS P                  V4       R# )c                 r   <  V P                  R 4       SP                  R4       R #   \         d     R # i ; i)Nr  )sendrt   r  r  s   &r   do_sendEExceptionTests.test_generator_send_cleanup_exc_state.<locals>.do_send9  s6    >t 		<= ! s   ' 66Nr  )r   r  s   f r   %test_generator_send_cleanup_exc_state4ExceptionTests.test_generator_send_cleanup_exc_state8  r  r    c                   a  ! V3R  lR4      pRo \        V! 4       4      h    M; i\        4        T P                  S4       R# )c                   .   <a  ] tR tRt o V3R ltRtV tR# )*ExceptionTests.test_3114.<locals>.MyObjectiE  c                2   < \         P                  ! 4       oR # r   )ri   r   r8  s   &r   __del__2ExceptionTests.test_3114.<locals>.MyObject.__del__F  s    MMOr    r7   Nr"   r#   r$   r%   r  r&   r'   )r)   rz   s   @r   MyObjectr  E  s     $ $r    r"  Nr7   )r3   r	   re  )r   r"  rz   s   & @r   	test_3114ExceptionTests.test_3114B  sC    	$ 	$ 	HJ''	!s   " &c                    ! R  R\         4      p ! R R\         4      p ! R R\         4      p  Vh  T d   pTp Th  T d   pTp Th  T d   pTp	T P                  YQ4       T P                  Yr4       T P                  Y4       T P                  TP                  4       T P	                  TP                  T4       T P	                  T	P                  T4       ThRp?ii ; iRp?ii ; iRp?ii ; i  T d   p
T
p Rp
?
MRp
?
ii ; iT P	                  TX4       T P	                  TP                  X	4       T P	                  T	P                  X4       T P                  TP                  4       R# )c                       ] tR tRtRtR# )HExceptionTests.test_raise_does_not_create_context_chain_cycle.<locals>.AiR  r7   Nr   r7   r    r   Ar'  R  r   r    r(  c                       ] tR tRtRtR# )HExceptionTests.test_raise_does_not_create_context_chain_cycle.<locals>.BiT  r7   Nr   r7   r    r   Br*  T  r   r    r+  c                       ] tR tRtRtR# )HExceptionTests.test_raise_does_not_create_context_chain_cycle.<locals>.CiV  r7   Nr   r7   r    r   Cr-  V  r   r    r.  N)r3   rK  re  rV  r   )r   r(  r+  r.  a_r  b_r3  c_crz   r<   s   &           r   .test_raise_does_not_create_context_chain_cycle=ExceptionTests.test_raise_does_not_create_context_chain_cycleQ  sG   		 			 			 		    G  A
   --a3--a3--a3))!--8ammQ7ammQ7 	 	 "  	C	 	c1ammQ'ammQ'!--(sf   2 C0C+>C(C#A

C B
CC  C##C((C++C00C3 3D:DDc                   R  p V! 4        V P                  X\        4       V P                  VP                  \        4       V P                  VP                  P                  VP                  4       R#   \          d   pTp Rp?LzRp?ii ; i)c                  b     \        ^4      h  \          d   p Y n        \        ^4      hRp ? ii ; ir   )rd   rV  rc   exs    r   cycleBExceptionTests.test_no_hang_on_context_chain_cycle1.<locals>.cycle|  s0    # m# #!#l"#s    .).N)r3   rK  rc   rV  rd   r   )r   r9  rz   r<   s   &   r   $test_no_hang_on_context_chain_cycle13ExceptionTests.test_no_hang_on_context_chain_cycle1y  sj    	#	G 	c9-cooz:coo113??C  	C	s   A4 4B?BBc                @    ! R  R\         4      p ! R R\         4      p ! R R\         4      pV P                  V4      ;_uu_ 4       p V! 4       h  T dB   pTp T! 4       h  T d)   pTp T! 4       h  T d   p	T	p
Yn        T
hRp	?	ii ; iRp?ii ; iRp?ii ; i  + '       g   i     M; iT P                  XP                  X
4       T P                  T
P                  X4       T P                  TP                  X4       T P                  TP                  T
4       R# )c                       ] tR tRtRtR# )>ExceptionTests.test_no_hang_on_context_chain_cycle2.<locals>.Ai  r7   Nr   r7   r    r   r(  r?    r   r    r(  c                       ] tR tRtRtR# )>ExceptionTests.test_no_hang_on_context_chain_cycle2.<locals>.Bi  r7   Nr   r7   r    r   r+  rA    r   r    r+  c                       ] tR tRtRtR# )>ExceptionTests.test_no_hang_on_context_chain_cycle2.<locals>.Ci  r7   Nr   r7   r    r   r.  rC    r   r    r.  Nr3   rg   rV  r   r   )r   r(  r+  r.  r   _ar  _br3  _cr2  s   &          r   $test_no_hang_on_context_chain_cycle23ExceptionTests.test_no_hang_on_context_chain_cycle2  s    		 			 			 	 q!!R c	  	 #I  A c	  () 	 	  "!  	bllA&ammQ'ammQ'ammQ'sf   B	ABBA!!B	(B	+A22B9
BBB	B	BBBB+	c           	     ,    ! R  R\         4      p ! R R\         4      p ! R R\         4      p ! R R\         4      p ! R R	\         4      pV P                  V4      ;_uu_ 4       p V! 4       h  T db   pTp T! 4       h  T dI   p	T	p
 T! 4       h  T d0   pTpYn         T! 4       h  T d   pTpT! 4       pThR
p?ii ; iR
p?ii ; iR
p	?	ii ; iR
p?ii ; i  + '       g   i     M; iT P                  XP                  X4       T P                  TP                  X4       T P                  TP                  X4       T P                  TP                  X
4       T P                  T
P                  X4       T P                  TP                  T4       R
# )c                       ] tR tRtRtR# )>ExceptionTests.test_no_hang_on_context_chain_cycle3.<locals>.Ai  r7   Nr   r7   r    r   r(  rL    r   r    r(  c                       ] tR tRtRtR# )>ExceptionTests.test_no_hang_on_context_chain_cycle3.<locals>.Bi  r7   Nr   r7   r    r   r+  rN    r   r    r+  c                       ] tR tRtRtR# )>ExceptionTests.test_no_hang_on_context_chain_cycle3.<locals>.Ci  r7   Nr   r7   r    r   r.  rP    r   r    r.  c                       ] tR tRtRtR# )>ExceptionTests.test_no_hang_on_context_chain_cycle3.<locals>.Di  r7   Nr   r7   r    r   DrR    r   r    rS  c                       ] tR tRtRtR# )>ExceptionTests.test_no_hang_on_context_chain_cycle3.<locals>.Ei  r7   Nr   r7   r    r   ErU    r   r    rV  NrD  )r   r(  r+  r.  rS  rV  r   rE  r  rF  r3  rG  r2  _ddrz   s   &               r   $test_no_hang_on_context_chain_cycle33ExceptionTests.test_no_hang_on_context_chain_cycle3  s\   		 			 			 			 			 	 q!!R$c	 $$#I $A
$c	 $()$"##I  $ "A !A"#G$$	$	$ "!* 	bllA&ammQ'ammQ'ammQ'ammQ'ammQ's   %C'A..C5C8A??C	C			BCC B'
'B>.B99B>>CCC			C	CCCC)	c                      \        ^4      pVh  \        ^4      pTh; i  \         d   pTp Rp?MRp?ii ; iT P                  TX4       T P                  TP                  X4       R# r   )rc   rd   r3   r   rV  )r   teverz   r<   s   &    r   ,test_context_of_exception_in_try_and_finally;ExceptionTests.test_context_of_exception_in_try_and_finally  s`    	q\] 	C	 	c2coor*s    ! 838c                F     \        ^4      pVh   \        ^4      pTh; i  \        ^4      pTh; i  \         d   pTp Rp?MRp?ii ; iT P	                  TX4       T P	                  TP
                  X4       T P	                  TP
                  P
                  X4       R# r   )rc   rd   rP   r3   r   rV  )r   r\  r]  oerz   r<   s   &     r   /test_context_of_exception_in_except_and_finally>ExceptionTests.test_context_of_exception_in_except_and_finally  s    	q\]QZ 	C	 	c2coor*coo1126s$    " 03 A
AA
c                      \        ^4      pVh    M; i \        ^4      pTh  \        ^4      pTh; i  \         d   pTp Rp?MRp?ii ; iT P                  TX4       T P                  TP                  X4       R# r   )rd   rP   r3   r   rV  )r   r]  ra  rz   r<   s   &    r   -test_context_of_exception_in_else_and_finally<ExceptionTests.test_context_of_exception_in_else_and_finally  s    		  ]	
 QZ QZ 	C	 	c2coor*s)   & & 7 47 AA		Ac                   \        R R^^R4      pV P                  \        V4      R4       ^Vn        V P                  \        V4      R4       ^Vn        RVn        V P                  \        V4      R4       RVn        V P                  \        V4      R4       R	Vn        V P                  \        V4      R
4       \        R R^^R4      pV P                  \        V4      R4       ^Vn        V P                  \        V4      R4       ^Vn        RVn        V P                  \        V4      R4       RVn        V P                  \        V4      R4       R	Vn        V P                  \        V4      R4       \        R^^R4      pV P                  \        V4      R4       ^Vn        V P                  \        V4      R4       ^Vn        RVn        V P                  \        V4      R4       R	Vn        V P                  \        V4      R4       R# )r   xxxxxr   z8'baz' codec can't encode characters in position 1-4: fooz<'baz' codec can't encode character '\x78' in position 1: fool   ESh
MQ)EzJ'baz' codec can't encode characters in position 1-4: 965230951443685724997i  zK'4000' codec can't encode characters in position 1-4: 965230951443685724997i  zN'4000' codec can't encode characters in position 1000-4: 965230951443685724997s   xxxxxz3'baz' codec can't decode bytes in position 1-4: fooz5'baz' codec can't decode byte 0x78 in position 1: foozE'baz' codec can't decode bytes in position 1-4: 965230951443685724997zF'4000' codec can't decode bytes in position 1-4: 965230951443685724997zI'4000' codec can't decode bytes in position 1000-4: 965230951443685724997xxxxz/can't translate characters in position 1-4: fooz3can't translate character '\x78' in position 1: foozAcan't translate characters in position 1-4: 965230951443685724997zDcan't translate characters in position 1000-4: 965230951443685724997N)	r  rA   r@   r  r  rN   r  r  r  )r   us   & r   test_unicode_change_attributes-ExceptionTests.test_unicode_change_attributes  s    ugq!U;Q![\Q!`a'Q!mn
Q!noQ!qruh1e<Q!VWQ!XY'Q!hi
Q!ijQ!lm!&!Q6Q!RSQ!WX'Q!deQ!ghr    c                    \         \        \        3pV F-  pV P                  \	        VP                  V4      4      R 4       K/  	  R# ) N)r  r  r  rA   r@   __new__)r   klassesklasss   &  r   test_unicode_errors_no_object,ExceptionTests.test_unicode_errors_no_object6  s8    $&8:OOESu!56; r    c           
        \        \        R	^4      \        R	^4      \        ^4      4       EF  w  rpRV,          pV P                  RW1VR7      ;_uu_ 4        \        RWAVR4      pV P	                  \        V4      \
        4       RRR4       V P                  RW1VR7      ;_uu_ 4        \        WAVR4      pV P	                  \        V4      \
        4       RRR4       VP                  4       pV P                  RW1VR7      ;_uu_ 4        \        RWaVR4      pV P	                  \        V4      \
        4       RRR4       EK  	  R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     EKT  ; i)
rP  r  r   )objlenr  r  rL   rn  N	translater   )	r   rr   r?   r  rK  r@   r  r   r  )r   r  r  ru  r  r<   encodeds   &      r   %test_unicode_error_str_does_not_crash4ExceptionTests.test_unicode_error_str_does_not_crash<  s*    #*"aL"aL!H#
E
 ,ChvLL(#c2F%%c#h4 M k&3OO+CR@%%c#h4 P jjlGhvLL('#rJ%%c#h4 ML#
 ML PO
 MLLs$   .E)-E
.E-EE*-E?c                .    R  pV P                  V4       R# )c                     R V n         R # r   r  r<   s   &r   side_effectOExceptionTests.test_unicode_error_evil_str_set_none_object.<locals>.side_effectT  s	    CJr    Ndo_test_unicode_error_mutater   r  s   & r   +test_unicode_error_evil_str_set_none_object:ExceptionTests.test_unicode_error_evil_str_set_none_objectS  s    	))+6r    c                .    R  pV P                  V4       R# )c                 
    V = R # r   r}  r~  s   &r   r  OExceptionTests.test_unicode_error_evil_str_del_self_object.<locals>.side_effectY  s    
r    Nr  r  s   & r   +test_unicode_error_evil_str_del_self_object:ExceptionTests.test_unicode_error_evil_str_del_self_objectX  s    	))+6r    c                V  aa  ! VV3R  lR\         4      pRV! R4      3V! R4      R3V! R4      V! R4      33 F  w  r4V P                  WCR7      ;_uu_ 4        V P                  \        4      ;_uu_ 4        \        VR^ ^V4      oV P                  \        \         S4       RRR4       V P                  \
        4      ;_uu_ 4        \        VR^ ^V4      oV P                  \        \         S4       RRR4       RRR4       K  	  V P                  \        4      ;_uu_ 4        \        R^ ^V! R4      4      oV P                  \        \         S4       RRR4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     EK[  ; i  + '       g   i     R# ; i)c                   0   <a  ] tR tRt o VV3R ltRtV tR# )9ExceptionTests.do_test_unicode_error_mutate.<locals>.Evilib  c                   < S! S4       V # r   r7   )r   r<   r  s   &r   r5   AExceptionTests.do_test_unicode_error_mutate.<locals>.Evil.__str__c  s    C r    r7   Nr8   )r)   r<   r  s   @r   Evilr  b  s      r    r  r  rL   )rN   r  r   N   x)r@   r?   r  rg   rc   r  r  )r   r  r  r  rN   r<   s   &f   @r   r  +ExceptionTests.do_test_unicode_error_mutate]  sH   
	 	3 	 tG}%(^W%(^T']+!
F
 x??\\"455,XsAq&IC%%ic: 6 \\"455,XtQ6JC%%ic: 6	 @?!
 \\/00'Q4>BCic2 10 65 65	 @?? 100sH   F6+E!%F+E/1F"0FE,'F/E?:FFF(	c                  a  ! R  R\         4      p ! R R\        VR7      p\        4       ;_uu_ 4       p \        4       h  T d   pT P	                  R4        Rp?M'Rp?i\         d     M T P	                  R4        M; iRRR4       M  + '       g   i     M; iT3R loS! 4       pT P                  T\        \        T4      4       T P                  R	\        T4      4       R# )
c                   &   a  ] tR tRt o R tRtV tR# )/ExceptionTests.test_badisinstance.<locals>.Metai|  c                    \        4       hr   r}  )clssubclasss   &&r   __subclasscheck__AExceptionTests.test_badisinstance.<locals>.Meta.__subclasscheck__}  s
     l"r    r7   N)r"   r#   r$   r%   r  r&   r'   r(   s   @r   Metar  |  s     # #r    r  c                       ] tR tRtRtR# )6ExceptionTests.test_badisinstance.<locals>.MyExceptioni  r7   Nr   r7   r    r   rI  r    r   r    rI  )	metaclasszShould have raised KeyErrorz%exception should not be a MyExceptionNc                  H   <  S! 4       #   \          d   p T u R p ? # R p ? ii ; ir   )r[   )rz   r  s    r   r  ,ExceptionTests.test_badisinstance.<locals>.g  s$    s
! s   
 !!!z maximum recursion depth exceeded)	r  r3   r   rT   rt   rK  r[   r   r@   )r   r  rI  r$  rz   r<   r  s   &     @r   test_badisinstance!ExceptionTests.test_badisinstancex  s    	#4 	#	)t 	 &	9j  C		ABB 9		78 	
 cc>49=8#c(Cs@   B
A  BABB*B+B-B?BB	c                D    R  pV! 4        \         P                  ! 4        R# )c                  V    \        4       p \        R 4       F  pV P                  p K  	  R# )i@B N)r  rr   __dir__)or   s     r   r   3ExceptionTests.test_trashcan_recursion.<locals>.foo  s#    A9% II &r    N)r   r	   )r   r   s   & r   test_trashcan_recursion&ExceptionTests.test_trashcan_recursion  s    	 	r    c                    \        R 4       R\        ,          p\        P                  ! RRV4      w  r#pV P	                  V^4       V P                  RV4       V P                  RV4       V P                  RV4       R# )_testinternalcapia  if 1:
            import sys
            from _testinternalcapi import get_recursion_depth
            from test import support

            class MyException(Exception): pass

            def setrecursionlimit(depth):
                while 1:
                    try:
                        sys.setrecursionlimit(depth)
                        return depth
                    except RecursionError:
                        # sys.setrecursionlimit() raises a RecursionError if
                        # the new recursion limit is too low (issue #25274).
                        depth += 1

            def recurse(cnt):
                cnt -= 1
                if cnt:
                    recurse(cnt)
                else:
                    generator.throw(MyException)

            def gen():
                f = open(%a, mode='rb', buffering=0)
                yield

            generator = gen()
            next(generator)
            recursionlimit = sys.getrecursionlimit()
            try:
                recurse(support.exceeds_recursion_limit())
            finally:
                sys.setrecursionlimit(recursionlimit)
                print('Done.')
        -Wd-c   RecursionErrors   ResourceWarning   Done.N)r   __file__r   assert_python_failurerA   r   r   r   rcoutrB   s   &    r   $test_recursion_normalizing_exception3ExceptionTests.test_recursion_normalizing_exception  sw     	)*$H I$J %::5$MQ'-(#.h$r    r   c                    R p\         P                  ! RV4      w  r#pV P                  V^4       RpV P                  WT9   V: RVR,          : R2R7       V P	                  RV4       R# )	zif 1:
            import _testcapi
            try:
                raise _testcapi.RecursingInfinitelyError
            finally:
                print('Done.')
        r  r  z not found in :Ni  Nz... (truncated))r   r  N)r   r  rA   rk  r   )r   r   r  r  rB   r'  s   &     r   -test_recursion_normalizing_infinite_exception<ExceptionTests.test_recursion_normalizing_infinite_exception  sh     %::4FQ$|>#f+Xg-hih$r    c                  aaa R  pV3R loV3R loV3R lo\         P                  ! 4       p V! ^
4       SSS3 F?  pV P                  VR7      ;_uu_ 4         V! 4        V P                  R4       RRR4       KA  	  \         P
                  ! V4       R#   \         d     L1i ; i  + '       g   i     K}  ; i  \         P
                  ! T4       i ; i)c                     ^p  \         P                  ! V4        \         P                  ! Y,           4       R#   \         d    T^,          p KN  i ; ir   )ri   setrecursionlimitr[   )ndepths   & r   set_relative_recursion_limitUExceptionTests.test_recursion_in_except_handler.<locals>.set_relative_recursion_limit  sL    E))%0 !!%'*	 & QJEs   : AAc                  :   <  ^^ ,           R#    S ! 4         R# ; ir   r7   )recurse_in_excepts   r   r  JExceptionTests.test_recursion_in_except_handler.<locals>.recurse_in_except  s    $!$!#s   	 	c                  8   <  ^^ ,           S ! 4        R#     L; ir   r7   )recurse_after_excepts   r   r  MExceptionTests.test_recursion_in_except_handler.<locals>.recurse_after_except
  s!    ! !"s   	 c                  6   <  S ! 4        R #    S ! 4         R # ; ir   r7   )recurse_in_body_and_excepts   r   r  SExceptionTests.test_recursion_in_except_handler.<locals>.recurse_in_body_and_except  s    -*,-*,s    	)funcz#Should have raised a RecursionErrorN)ri   getrecursionlimitr?   rt   r[   r  )r   r  recursionlimitr  r  r  r  s   &   @@@r    test_recursion_in_except_handler/ExceptionTests.test_recursion_in_except_handler  s    		+	$	#	- ..0	2(,*,@B\]\\t\,,I 		"GH -, ^ !!.1 *  -,, !!.1sG   *B< B(B"B(3B< B%	"B($B%	%B((B93	B< <Czcannot test Py_TRACE_REFS buildc                    R p\        4       ;_uu_ 4        \        P                  ! RV4      w  r#pV P                  RV4       RRR4       R#   + '       g   i     R# ; i)a+  if 1:
            import _testcapi
            class C(): pass
            def recurse(cnt):
                cnt -= 1
                if cnt:
                    recurse(cnt)
                else:
                    _testcapi.set_nomemory(0)
                    C()
            recurse(16)
        r     MemoryErrorN)r   r   r  r   r  s   &    r   )test_recursion_normalizing_with_no_memory8ExceptionTests.test_recursion_normalizing_with_no_memory&  sG     !""(>>tTJLBSMM.#. #"""s   -AA	c                n   a aa ^ RI o^ RIHo VV V3R lpV! 4       pV! 4       pS P                  W#4       R# )r   Nraise_memoryerrorc                     <  S! 4        SP                  R 4       SP                  X4      #   \         d   p T P                  p Rp ? L-Rp ? ii ; i)z Should have raised a MemoryErrorN)rt   rW   r   	format_tb)rz   r   r  r   	tracebacks     r   raiseMemError6ExceptionTests.test_MemoryError.<locals>.raiseMemErrorG  sI    >!# 		<=&&r**	  %__%s   , AAA)r  r   r  rA   )r   r  tb1tb2r  r  s   f   @@r   test_MemoryErrorExceptionTests.test_MemoryError@  s.    
 	/	+ oo"r    c                p   R pRpV P                  \        \        P                  R4       \        P                  ! R4      pV P	                  \        V4      \
        4       V P                  V\        4       V P                  VP                  4       \        P                  ! RV4      pV P                  VP                  V4       \        P                  ! RVR7      pV P                  WT4        ! R R\        4      p\        P                  ! R	VWV34      pV P                  Wu4       V P                  Wv4       V P                  VP                  V4       \        P                  ! R
RVR^/4      pV P                  W4       V P                  VP                  ^4       V P                  VP                  R4       R# )zThis is a test docstring.zThis is another test docstring.error1z_testcapi.error1z_testcapi.error2z_testcapi.error3)basec                       ] tR tRtRtR# )1ExceptionTests.test_exception_with_doc.<locals>.Cim  r7   Nr   r7   r    r   r.  r  m  r   r    r.  z_testcapi.error4z_testcapi.error5rn  r  N)rg   ra   r   make_exception_with_docr   r  assertIsSubclassr3   re  __doc__rA   r  r  )	r   doc2doc4r  error2error3r.  error4error5s	   &        r   test_exception_with_doc&ExceptionTests.test_exception_with_docT  sn    +0+y'H'H"	$ 223EFd6lD)fi0&..) 223EtL. 223E8>@f-	 	223Et4:;@f-f(. 223Er39C8Ef-1%,r    c                  aaa ^ RI Ho  ! R R4      oRoVVV3R lp V! 4        V P                  R4       \        4        V P                  S! 4       R4       R#   \         d"   pT P	                  S! 4       R4        Rp?LJRp?ii ; i)r   r  c                       ] tR tRtRtR# )3ExceptionTests.test_memory_error_cleanup.<locals>.Ci  r7   Nr   r7   r    r   r.  r    r   r    r.  Nc                  P   < S! 4       p \         P                  ! V 4      oS! 4        R # r   r  r  )r2  r.  r  r  s    r   inner7ExceptionTests.test_memory_error_cleanup.<locals>.inner  s    AQBr    zMemoryError not raised)r   r  rt   rW   assertNotEqualr	   rA   )r   r  rz   r.  r  r  s   &  @@@r   test_memory_error_cleanup(ExceptionTests.test_memory_error_cleanup|  ss    
 	0	 		 	0G II./t$  	,d++	,s   A B%BBc                  aaa  ! R  R4      oRoVVV3R lo S! 4        V P                  R4       \        4        V P	                  S! 4       R4       R#   \         d"   pT P                  S! 4       R4        Rp?LJRp?ii ; i)c                       ] tR tRtRtR# )6ExceptionTests.test_recursion_error_cleanup.<locals>.Ci  r7   Nr   r7   r    r   r.  r    r   r    r.  Nc                  P   < S! 4       p \         P                  ! V 4      oS! 4        R # r   r  )r2  r.  r  r  s    r   r  :ExceptionTests.test_recursion_error_cleanup.<locals>.inner  s    AQBGr    zRecursionError not raised)rt   r[   r  r	   rA   )r   rz   r.  r  r  s   & @@@r   test_recursion_error_cleanup+ExceptionTests.test_recursion_error_cleanup  sn    	 			3G II12t$  	,d++	,s   A B A;;B c                *   V P                  \        4      ;_uu_ 4       p\        P                  ! \        4       R R R 4       V P                  XP                  P                  \        P                  VP                  4       R #   + '       g   i     LQ; ir   )	rg   rP   oslistdirr  rA   r   r   ENOTDIR)r   r   s   & r   test_errno_ENOTDIR!ExceptionTests.test_errno_ENOTDIR  sS    w''2JJx  (++U]]BLLI ('s   BB	c                    ! R  R4      pV! 4       p\         P                  ! 4       ;_uu_ 4       p\        \        V4      P                  4      p?\        4        V P                  VP                  P                  RV 24       V P                  VP                  P                  4       RRR4       R#   + '       g   i     R# ; i)c                   &   a  ] tR tRt o R tRtV tR# )1ExceptionTests.test_unraisable.<locals>.BrokenDeli  c                    \        R 4      pVh)zdel is brokenr}  r   r<   s   & r   r  9ExceptionTests.test_unraisable.<locals>.BrokenDel.__del__  s     1	r    r7   Nr!  r(   s   @r   	BrokenDelr    s      r    r  z,Exception ignored while calling deallocator N)r   catch_unraisable_exceptionr  r  r  r	   rA   
unraisableerr_msgassertIsNotNoneexc_traceback)r   r  r  r   obj_reprs   &    r   test_unraisableExceptionTests.test_unraisable  s    	 	 k//11RDI--.HLR]]22 ,,4:78   !<!<= 2111s   A8B11C	c                   \         \        3 F&  pV P                  V4      ;_uu_ 4         V! R 4      pVh	  R#   T dZ    \        4       ;_uu_ 4       p\        P
                  ! \        P                  ! 4       !   RRR4        M  + '       g   i      M; ii ; iXP                  4       pT P                  RT4       T P                  RT4       T P                  TP                  T4       T\        J d   T P                  RT4       MT P                  R T4       T P                  TR4       RRR4       EK+    + '       g   i     EK=  ; i)ztest messageNr   z	raise excz<exception str() failed>r   )rd   r0   r?   r   ri   __excepthook__exc_infogetvaluer   r"   r   )r   r  r<   r$  reports   &    r   test_unhandledExceptionTests.test_unhandled  s    #%78Hh''<">2CI 9   <(**f**CLLN; +***<  *2F;k62h//811MM"<fEMM.&9##FD1! ('''sE   D8
9B	(B:B	D8BB	D8B	BD88E
c                    R p\        ^^4       FG  p\        P                  ! RW,          4      w  r4pV P                  VR4       V P                  RV4       KI  	  R# )zif 1:
            import _testcapi
            class C(): pass
            _testcapi.set_nomemory(0, %d)
            C()
        r  r  N)r   x   )rr   r   r  r   )r   r   r  r  r  rB   s   &     r   "test_memory_error_in_PyErr_PrintEx1ExceptionTests.test_memory_error_in_PyErr_PrintEx  sO     q"A(>>tTXNLBSMM"h'MM.#. r    c                  aa  ! R  R\         4      o ! R R\         4      oVV3R lpV! 4       pVP                  R4       V P                  S4      ;_uu_ 4        VP                  S! 4       4       RRR4       R#   + '       g   i     R# ; i)c                       ] tR tRtRtR# )BExceptionTests.test_yield_in_nested_try_excepts.<locals>.MainErrori  r7   Nr   r7   r    r   	MainErrorr"    r   r    r#  c                       ] tR tRtRtR# )AExceptionTests.test_yield_in_nested_try_excepts.<locals>.SubErrori  r7   Nr   r7   r    r   SubErrorr%    r   r    r&  c               3   X   <"    S ! 4       h  S  d     R x  h   S d     h i ; ii ; i5ir   r7   )r#  r&  s   r   main=ExceptionTests.test_yield_in_nested_try_excepts.<locals>.main  sE     k!     s(   * ''#'#'*N)r3   r  rg   r  )r   r(  coror#  r&  s   &  @@r    test_yield_in_nested_try_excepts/ExceptionTests.test_yield_in_nested_try_excepts  sb    		 		y 		 v		$y))JJxz" *)))s   A::B	c                   a  V 3R  lpV! 4       p \         h  \          d    S P                  \        T4      ^4        Mi ; iS P                  \        T4      ^4       R# )c               3      <"    \         h  \          d    ^x   Mi ; iS P                  \        P                  ! 4       4       ^x  R# 5ir   )rd   re  ri   r   r4   s   r   r  ?ExceptionTests.test_generator_doesnt_retain_old_exc2.<locals>.g  s>        cmmo.Gs   A
 A
-A
N)rS   rA   r  )r   r  r  s   f  r   %test_generator_doesnt_retain_old_exc24ExceptionTests.test_generator_doesnt_retain_old_exc2  sS    	 c	+ 	+T#Y*	+cA&s    &??c                    R  pV P                  \        4      ;_uu_ 4        V! 4       p ^^ ,           RRR4       R#    \        T4       \        T4        L$; i  + '       g   i     R# ; i)c               3      "   ^x  h 5ir  r7   r7   r    r   r  1ExceptionTests.test_raise_in_generator.<locals>.g  s     Gs   N)rg   re   r  )r   r  r  s   &  r   test_raise_in_generator&ExceptionTests.test_raise_in_generator  sW    	
 011A! 21QQ 211s   A	=AAA+	Tz Won't work if __debug__ is Falsec                    \         s Q R4       h  \         d>   p@T P	                  T\        4       T P                  \        T4      R4        Rp?R# Rp?ii ; i)FhelloN)rc   AssertionErrorrt   r  rK  rA   r@   r8  s   & r   test_assert_shadowing$ExceptionTests.test_assert_shadowing$  sR    
 #	,!'!5 	.!!!^4SVW--	.s    A2AAc                    ! R  R\         4      p \         h  \          d   pTp Rp? ThRp?ii ; i  \         d     Mi ; i\        ^
4       F,  p \         h  \          d   p Rp?MRp?ii ; i\        4        K.  	  R# )c                       ] tR tRtRtR# )BExceptionTests.test_memory_error_subclasses.<locals>.TestExceptioni=  r7   Nr   r7   r    r   TestExceptionr>  =  r   r    r?  N)rW   r3   rr   r	   )r   r?  r<   inst_s   &    r   test_memory_error_subclasses+ExceptionTests.test_memory_error_subclasses4  s    	K 		 	D			
  		 rA!!  L s1    0+3 0A AAA.)A.c                    R \         P                   R2p\        P                  ! RV4      w  r#pV P	                  RV4       R# )zOif 1:
            import _testcapi
            _testcapi.run_in_subinterp("[0]*z")
            exit(0)
        r  r  N)ri   maxsizer   assert_python_okr   )r   r   r  rA  rB   s   &    r   test_memory_error_in_subinterp-ExceptionTests.test_memory_error_in_subinterpR  sB    ..1kk] ;	
 #33D$?
snc*r    c                R    R pR p / p \        R4      h  \         d   pTpT^,            R p?M"R p?ii ; i  \         d   pTp R p?MR p?ii ; iT P                  T\         4       T P                  T\        4       T P	                  TP
                  T4       R pR pR #   R pR pi ; i)Nbug)rd   r3   rK  rT   rA   rV  )r   err1err2rX  r<   exc1exc2s   &      r   test_keyerror_context$ExceptionTests.test_keyerror_contexta  s    	DD$U++  DaDD   !!$
3!!$1T--t4 DD DDsJ   B  8  508 B  58 AA
B  
AAB   B&r7   )NNrL   )cr"   r#   r$   r%   rE   r{   r   r   r   r   r   r   r   r   ri   rE  r   requires_resource
bigmemtestr   r   r   r   
skipUnlessplatformr   r/  r9  r<  rC  rL  rR  rY  r]  r`  rf  rl  rv  r
   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r	  r  r  r#  r3  r;  rH  rY  r^  rb  re  rk  rr  ry  r  r  r  r  skip_wasi_stack_overflowskip_emscripten_stack_overflowr  r  r   r   r  r  Py_TRACE_REFSr  r  r  r  r  r  r  r  r  r+  r0  r5  r:  rB  rG  rO  r&   r'   r(   s   @r   r:   r:   0   sB    4RChI0'QR7"2b)H __W+-XYu%59/ : & Z/
 + +Z%0N 035;5;I@V!$
26.*-
HE	0' 1$* 
- 
-2		wr><++&+6
3+2::
8
99&)PD&"(H-(^+7$+$#iJ<5.7
7
36 D D< %%'++-u% &  . ( ++-5%  .5%n __Y$&(<=%  > %$ ++-,2 .,2^  __W**,MN__Y$&(<=/ > O 
/* __Y$&(<=# > #$ __Y$&(<=$- > $-L __Y$&(<=% > %, % %(J>&2*  __W**,MN__Y$&(<=/ > O 
/ #.'$ $FG, H,< __Y$&(<=+ >+ r    r:   c                   8   a  ] tR tRt o R tR tR tR tRtV t	R# )NameErrorTestsiy  c                ~     \          R#   \         d(   pT P                  R TP                  4        Rp?R# Rp?ii ; i)bluchN)r[  rX   rA   r  r
  s   & r   test_name_error_has_name'NameErrorTests.test_name_error_has_namez  s1    	0 	0Wchh//	0s   
 <7<c                x  a  V 3R  lp V! 4        S P                  R4       S P                  RXP                  4       4       R#   S P                   df    \        P                  ! 4       ;_uu_ 4       p\        P
                  ! \        P                  ! 4       !   RRR4        K    + '       g   i      L; ii ; i)c                     < S P                  \        R 4      ;_uu_ 4        \         RRR4       R#   + '       g   i     R# ; i)aaaN)r   rX   aabr4   s   r   rz  )NameErrorTests.test_issue45826.<locals>.f  s(    ''	599 :999s	   1A	z%assertRaisesRegex should have failed.Nra  )	rt   failureExceptionr   r   ri   r  r  r   r  r   rz  rB   s   f  r   test_issue45826NameErrorTests.test_issue45826  s    		?C
 II=>eS\\^, $$ 	4((**c""CLLN3 +***	4s)   A .B91(B$B9$B5/B95B9c                   R  p V! 4        T P                  RXP                  4       4       T P                  RTP                  4       4       R#   \          df    \        P                  ! 4       ;_uu_ 4       p\        P                  ! \        P
                  ! 4       !   RRR4        K    + '       g   i      L; ii ; i)c                  p     \          R #   \         d!   p T P                  R 4       \        4       hR p ? ii ; ir   )nonsenser  rJ  re   )rV  s    r   rz  1NameErrorTests.test_issue45826_focused.<locals>.f  s1    *  *  &'))*s   
 505Nri  re   )re   r   r   ri   r  r  r   r  rd  s   &  r   test_issue45826_focused&NameErrorTests.test_issue45826_focused  s    	*	4C
 	j#,,.1)3<<>: ! 	4((**c""CLLN3 +***	4s)   A (B>6(B)B>)B:4B>:B>c                8    R  pV P                  \        V4       R# )c                  "   a   ! V 3R  lR4      o R# )c                      < ] tR tRt Z  RtR# );NameErrorTests.test_gh_111654.<locals>.f.<locals>.TestClassi  r7   Nr   	TestClasss   r   rr  rp    s    r    rr  Nr7   rq  s   @r   rz  (NameErrorTests.test_gh_111654.<locals>.f  s     r    N)rg   rX   r   rz  s   & r   test_gh_111654NameErrorTests.test_gh_111654  s    	 	)Q'r    r7   N)
r"   r#   r$   r%   r\  re  rk  ru  r&   r'   r(   s   @r   rY  rY  y  s     0- ;"( (r    rY  c                   2   a  ] tR tRt o R tR tR tRtV tR# )AttributeErrorTestsi  c                (   \        R 4      pV P                  VP                  4       V P                  VP                  4       \	        4       p\        RRVR7      pV P                  VP                  R4       V P                  VP                  V4       R# )zOuch!Ouchcarryr  N)rH   re  r  r  r  rA   r   )r   r<   sentinels   &  r   test_attributes#AttributeErrorTests.test_attributes  sk    W%#((##''"8V'x@7+cggx(r    c                    ! R  R4      pV! 4       p VP                     \
        P                  VR4       R#   \         dB   pT P                  RTP                  4       T P                  Y#P                  4        Rp?L`Rp?ii ; i  \         dC   pT P                  RTP                  4       T P                  Y#P                  4        Rp?R# Rp?ii ; i)c                       ] tR tRtRtRtR# )<AttributeErrorTests.test_getattr_has_name_and_obj.<locals>.Ai  Nr7   )r"   r#   r$   r%   blechr&   r7   r    r   r(  r    s    Er    r(  r[  N)r[  rH   rA   r  r  r  __getattribute__r   r(  r  r<   s   &   r   test_getattr_has_name_and_obj1AttributeErrorTests.test_getattr_has_name_and_obj  s    	 	 c	+II	+##C1	  	+Wchh/S''**	+
  	+Wchh/S''**	+s,   8 B B7A??BC7CCc                     ! R  R4      pV! 4       p VP                  4        R#   \         dC   pT P                  RTP                  4       T P                  Y#P                  4        Rp?R# Rp?ii ; i)c                   &   a  ] tR tRt o R tRtV tR# )GAttributeErrorTests.test_getattr_has_name_and_obj_for_method.<locals>.Ai  c                    R # r   r7   r4   s   &r   r  MAttributeErrorTests.test_getattr_has_name_and_obj_for_method.<locals>.A.blech  s    r    r7   N)r"   r#   r$   r%   r  r&   r'   r(   s   @r   r(  r    s      r    r(  r[  N)r[  rH   rA   r  r  r  s   &   r   (test_getattr_has_name_and_obj_for_method<AttributeErrorTests.test_getattr_has_name_and_obj_for_method  s\    	 	 c	+IIK 	+Wchh/S''**	+s   % A27A--A2r7   N)	r"   r#   r$   r%   r}  r  r  r&   r'   r(   s   @r   rx  rx    s     	)+ 
+ 
+r    rx  c                   8   a  ] tR tRt o R tR tR tR tRtV t	R# )ImportErrorTestsi  c                   \        R 4      pV P                  VP                  4       V P                  VP                  4       \        R RR7      pV P	                  VP                  R4       V P                  VP                  4       \        R RR7      pV P	                  VP                  R4       V P                  VP                  4       \        R RRR7      pV P	                  VP                  R4       V P	                  VP                  R4       RpV P                  \        V4      ;_uu_ 4        \        R RR	7       R
R
R
4       V P                  \        V4      ;_uu_ 4        \        R RRR7       R
R
R
4       V P                  \        V4      ;_uu_ 4        \        R RRR7       R
R
R
4       V P                  \        V4      ;_uu_ 4        \        RR	7       R
R
R
4       V P                  \        V4      ;_uu_ 4        \        R RRR7       R
R
R
4       R
#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     R
# ; i)test
somemoduler  somepathpathsomename)r  r  z<ImportError\(\) got an unexpected keyword argument 'invalid'keyword)invalidNr  )r  r  r  )r  r  T)r  another)rQ   re  r  r  rA   r   rc   )r   r<   r   s   &  r   r}   ImportErrorTests.test_attributes  s   &!#((##((#&|4<0#((#&z2:.#((#&z
C:.:.M##Is33	2 4 ##Is33VY? 4 ##Is33VY? 4 ##Is33	* 4 ##Is33	4@ 43 43 43 43 43 433s<   0H$H-I II&H*	-H=	 I	I#	&I7	c                   \        R RRR7      pV P                  VP                  R4       V P                  VP                  R 4       V P                  VP                  R4       V P                  VP
                  R4       VP                  4        V P                  VP                  R4       V P                  VP                  R4       V P                  VP                  R4       V P                  VP
                  R4       R# )r  r  r  r  r  Nr  r7   )rQ   rA   r   r   r  r  r   r
  s   & r   test_reset_attributes&ImportErrorTests.test_reset_attributes  s    &vF;9-&)6*6* 	2&$'4(4(r    c                    \        R \        3RR7      ;_uu_ 4        Rp\        V4      pV P                  \	        V4      \	        V4      4       RRR4       R#   + '       g   i     R# ; i)rn  T)quiets   abcN)r   BytesWarningrQ   rA   r@   )r   argr<   s   &  r   test_non_str_argument&ImportErrorTests.test_non_str_argument  sJ    R.d;;Cc"CSXs3x0 <;;;s   2AA)	c                   \        4       \        R R7      \        RR7      \        R RR7      3 EF  p\        R/ VB p\        \        P                  ^,           4       F  p\        P
                  ! \        P                  ! W#4      4      pV P                  VP                  R4       V P                  VP                  R4       V P                  VP                  VP                  4       V P                  VP                  VP                  4       K  	  \        P                  \        P                  3 F  pV! V4      pV P                  VP                  R4       V P                  VP                  R4       V P                  VP                  VP                  4       V P                  VP                  VP                  4       K  	  EK  	  R# )r  r  r  r  r  r  Nr  )r  rQ   rr   r   r!  rn   r"  rA   r   r   r  r  copydeepcopy)r   r&  origprotor<   r2  s   &     r   test_copy_pickle!ImportErrorTests.test_copy_pickle  s?   v,,*=?F 00Dv66:;ll6<<#<=  95  &1  4995  4995 < YY-g  95  &1  4995  4995 .?r    r7   N)
r"   r#   r$   r%   r}  r  r  r  r&   r'   r(   s   @r   r  r    s       AD)16 6r    r  c                    \        V \        4      '       d?   \        \        R RR7      ;_uu_ 4       pVP	                  \        V 4      4       RRR4       M2\        \        R4      ;_uu_ 4       pVP	                  V 4       RRR4       \        P                  ! RRR\        4      w  r#pVP                  R4      P                  4       #   + '       g   i     LO; i  + '       g   i     Lb; i)rK   rL   rM   Nwbr  z-Xutf8)
r   r@   rj   r   writer   r   r  r   
splitlines)r   testfile_rc_outrB   s   &    r   
run_scriptr  #  s    &#&#00HNN6&>* 10 &$8NN6"  "88ffUNCs::g))++ 10  s   C-CC	C)	c                   F   a  ] tR tRt o R t]R 4       t]R 4       tRtV t	R# )AssertionErrorTestsi-  c                $    \        \        4       R # r   )r   r   r4   s   &r   tearDownAssertionErrorTests.tearDown.  s	    vr    c                   R . RO3R. RO3R. RO3R. RO3R. RO3RP                  4       . RO3RP                  R4      . RO3\        RP                  4       ,           . RO3R. RO3R. RO3R	. RO3.pV FH  w  r#V P                  VR
7      ;_uu_ 4        \        V4      pV P	                  VRR V4       RRR4       KJ  	  R#   + '       g   i     K_  ; i)zassert Nonezassert 0zassert 1 > 2zassert 1 > 2 and 3 > 2u   assert 1 > 2, "messäge"u)   # coding: latin1
assert 1 > 2, "messäge"latin1z<
             assert (
                 1 > 2)
             zG
             assert (
                 1 > 2), "Message"
             zZ
             assert (
                 1 > 2), \
                 "Message"
             r   N)z    assert Nonez           ^^^^r9  )z    assert 0z           ^r9  )z    assert 1 > 2           ^^^^^r9  )z    assert 1 > 2 and 3 > 2z           ^^^^^^^^^^^^^^^r9  )u       assert 1 > 2, "messäge"r  u   AssertionError: messäge)z
    1 > 2)	    ^^^^^r9  )z    1 > 2), "Message"r  AssertionError: Message)z    1 > 2), \r  r  )r   r   r?   r  rA   r   casesr   r'  results   &    r   test_assertion_error_location1AssertionErrorTests.test_assertion_error_location1  s&       & ( (..0 :@@J 299;;				

_Z
v !&FV,,#F+  h7 -, !&,,,s   !C  Cc           	         R RR.3R. RO3.pV FR  w  r#V P                  VR7      ;_uu_ 4        \        V4      pV P                  V\        V4      ) R V4       RRR4       KT  	  R#   + '       g   i     Ki  ; i)zJ
             assert (
                 1 > 2
             )
             z	    1 > 2r9  ze
             assert (
                 1 < 2 and
                 3 > 4
             )
             r  N)z    1 < 2 andz	    3 > 4r9  )r?   r  rA   lenr  s   &    r   test_multiline_not_highlighted2AssertionErrorTests.test_multiline_not_highlighted  s      $	
0 !&FV,,#F+  X!8(C -, !&,,,s   +A''A8r7   N)
r"   r#   r$   r%   r  r   r  r  r&   r'   r(   s   @r   r  r  -  s7      _8 _8B D Dr    r  c                   n   a  ] tR tRt o Rt]R 4       t]R 4       tR tR t	R t
R tR	 tR
 tR tRtV tR# )SyntaxErrorTestsi  Nc                   R	\        R4      3R
\        R4      3R\        R4      3R\        R4      3R\        R4      3R\        R4      3R\        R4      3R\        R4      3R\        R4      3.	pV F+  w  r#V P                  VR7      ;_uu_ 4         \        RV4      h	  R#   \         d   p\        P                  ! 4       ;_uu_ 4       p\
        P                  ! \
        P                  ! 4       !   RRR4       M  + '       g   i     M; iT P                  TXP                  4       4       Tp Rp?MRp?ii ; i RRR4       K    + '       g   i     K  ; i)bad.pyz
               File "bad.py", line 1
                 abcdefg
                  ^^^^^
             SyntaxError: bad bad
             z
               File "bad.py", line 1
                 abcdefg
                  ^
             SyntaxError: bad bad
             z
               File "bad.py", line 1
                 abcdefg
                    ^
             SyntaxError: bad bad
             zn
               File "bad.py", line 1
                 abcdefg
             SyntaxError: bad bad
             z
               File "bad.py", line 1
                 abcdefg
                  ^^^^^^
             SyntaxError: bad bad
             )r   bad badNr  r   r5  abcdefgr      )r  r   r5  r  r   r6  )r  r   r5  r  r   )r  r   rF  r  r   r5  )r  r   r  r   r  )r  r   r  r  r   rw  )r  r   r   r  r   r   )r  r   r   r  r   rP  r  r   r5  r  r   d   )
r   r?   r\   r   r   ri   r  r  r   r  )r   r  r   r'  r<   rB   the_exceptions   &      r   test_range_of_offsets&SyntaxErrorTests.test_range_of_offsets  s    / / 0 / 1 1 / / 1MN
^ $ND4(((%i66 $ # ( 0022c**CLLN; 3222MM(CLLN;$'M	( " )(((sH   EB""D:	-D5	
(C;2	D5	;D*D5	0E5D:	:EEc                h    ! R  R\         4      p V! RR4      h  \          d   p\        P                  ! 4       ;_uu_ 4       p\        P                  ! \        P
                  ! 4       !   RRR4       M  + '       g   i     M; iT P                  RXP                  4       4        Rp?R# Rp?ii ; i)c                       ] tR tRtRtR# )5SyntaxErrorTests.test_subclass.<locals>.MySyntaxErrori	  r7   Nr   r7   r    r   MySyntaxErrorr  	  r   r    r  r  Nz0
  File "bad.py", line 1
    abcdefg
     ^^^^^
r  )r\   r   r   ri   r  r  r   r  )r   r  r<   rB   s   &   r   test_subclassSyntaxErrorTests.test_subclass	  s    	K 				+LMM 	((**c""CLLN3 +***MM  	\\^	 	s,   	 B1B,(A3*	B,3B>(B,,B1c                T   V P                  \        \        4       R p\        VP	                  R4      4      pV P                  VR,          R4       V P                  VR	,          R4       Rp\        V4      pV P                  VR,          R4       V P                  VR	,          R4       R# )
uU   # -*- coding: cp437 -*-
"┬ó┬ó┬ó┬ó┬ó┬ó" + f(4, x for x in range(1))
cp437u@       "┬ó┬ó┬ó┬ó┬ó┬ó" + f(4, x for x in range(1))z                            ^^^z# -*- coding: ascii -*-

(
z    (z    ^Nr  r  )
addCleanupr   r   r  r   rA   )r   r   rB   s   &  r   test_encodingsSyntaxErrorTests.test_encodings"	  s    'M 	 w/0R"deR"CD 2 R'*R'*r    c                    V P                  \        \        4       \        R 4      pV P	                  RVR,          4       R# )   z8SyntaxError: Non-UTF-8 code starting with '\x89' in fileNr   )r  r   r   r  r   r   rB   s   & r   test_non_utf8SyntaxErrorTests.test_non_utf82	  s0    '!QSVWYSZ[r    c                  a  V 3R  lpV! R4      pS P                  \        V4      R4       S P                  VP                  4       S P                  VP                  ^4       S P                  VP
                  ^4       V! RP                  4       4      pS P                  \        V4      R4       S P                  VP                  4       S P                  VP                  ^4       S P                  VP
                  ^4       V! \        RP                  4       ,           4      pS P                  \        V4      R4       S P                  VP                  4       S P                  VP                  ^4       S P                  VP
                  ^4       V! RP                  R4      4      pS P                  \        V4      R4       S P                  VP                  4       S P                  VP                  ^4       S P                  VP
                  ^4       V! R4      pS P                  \        V4      R4       S P                  VP                  4       S P                  VP                  ^4       S P                  VP
                  ^4       V! R4      pS P                  \        V4      R4       S P                  VP                  4       S P                  VP                  ^4       S P                  VP
                  ^4       R# )	c                    < SP                  \        4      ;_uu_ 4       p\        V R R4       RRR4       VP                  #   + '       g   i     XP                  # ; i)r_   r`   N)rg   r\   rs   r   )r   r   r   s   & r   try_compile8SyntaxErrorTests.test_string_source.<locals>.try_compile9	  sD    "";//2
F3 0<< 0/<<s   AA	   return "ä"z,'return' outside function (<string>, line 1)   # coding: latin1
return "ä"r  z,'return' outside function (<string>, line 2)N  return "ä" #ääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääää  return "ä" # ääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääää)rA   r@   re  r   r   r   r   r   )r   r  r<   s   f  r   test_string_source#SyntaxErrorTests.test_string_source8	  sE   	 
 -(S#QR#((#Q',-..01S#QR#((#Q',(]%9%9%;;<S#QR#((#Q',9@@JKS#QR#((#Q',56S#QR#((#Q',67S#QR#((#Q',r    c                   V P                  \        \        4       \        R 4      pV P	                  VRR . RO4       \        R P                  4       4      pV P	                  VRR . RO4       \        \        R P                  4       ,           4      pV P	                  VRR . RO4       \        RP                  R4      4      pV P	                  VRR . RO4       \        R	4      pV P	                  VR
R RR.4       V P	                  VR,          R,          R4       \        R4      pV P	                  VR
R RR.4       V P	                  VR,          R,          R4       R# )r  N&SyntaxError: 'return' outside functionr  r  z    ^^^^^^^^^^^:Nr  Nr  )u       return "ä"z    ^^^^^^^^^^r  r  r  u       return "ä" #äääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääär  u       return "ä" # äääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääääää)r  r   r   r  rA   r   r   r  s   & r   test_file_source!SyntaxErrorTests.test_file_sourceb	  si   ''RS $C 	D
 --/0RS $C 	D
 M$8$8$::;RS $C 	D
 8??IJRS $C 	D
 45RS*A$C 	D 	R(EF56RS*A$C 	D 	R(FGr    c                   Rp\        RV4      pVw  r4rVrxV P                  W2P                  4       V P                  WBP                  4       V P                  WrP                  4       V P                  WRP
                  4       V P                  WP                  4       V P                  WbP                  4       V P                  RVP                  4       R# )r  r  Nr  	r\   rA   r   r   r   r   r   r   r   )	r   r   r  r   r   r   errorr   r   s	   &        r   test_attributes_new_constructor0SyntaxErrorTests.test_attributes_new_constructor	  s    2#It4BF?&#9#9:!5!56%=%=>!5!56%=%=> 2 23M$5$56r    c                   Rp\        RV4      pVw  r4rVV P                  W2P                  4       V P                  WBP                  4       V P                  RVP                  4       V P                  WRP
                  4       V P                  RVP                  4       V P                  WbP                  4       V P                  RVP                  4       R# )r  r  N)r  r   r5  r  r  )r   r   r  r   r   r   r  s   &      r   test_attributes_old_constructor0SyntaxErrorTests.test_attributes_old_constructor	  s    *#It4*.'&#9#9:!5!56}778!5!56}778 2 23M$5$56r    c                    RpV P                  \        \        RV4       RpV P                  \        \        RV4       RpV P                  \        \        RV4       R# )r  r  N)r  r   r5  )r  r   r5  rF  rP     r     )r  r   r5  r  r   )rg   rc   r\   r   r   s   & r   test_incorrect_constructor+SyntaxErrorTests.test_incorrect_constructor	  sM    )[)TB.)[)TB-)[)TBr    r7   )r"   r#   r$   r%   maxDiffr   r  r  r  r  r  r  r  r  r  r&   r'   r(   s   @r   r  r    sa     GX( X(t  + \(-T$HL
7
7C Cr    r  c                   &   a  ] tR tRt o R tRtV tR# )TestInvalidExceptionMatcheri	  c                N   V P                  \        4      ;_uu_ 4         \        h  ^* d     Mi ; i RRR4       M  + '       g   i     M; iT P                  \        4      ;_uu_ 4         \        h  \        ^*3 d     Mi ; i RRR4       R#   + '       g   i     R# ; i)r2  N)rg   rc   rd   r4   s   &r   'test_except_star_invalid_exception_typeCTestInvalidExceptionMatcher.test_except_star_invalid_exception_type	  s    y))   	 *))) y))  # 	 *)))sG   =&0=0=A	-B/A55BBBBB$	r7   N)r"   r#   r$   r%   r  r&   r'   r(   s   @r   r	  r	  	  s      r    r	  c                   b   a  ] tR tRt o R tR tR tR tR tR t	R t
R	 tR
 tR tR tRtV tR# )PEP626Testsi	  c                    V! 4        V P                  R 4       . pXP                  pV'       da   VP                  pTP                  VP                  f   RM&VP                  VP                  P                  ,
          4       VP                  pKh  V P                  \        V4      V4       R#   \         d   pTP                  p Rp?LRp?ii ; i)rQ  N)rt   r3   r   r   r   r  f_linenor   co_firstlinenorA   tuple)r   rz  r'  r8  tlinesframes   &&*    r   lineno_after_raisePEP626Tests.lineno_after_raise	  s    	-C II+,IIJJELL.u||::: 		Aux0  	!  A	!s   B- -C8C		Cc                0    R  pV P                  V^4       R# )c                      ^^ ,           R# r   r7   r7   r    r   simple:PEP626Tests.test_lineno_after_raise_simple.<locals>.simple	  s    aCr    Nr  )r   r  s   & r   test_lineno_after_raise_simple*PEP626Tests.test_lineno_after_raise_simple	  s    	 	*r    c                0    R  pV P                  V^4       R# )c                  <     ^^ ,           R#    ^^ ,            R# ; ir   r7   r7   r    r   	in_except@PEP626Tests.test_lineno_after_raise_in_except.<locals>.in_except	  s!    !!s   	 Nr  )r   r!  s   & r   !test_lineno_after_raise_in_except-PEP626Tests.test_lineno_after_raise_in_except	  s    	 		1-r    c                0    R  pV P                  V^4       R# )c                  L     ^^ ,           R#   \          d   p  Rp ? R# Rp ? ii ; ir   )rc   r7  s    r   other_except@PEP626Tests.test_lineno_after_other_except.<locals>.other_except	  s#    ! s   	 ##Nr  )r   r'  s   & r   test_lineno_after_other_except*PEP626Tests.test_lineno_after_other_except	  s    	
 	a0r    c                0    R  pV P                  V^4       R# )c                  ^     ^^ ,           R#   \          d   p ^^ ,            Rp ? R# Rp ? ii ; ir   r2   r7  s    r   in_named_except@PEP626Tests.test_lineno_in_named_except.<locals>.in_named_except	  s*    ! !s   	 ,	',Nr  )r   r-  s   & r   test_lineno_in_named_except'PEP626Tests.test_lineno_in_named_except	  s    	 	3r    c                0    R  pV P                  V^4       R# )c                  $     ^^ ,           R#   i ; ir   r7   r7   r    r   in_try.PEP626Tests.test_lineno_in_try.<locals>.in_try	  s    !s   	 Nr  )r   r3  s   & r   test_lineno_in_tryPEP626Tests.test_lineno_in_try	  s    	
 	*r    c                0    R  pV P                  V^4       R# )c                  8      ^^ ,           R#   ^^ ,           i ; ir   r7   r7   r    r   in_finally_normalDPEP626Tests.test_lineno_in_finally_normal.<locals>.in_finally_normal	  s"    ! !s   Nr  )r   r9  s   & r   test_lineno_in_finally_normal)PEP626Tests.test_lineno_in_finally_normal	      	 	 115r    c                0    R  pV P                  V^4       R# )c                  H     ^^ ,           ^^ ,           R#   ^^ ,           i ; ir   r7   r7   r    r   in_finally_exceptDPEP626Tests.test_lineno_in_finally_except.<locals>.in_finally_except 
  s&    !! !s   	 !Nr  )r   r@  s   & r   test_lineno_in_finally_except)PEP626Tests.test_lineno_in_finally_except	  r=  r    c                L   a  ! R  R4      oV3R lpV P                  V^4       R# )c                   ,   a  ] tR tRt o R tR tRtV tR# )0PEP626Tests.test_lineno_after_with.<locals>.Noopi	
  c                    V # r   r7   r4   s   &r   r  :PEP626Tests.test_lineno_after_with.<locals>.Noop.__enter__

  r  r    c                    R # r   r7   r  s   &*r   r  9PEP626Tests.test_lineno_after_with.<locals>.Noop.__exit__
  s    r    r7   Nr  r(   s   @r   NooprF  	
  s      r    rK  c                  t   < S ! 4       ;_uu_ 4        ^^ ,            RRR4       R#   + '       g   i     R# ; ir   r7   )rK  s   r   
after_with6PEP626Tests.test_lineno_after_with.<locals>.after_with
  s     ! s   
&7	Nr  )r   rM  rK  s   & @r   test_lineno_after_with"PEP626Tests.test_lineno_after_with
  s$    	 	
	 	
A.r    c                    R  pV P                  V^4       VP                  P                  RR7      Vn        V P                  VR4       R# )c                      ^^ ,           R# r   r7   r7   r    r   rz  8PEP626Tests.test_missing_lineno_shows_as_none.<locals>.f
  s    aCCr    s   )co_linetableN)r  __code__r   rt  s   & r   !test_missing_lineno_shows_as_none-PEP626Tests.test_missing_lineno_shows_as_none
  sA    	1%ZZ''5T'U
4(r    c                N   a  ! R  R4      oV3R lpV P                  V^^4       R# )c                   ,   a  ] tR tRt o R tR tRtV tR# )CPEP626Tests.test_lineno_after_raise_in_with_exit.<locals>.ExitFailsi
  c                    V # r   r7   r4   s   &r   r  MPEP626Tests.test_lineno_after_raise_in_with_exit.<locals>.ExitFails.__enter__
  r  r    c                    \         hr   r}  r  s   &*r   r  LPEP626Tests.test_lineno_after_raise_in_with_exit.<locals>.ExitFails.__exit__
  s      r    r7   Nr  r(   s   @r   	ExitFailsrZ  
  s     ! !r    r_  c                  r   < S ! 4       ;_uu_ 4        ^^ ,           RRR4       R#   + '       g   i     R# ; ir   r7   )r_  s   r   rM  DPEP626Tests.test_lineno_after_raise_in_with_exit.<locals>.after_with"
  s    ! s   
%6	Nr  )r   rM  r_  s   & @r   $test_lineno_after_raise_in_with_exit0PEP626Tests.test_lineno_after_raise_in_with_exit
  s&    	! 	!	 	
Aq1r    r7   N)r"   r#   r$   r%   r  r  r#  r)  r/  r5  r;  rB  rO  rV  rb  r&   r'   r(   s   @r   r  r  	  sA     1$+.14+66
/)
2 
2r    r  __main__i)3r  r  ri   r   r   r  r   codecsr   	itertoolsr   textwrapr   test.supportr   r   r   r	   r
   r   r   r   test.support.import_helperr   test.support.os_helperr   r   test.support.warnings_helperr   r  r   r   r   rQ   r3   r   r+   r0   TestCaser:   rY  rx  r  r  r  force_not_colorized_test_classr  r	  r  r"   r(  r7   r    r   <module>rn     sg    	 
       / / /
 5 1 7 !Y I 
+ +FX&& FR:-(X&& -(d&+(++ &+VJ6x(( J6Z,CD(++ CDL 	''tCx(( tC (tCn("3"3 k2(## k2Z zMMO YP  IGs   
E E.-E.