python (3.11.7)

(root)/
lib/
python3.11/
test/
__pycache__/
test_exceptions.cpython-311.opt-2.pyc

e0xdddlZddlZddlZddlZddlZddlZddlZddlZddlm	Z	ddl
mZmZm
Z
mZmZmZmZddlmZddlmZmZddlmZddlmZ	ddlmZn
#e$rd	ZYnwxYwGd
deZGdd
eZ GddeZ!Gddej"Z#dZ$Gddej"Z%Gddej"Z&Gddej"Z'Gddej"Z(Gddej"Z)Gddej"Z*e+dkrej,dSdS)N)dedent)captured_stderrcheck_impl_detailcpython_only
gc_collect
no_tracing
script_helperSuppressCrashReport)
import_module)TESTFNunlink)check_warnings)support)INT_MAXiceZdZdZdS)NaiveExceptionc||_dSNxselfrs  H/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/test/test_exceptions.py__init__zNaiveException.__init__
N__name__
__module____qualname__rrrrrs#rrceZdZdZdZdS)SlottedNaiveExceptionrc||_dSrrrs  rrzSlottedNaiveException.__init__#rrN)rrr 	__slots__rr!rrr#r#!s(Irr#ceZdZdZdS)BrokenStrExceptionc td)Nzstr() is broken	Exceptionrs r__str__zBrokenStrException.__str__'s)***rN)rrr r,r!rrr'r'&s#+++++rr'ceZdZdZdZdZdZdOdZdZd	Z	e
jee
jkd
ejdejedd
dZedZdZe
je
jdkddZdZdZdZdZdZdZdZdZ dZ!e"dZ#dZ$d Z%d!Z&d"Z'd#Z(d$Z)d%Z*d&Z+d'Z,d(Z-d)Z.d*Z/d+Z0d,Z1d-Z2d.Z3d/Z4d0Z5d1Z6d2Z7e
j8d3d4Z9d5Z:d6Z;d7Z<d8Z=d9Z>d:Z?e"d;Z@eejdd<ZAed=ZBed>ZCd?ZDed@ZEedAZFedBZGedCZHe"dDZIdEZJdFZKdGZLedHZMdIZNdJZOdKZPe
jd
dLdMZQdNZRdS)PExceptionTestsc||||5	|d#|$r}t|}Yd}~nd}~wwxYw	|d#|$r}t|}Yd}~nd}~wwxYw|||||j|ddddS#1swxYwYdS)N)excexcnamespam)subTeststrassertEqualr)rr0r1errbuf1buf2s      rraise_catchzExceptionTests.raise_catch.s8
\\c7\
3
3
	4
	4
 c&kk!
 
 
 3xx
 
 c&kk!
 
 
 3xx
 T4(((S\7333
	4
	4
	4
	4
	4
	4
	4
	4
	4
	4
	4
	4
	4
	4
	4
	4
	4
	4sRB1%A>B1AB1AA0A+&B1+A004B11B58B5c

|td|tttd|t
dt
tdd}|t
tdd}tj	}		ddl
}|d	n#t
$rYnwxYw|t_	|ttn9#|t_	|ttwxYw|td
|ttdd|td|ttd
|t dg}|t |jd|t$di}|t$|jd|t&d|t(d|t*dt,}n#t*$rYnwxYw|t.dd}t1dD]}||z
}|t2d|t4d|t6dt9dn#t6$rYnwxYw|t:d|t<dt?ddd | d!n#t<$rYnwxYw|tBd"|tDd#|tDtj#d|tHd$gd%zn#tH$rYnwxYw|tJd&|tJtLd'|tNd(ddz}n#tN$rYnwxYw|tPd)ddz}n#tP$r
}Yd}~nd}~wwxYw|tRd*dS)+NAttributeErrorundefined_attributeEOFErrorwutf-8encodingrrrOSErrorzthis file does not existImportErrorundefined_module
IndexError
KeyErrorkeyKeyboardInterruptMemoryError	NameError
OverflowErrorRuntimeErrorRecursionErrorSyntaxErrorz/
IndentationErrorTabErrorz"try:
	1/0
    	1/0
finally:
 pass
z<string>execzTabError not raisedSystemError
SystemExit	TypeErrorr!
ValueErroriZeroDivisionErrorr*StopAsyncIteration)*r9r;assertRaisesgetattrsysr=openrclosestdinmarshalloadsr
rCrD
__import__rF__getitem__rHrJrKrLundefined_variablerMrangerPrQrRrUrSrTcompilefailrVrWexitrXrYchrrZr*r[)rfp	savestdinrbrdummyes       rtestRaisingzExceptionTests.testRaising;s)9:::.'38MNNN:...
&#
0
0
0




&#
0
0
0I			


c""""



"CIHHJJJ6NNNN"CIHHJJJ6NNNN),,,'4)CSIIIm444+z3EFFF\222*amR888:...(AM5999*,?@@@m444K000#QQ$$888
3ZZ		E
FAA~666)9:::m444
%[[[[   DD )+=>>>:...
@)))ii-....	
m444\222*ch222K000
"WWW$$\222*c6222*,?@@@1QQ &&&$$&K0001QQ###ttttt#+-ABBBBBs.CD

CD
CD

6EJ
J! J!)L99
MM?N&&
N32N3-P33
Q?QR  
R-,R-S
S% S%cFfd}d}||d|dddS)Nc<||5	t|dddnB#t$r5}|j|kr d|d|jYd}~nd}~wwxYwddddS#1swxYwYdS)N)srcmsg
<fragment>rU"failed to get expected SyntaxError	expected , got )r3rhrirRrt)rsrtrors   rckmsgz4ExceptionTests.testSyntaxErrorMessage.<locals>.ckmsgs#3//
D
DDCv666
IIBCCCC	#HHHu||			333"FGGGH
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
Ds9BAB
B+A<7B<BBBBzHif 1:
        try:
            continue
        except:
            passz'continue' not properly in loopz	continue
r!rryss`  rtestSyntaxErrorMessagez%ExceptionTests.testSyntaxErrorMessagesV	D	D	D	D	D
	a2333
l=>>>>>rc4tffd	}d}||dd}||dd}||dd}||dd}||dd	}||d
d}||d
d}||d
td}||dtdS)Nc	t|ddddS#|$r<}|j|kr&d|d|jYd}~dSYd}~dSd}~wwxYw)NrurUrvrwrx)rhrirt)rsrt	exceptionrors    rryz:ExceptionTests.testSyntaxErrorMissingParens.<locals>.ckmsgs
@\6222
		>?????	
D
D
D5C<<IIIsssAEEBCCCCCCCCC <<<<<
Ds+A,+A''A,zprint "old style"z@Missing parentheses in call to 'print'. Did you mean print(...)?zprint "old style",zprint f(a+b,c)zexec "old style"z>Missing parentheses in call to 'exec'. Did you mean exec(...)?z
exec f(a+b,c)zprint (a+b,c) $ 42zinvalid syntaxzexec (a+b,c) $ 42zif 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 indentation)rRrSrTrzs`  rtestSyntaxErrorMissingParensz+ExceptionTests.testSyntaxErrorMissingParenss&1	@	@	@	@	@	@
$
aSTTT$
aSTTT
aSTTT"
aQRRR
aQRRR

!
a!"""
a!"""
.
aLN^___K
aExPPPPPrNr?c||||5|t5}t|dddddn#1swxYwY||jj|||jj|| ||jj|| ||jj	||jj
it|ts|
|d}|d|dz
}|||jj
ddddS#1swxYwYdS)N)sourcelinenooffsetrurUreplace
rN)r3r\rRrhr5rrr
end_lineno
end_offsettext
isinstancer4decodesplitassertIn)	rrsrrrrrAcmlines	         rcheckzExceptionTests.checks
\\VF\
C
C	7	7"";//
32\6222
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3R\0&999R\0&999%  !8*EEE%  !8*EEE| ,!#s++:**Xy99Cyyvax0

dBL$5666	7	7	7	7	7	7	7	7	7	7	7	7	7	7	7	7	7	7s5E#AE#A	E#A	C<E##E'*E'c.|j}|ddddS)Nz"\
"(1 for c in I,\
\rrrs  r)test_error_offset_continuation_charactersz8ExceptionTests.test_error_offset_continuation_characterss$

*Aq11111rcx|j}|ddd|ddd|ddd|d	dd
|ddd
|ddd
d|ddd|ddd|ddd|ddd|ddd|ddd|ddd|ddd|ddd|ddd
|ddd|ddd |d!dddd"|d#dddd
|d$dd%dd|d&dd%dd|d'dd|d(dd|d)dd|d*dd|d+dd,|d-dd,|d.dd|d/dd%|d0dd|d1dd,|d2dd |d3dd%|d4dd%|d5dd%d6|d7dd8|d9dd|d:dd|d;dd|d<d=d>|d?dd@|dAdd@|dBddC|dDdd |dEdd@|dFdd|dGddH|dIdd|dJdd|dKdd|dLdd|dMdd|dNdd|dOdd|dPdd|dQdd|dRdd|dSdd|dTdd|dUdd|dVdd dS)WNzdef fact(x):
	return x!
rrGz1 +
rNz def spam():
  print(1)
 print(2)zPython = "Python" +uPython = "Ṕýţĥòñ" +s+# -*- coding: cp1251 -*-
Python = "ϳ" +cp1251r@sPython = "ϳ" +zx = "azlambda x: x = 2zf{a + b + c}zile for str(file) in []
]ua = « hello » « world »z[
file
for str(file)
in
[]
]zile for
 str(file) in []]zages = {'Alice'=22, 'Bob'=23}	z7match ...:
    case {**rest, "key": value}:
        ...z
[a b c d e f]zfor x yfff:zf(a for a in b, c)zf(a for a in b if a, c)zf(a, b for b in c)zf(a, b for b in c, d)zclass foo:return 1zdef f():
  continuezdef f():
  breakz4try:
  pass
except:
  pass
except ValueError:
  passztry:
  pass
except*:
  passz6try:
  pass
except*:
  pass
except* ValueError:
  passz(0x+1)zx = 0xIz0010 + 2z
x = 32e-+4zx = 0o9uα = 0xIsα = 0xIs## -*- coding: iso8859-7 -*-
 = 0xIz	iso8859-7sif 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('我')
rz7f'''
            {
            (123_a)
            }'''ztf'''
            {
            f"""
            {
            (123_a)
            }
            """
            }'''z4f"""


            {
            6
            0="""
z!x = [(yield i) for i in range(3)]zdef f():
  from _ import *zdef f(x, x):
  passz3{i for i in range(5) if (j := 0) for j in range(5)}&zdef f(x):
  nonlocal xzdef f(x):
  x = 1
  global xz
nonlocal xz def f():
  global x
  nonlocal xz#from __future__ import doesnt_existzfrom __future__ import bracesz#x=1
from __future__ import divisionzfoo(1=2)zdef f():
  x, y: intz[*x for x in xs]zfoo(x for x in range(10), 100)zfor 1 in []: passz
(yield i) = 2zdef f(*):
  passrrs  rtestSyntaxErrorOffsetz$ExceptionTests.testSyntaxErrorOffsets}

+Q333
gq!
2Ar:::
#Q+++
;QCCC
Lh	(	(	(	(
2Ar:::
h1
A&&&
na###
,a444
+Q222
11a888
,a333
-q!444
I1bQQQ
oq!$$$
mQ"""
"Aq!R000
'Aq"555
"Aq!R000
%q!Q333	"Ar***
$a+++
!1a(((
I1aPPP
.1555
KQPQRRR	h1
iA
j!Q
lAq!!!
iA
na###
A&&&
8!Q"	$	$	$	$
	B							8!Q???
fa
%q!,,,
CQKKK
								
				11a888
+Q333
$a,,,
CQKKK
'A...
.1555
lAq!!!
2Aq999	3Q:::
-q!444
4a;;;
j!Q
%q!,,,
 !Q'''
.1555
!1a(((
oq!$$$
!1a(((((rz)Downcasting to int is safe for col_offsetcpurF)memusedry_runcd|dfz}|td5t|ddddddS#1swxYwYdS)Nsif True:
%*sspasszParser column offset overflowrurU)assertRaisesRegexrMrh)rsizerss   rtestMemoryErrorBigSourcez'ExceptionTests.testMemoryErrorBigSourceGs$0

#
#M3R
S
S	/	/Cv...	/	/	/	/	/	/	/	/	/	/	/	/	/	/	/	/	/	/sAA	AcGddtGddfd}fd}fd}tjds |||dSdS)	NceZdZdZdS)9ExceptionTests.testSettingException.<locals>.BadExceptionc td)Nzcan't instantiate BadException)rP)self_s rrzBExceptionTests.testSettingException.<locals>.BadException.__init__Us"#CDDDrNrr!rrBadExceptionrTs(
E
E
E
E
ErrceZdZdS)=ExceptionTests.testSettingException.<locals>.InvalidExceptionNrrr r!rrInvalidExceptionrXDrrcnddl}	|dddS#t$rv}t	j\}}}|jj}|j	d
|jdYd}~dSd}~wwxYw)NrrNExpected exception
test_capi1test_exceptions.py)
	_testcapiraise_exceptionrirXr^exc_infotb_framef_coder5co_name
assertTrueco_filenameendswith)rr6r0tbcorrs     rrz7ExceptionTests.testSettingException.<locals>.test_capi1[s
0)),:::		./////

O
O
O"|~~S"['  \::: 7 78L M MNNNNNNNNN	
Os4
B4A+B//B4cddl}	|dddS#t$r}t	j\}}}|jj}|j	d
|jd|jj
j}|j	dYd}~dSd}~wwxYw)Nrrrr
test_capi2)rrrirPr^rrrr5rrrrf_back)rr6r0rrco2rrs      rrz7ExceptionTests.testSettingException.<locals>.test_capi2gs

0)),:::		.///// 
<
<
<"|~~S"['  Z888 7 78L M MNNNk(/  l;;;;;;;;;

<s4
C BCC cTddl}t|jddS)NrrN)rr\rVr)rrrs r
test_capi3z7ExceptionTests.testSettingException.<locals>.test_capi3us=k9+D.
3
3
3
3
3rjava)r*r^platform
startswith)rrrrrrs`   @@rtestSettingExceptionz#ExceptionTests.testSettingExceptionOs
	E	E	E	E	E9	E	E	E								
	0
	0
	0
	0
	0
	0	0	0	0	0	0	0	3	3	3	3	3	3
|&&v..	JLLLJLLLJLLLLL		rc,	t|tt|t	tdd|t	tdddtddd}||jd||jd|t	|dtd	ddd
}||jd||jd
||jd||jd||j	d|t	|dtd	ddd}||jd
||jd||jd||jd||j	d|t	|dtdd}||jd||jd||jd||jd||j	ddS#t$rYdSwxYw)Ni1001messagez[Errno 1001] messagerfoobarz[Errno 9] foo: 'bar'rrrz[WinError 3] foo: 'bar'z[WinError 1001] foo)WindowsErrorassertIsrCr5r4errnowinerrorstrerrorfilename	filename2rL)rr>s  rtest_WindowsErrorz ExceptionTests.test_WindowsErrors$	0L
MM,000S//888Sy!9!9::3
5
5
55%((AQWa(((QZ...SVV%;<<<5%++AQWa(((QZ+++QZ///QZ///Q[$///SVV%>???5$--AQWb)))QZ...QZ///QZ...Q[$///SVV%:;;;u%%AQWe,,,QZ...QZ///QZ...Q[$/////E			DD	sL
LLwin32ztest specific to Windowsc	td}d}|td|z5|j|ddddS#1swxYwYdS)Nctypeslcs@zWindows Error 0x%x)rrrC	pythonapiPyErr_SetFromWindowsErr)rrcodes   rtest_windows_messagez#ExceptionTests.test_windows_messages	Ix((

#
#G-AD-H
I
I	;	;44T:::	;	;	;	;	;	;	;	;	;	;	;	;	;	;	;	;	;	;sAA Ac^tdddiftdddiftdddiftdddiftddddftdddddddftd	d	dddd
dftdd	dddd
dftd
d	dddftddddddftdddddddftdddddddddftddddddddddftddd ddddd!d"d#d$	ftd%dd%dddddddd&	ftdddift
d'd'd(d)d*d+d,ftd(td-d*dd+fd(td-d*dd+fd(d-d*d+d,ftd.d.d(d-d*d+d,ftd/d/d0d1d*dd2ftdddd3ftdddd3fg}	|tdddddddd4fn#t$rYnwxYw|D]\}}}	||}t|jd5s(|t|jd6t'|}|D]Z}t)||}|t+|t+|||d7|d8|d9||[t,fD]}	t/|	jdzD]}
|	||
}|	|}|D]Q}t+t)||}t+||}
|||
d:|d;|Rn#t7d<|d=|t8j>YxYwdS)?Nr!args)rN)r)rrNr)rr)rrrrr)rrr)rrbazr)rrrNquuxr)rrr)errnoStrstrErrorStrfilenameStr)rrrrr)rrrr)rNrr)rNrrN)rrrrr)rtrrrrrprint_file_and_line)msgStrr)rrrrtrrrr)r)r	linenoStr	offsetStrtextStrendLinenoStrendOffsetStrrrrrr)	rrrrrtrrrr)rrrrrrrprint_file_and_lineStr)	rrrrtrrrrr)asciiarrNordinal not in rangerrrr)rrAobjectstartreason)rrrrNr)あrrNouchrr)rrrrend)rr)rrrrrrrbuiltins.z == z, expected z	pickled "z", attribute "z
exc=z, args=)file)
BaseExceptionrWrCrRUnicodeErrorUnicodeEncodeErrorUnicodeDecodeError	bytearrayUnicodeTranslateErrorrr#appendrrLtyperrr5rr4r]reprpicklergHIGHEST_PROTOCOLdumpsrcprintr^stderr)r
exceptionListr0rexpectedror{checkArgNamevaluepprotocolnewgotwants              rtestAttributeszExceptionTests.testAttributesstB"
.
EFT?3
H(#
%
J*%
'
"U33
5
h"Td44
5n("$ u66
7+(#4 u66
79(u6RR
T
@5+z+--
.7,++4AA
B"td!dt"DBB
C+%)-x"t#%%
&
G')G*.x+-^
MM
N55*.x"t#4
99	
:2~.
":C%#)?AA
B '9W+=+=q!"8":"Ig$6$61+AC%')?AA
B ":C%')?AA
B#$<2$a))
*X!..
0
"H!..
0eT

j
	  @0"/d "/tEEF



			D	$1	@	@Cx
@CJAww'001ABBE$$T!WW%7DDDFF$,EEL#A|44E$$T%[[%)(<*@%A%A%&QQ%*UUH\,B,B&DEEEE!	@	@A$)!*<q*@$A$A@@GGAx00ggajj,4@@L"&wsL'A'A"B"BC#'(>#?#?D ,,S$$./aa.?@@@@@@	@%
JSSS$$7cjIIIIII		@	@s$F
FFL#L*cJtdtdtdfD]}||5|t|d|d||jdg|	t5|ddddn#1swxYwY||jdg|d||jddg|`|t|d|d	||jd	gd|_||jd|	t5|d
dddn#1swxYwY||jddddn#1swxYwYdS)NrNrrro	__notes__zMy Note*z	Your NotezOur Notez
will not work)rr*rYr3assertFalsehasattradd_noter5r r\rXrros  r
test_noteszExceptionTests.test_notes4s""IaLL*Q--@	2	2A""
2
2  K!8!8999

9%%%  yk:::&&y11##JJrNNN###############  yk:::

;'''  y+.FGGGK  K!8!8999

:&&&  zl;;;   b111&&y1100JJ///000000000000000  b111/
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2	2	2s\A/H5CHCHCC#HG$H$G((H+G(,HH	H	c	td#tjd}YnxYwt|}||t||j|td|}||t||j|Gddt}||}|||||j|dS)NrrrceZdZdS)5ExceptionTests.testWithTraceback.<locals>.MyExceptionNrr!rrMyExceptionr)]rrr*)	rFr^rrwith_tracebackassertIsInstancer5
__traceback__r*)rrror*s    rtestWithTracebackz ExceptionTests.testWithTracebackOs5	#Q--	#"BBBOO**2..a///"---qMM((,,a,,,"---					)			
KMM((,,a---"-----.c	dt_|ddS#t$r.}|dt|Yd}~dSd}~wwxYw)NrNo exception raisedz!__traceback__ must be a traceback)r*r-rirXrr4r%s  rtestInvalidTracebackz#ExceptionTests.testInvalidTracebackds	-()IKK%
II+,,,,,	G	G	GMM=s1vvFFFFFFFFF	Gs,
A$#AA$cz|tttdd|tttd|tttdd|tttddS)N	__cause__rN__context__)r\rXsetattrr*delattrr+s rtestInvalidAttrszExceptionTests.testInvalidAttrsls)Wikk;JJJ)Wikk;GGG)Wikk=!LLL)Wikk=IIIIIrc	td#tjd}YnxYwt}||_d|_||jddS)Nrr)rFr^rr*r-r5)rrros   rtestNoneClearsTracebackAttrz*ExceptionTests.testNoneClearsTracebackAttrrse	#Q--	#"BBBKK$/////r/ct}||j||jt	}||j||jGddt
}|}||j||jdS)NceZdZdS)5ExceptionTests.testChainingAttrs.<locals>.MyExceptionNrr!rrr*r=rrr*)r*assertIsNoner5r4rXrC)rror*s   rtestChainingAttrsz ExceptionTests.testChainingAttrs}sKK!-(((!+&&&KK!-(((!+&&&					'			
KMM!-(((!+&&&&&rc	t#t$r}|}Yd}~nd}~wwxYw||j||j||jt
|_d|_||jt||j||jd|_||jdS)NF)	r*r>r5r4r"__suppress_context__rLr,r)rr0ros   rtestChainingDescriptorsz&ExceptionTests.testChainingDescriptorss	++			AAAAAA		
!-(((!+&&&/000!
amY777!+&&&.///!&/00000s
&!&c|ttdGddt}|d}||jddS)NrN)rceZdZdZdS)8ExceptionTests.testKeywordArgs.<locals>.DerivedExceptioncHt|||_dSr)rr	fancy_arg)rrGs  rrzAExceptionTests.testKeywordArgs.<locals>.DerivedException.__init__s!&&t,,,!*rNrr!rrDerivedExceptionrEs#
+
+
+
+
+rrHr!)rG)r\rXrr5rG)rrHrs   rtestKeywordArgszExceptionTests.testKeywordArgss|	
)]a888	+	+	+	+	+}	+	+	+

r***b)))))rcfd|tfd|tdS)NcSrr!)fsrrLz/ExceptionTests.testInfiniteRecursion.<locals>.fs133Jrc<	S#t$rYdSwxYw)NrrYgsrrPz/ExceptionTests.testInfiniteRecursion.<locals>.gs5
qss



rr
s	

)r\rQ)rrLrPs @@rtestInfiniteRecursionz$ExceptionTests.testInfiniteRecursionsj					.!,,,					
	
.!,,,,,rc|tt|ttd|ttdddS)Nrb)rr4r*r+s rtest_strzExceptionTests.test_strsdI'''IcNN++,,,Ic3//0011111rc6	t#t$r%}||tYd}~nd}~wwxYw|dt|t
5|ddddS#1swxYwYdSNror*r,assertNotInlocalsr\UnboundLocalErrorr%s  rtest_exception_cleanup_namesz+ExceptionTests.test_exception_cleanup_namess	0++	0	0	0!!!Y////////	0fhh'''


0
1
1		
A																		s"
?:?>BBBc8	t#t$r&}||t~Yd}~nd}~wwxYw|dt|t
5|ddddS#1swxYwYdSrVrWr%s  rtest_exception_cleanup_names2z,ExceptionTests.test_exception_cleanup_names2s	++			!!!Y///		
fhh'''


0
1
1		
A																		s$
A;A?BBBcGddtGdd}fd}|tj}	|n#$r
}Yd}~nd}~wwxYwdt|||tj}	|n#$rYnwxYwdt|||tj}	|n#YnxYwdt|||tj}dD]}	|#YnxYwdt|||tj}		|n#t
xYwnk#t
$r^}d|_dt|tdrt|Yd}~nd}~wwxYw|tj}	|n#$r		#xYw#$rYnwxYwYnwxYwdtdrt||Gd	d
}|tj}|5|dddn#1swxYwYdtdrt||dS)NceZdZdZdS)=ExceptionTests.testExceptionCleanupState.<locals>.MyExceptionc||_dSrobjrrcs  rrzFExceptionTests.testExceptionCleanupState.<locals>.MyException.__init__
rNrr!rrr*r`#




rr*ceZdZdS)7ExceptionTests.testExceptionCleanupState.<locals>.MyObjNrr!rrMyObjrhrrric}rr!)	local_refr*rcs rinner_raising_funczDExceptionTests.testExceptionCleanupState.<locals>.inner_raising_funcsI+c"""r)rF)cpythonceZdZdZdZdS)9ExceptionTests.testExceptionCleanupState.<locals>.Contextc|Srr!r+s r	__enter__zCExceptionTests.testExceptionCleanupState.<locals>.Context.__enter__@rcdS)NTr!)rexc_type	exc_valueexc_tbs    r__exit__zBExceptionTests.testExceptionCleanupState.<locals>.Context.__exit__BstrNrrr rqrwr!rrContextro?s2







rry)r*weakrefrefrr>rHr5r)	rrirlwrroiryr*rcs	       @@rtestExceptionCleanupStatez(ExceptionTests.testExceptionCleanupStates					)												#	#	#	#	#	#egg
[

	    			DDDD	bdd#egg
[

	    			D	bdd#egg
[

	    	Dbdd#egg
[

		A
""$$$$
bdd#egg
[

	#
""$$$$
%	#	#	#
!AMCLLL"$$C ///
c""""""""	#egg
[

		    			
EEE



	U+++	LLLbdd#								
egg
[


WYY	!	!   	!	!	!	!	!	!	!	!	!	!	!	!	!	!	!U+++	LLLbdd#s
AA"A"3
B>>CC
D""D&;
FF
G('G5(	G11G55
I?AII?
J

J%JJJJJ%JJ%$J%L33L7:L7cffd}	tdS#t$r|YddSdwwxYw)NcdSrr!rsrprint_errorzIExceptionTests.test_exception_target_in_nested_scope.<locals>.print_errorQs
AAAr)	somethingr*)rrros  @r%test_exception_target_in_nested_scopez4ExceptionTests.test_exception_target_in_nested_scopeNs`						III			KMMMMMMMMM	s
0
+0c,d}|}|t|t|tjdd|t|t|tjdd|t|d	td#t
$r|}|t|t|tjdt
|t|t|tjdt
|t|t
~|tjdt
YdSwxYw)Nc3K	td#t$r9tjdVtjdVYnwxYwtjdVdS)Ncaughtr)rHr^rr!rryield_raisez:ExceptionTests.test_generator_leaking.<locals>.yield_raise\s
(x(((
(
(
(lnnQ''''lnnQ''''''
(,..######sAAArr)r5nextrHr^rrX)rrrPs   rtest_generator_leakingz%ExceptionTests.test_generator_leakingYs	$	$	$
KMMa(+++*D111a(+++*D111a$'''
	;E"""	;	;	;

AT!WWh///S\^^A.	:::T!WWh///S\^^A.	:::T!WWi000S\^^A.	::::::	;sC++D$HHcd}	t#t$r|}t|YnwxYw	t|n#t$rYnwxYw|t	jddS)Nc3KdVdSrr!r!rrrPz1ExceptionTests.test_generator_leaking2.<locals>.gysEEEEErNNN)rPr
StopIterationr5r^rrrPits   rtest_generator_leaking2z&ExceptionTests.test_generator_leaking2ws							BHHHHH		HHHH			D	);<<<<<s#22A
AAcd}|}t|	ddzn#t$r}|tjd|||}|tjd||||Yd}~nd}~wwxYw|tjddS)Nc3lK	dVdS#t$rtjdVYdSwxYwNrNrZr^rr!rrrPz1ExceptionTests.test_generator_leaking3.<locals>.gsS
($
(
(
(lnnQ'''''''
(s
%33rNrr)rrZrr^rthrowr5)rrPrrogen_excs     rtest_generator_leaking3z&ExceptionTests.test_generator_leaking3s	(	(	(
QSSR	&
aCCC 	&	&	&MM#,..+Q///hhqkkGMM#,..+Q///MM'1%%%%%%%%		&
	
);<<<<<s$
B=BB88B=cd}|}	t#t$rt|}YnwxYw||t	t|nD#t$r7}|t	jd|Yd}~nd}~wwxYw|t	jddS)Nc3jK	ddzdS#t$rtjdVwxYwNrNrrr!rrrPz1ExceptionTests.test_generator_leaking4.<locals>.gsM
!$


lnnQ''''
s'2rNr)rXrrrZr^rr5)rrPrtpros     rtest_generator_leaking4z&ExceptionTests.test_generator_leaking4s			QSS	O			bBBB		


b+,,,	0HHHH!	0	0	0MM#,..+Q////////	0	
);<<<<<s$22A!!
B"+-BB"cfd}|}	t#t$rt|YnwxYwtt|dS)Nc3KtjdtdVtjddS)NrNr)r,r^rrPr5r+srrPz>ExceptionTests.test_generator_doesnt_retain_old_exc.<locals>.gsT!!#,.."3\BBBEEES\^^-?@@@@@r)rPrr\rrs`  r$test_generator_doesnt_retain_old_excz3ExceptionTests.test_generator_doesnt_retain_old_excs	A	A	A	A	AQSS				HHHHH	-r22222s55cdfd}|t|tjddS)Nc3KdVdSrr!r!rr
simple_genzIExceptionTests.test_generator_finalizing_and_exc_info.<locals>.simple_gensGGGGGrcf}	t#t$rt|cYSwxYwr)rPr)genrs rrun_genzFExceptionTests.test_generator_finalizing_and_exc_info.<locals>.run_gensF*,,C
!""
!
!
!Cyy   
!s00r)rr5r^r)rrrs  @r&test_generator_finalizing_and_exc_infoz5ExceptionTests.test_generator_finalizing_and_exc_infosd				!	!	!	!	!				);<<<<<rc<GddtGdd}fd}|tj}|}t|||dx}t	||dS)NceZdZdZdS)FExceptionTests._check_generator_cleanup_exc_state.<locals>.MyExceptionc||_dSrrbrds  rrzOExceptionTests._check_generator_cleanup_exc_state.<locals>.MyException.__init__rerNrr!rrr*rrfrr*ceZdZdS)@ExceptionTests._check_generator_cleanup_exc_state.<locals>.MyObjNrr!rrrirrrric3@K	#$rdVYdSwxYwrr!)r*rcsrraising_genzFExceptionTests._check_generator_cleanup_exc_state.<locals>.raising_gensF
!k#&&&



s	)r*rzr{rrr>)rtestfuncrirr|rPr*rcs      @@r"_check_generator_cleanup_exc_statez1ExceptionTests._check_generator_cleanup_exc_states					)																	egg
[

KMMQCbdd#rc6d}||dS)Ncl	|tdS#t$rYdSwxYwr)rrPrOs rdo_throwzGExceptionTests.test_generator_throw_cleanup_exc_state.<locals>.do_throwsE
'''''



s!%
33r)rrs  r&test_generator_throw_cleanup_exc_statez5ExceptionTests.test_generator_throw_cleanup_exc_states-			
	
//99999rc6d}||dS)Nc.|dSr)r`rOs rdo_closezGExceptionTests.test_generator_close_cleanup_exc_state.<locals>.do_closes
GGIIIIIrr)rrs  r&test_generator_close_cleanup_exc_statez5ExceptionTests.test_generator_close_cleanup_exc_states+			//99999rc6d}||dS)Nc
d}dSrr!rOs rdo_delzCExceptionTests.test_generator_del_cleanup_exc_state.<locals>.do_delsAAArr)rrs  r$test_generator_del_cleanup_exc_statez3ExceptionTests.test_generator_del_cleanup_exc_states+			//77777rc<fd}|dS)Nct	t|ddS#t$rYdSwxYwNz should have raised StopIteration)rrirrPrs rdo_nextzEExceptionTests.test_generator_next_cleanup_exc_state.<locals>.do_nextsR
>Q		<=====!



s)
77r)rrs` r%test_generator_next_cleanup_exc_statez4ExceptionTests.test_generator_next_cleanup_exc_state8	>	>	>	>	>	
//88888rc<fd}|dS)Nc	|dddS#t$rYdSwxYwr)sendrirrs rdo_sendzEExceptionTests.test_generator_send_cleanup_exc_state.<locals>.do_sendsV
>t		<=====!



s/
==r)rrs` r%test_generator_send_cleanup_exc_statez4ExceptionTests.test_generator_send_cleanup_exc_staterrcGfdd}d	t|#YnxYwt|ddS)NceZdZfdZdS)*ExceptionTests.test_3114.<locals>.MyObjectc.tjdSr)r^rr%s r__del__z2ExceptionTests.test_3114.<locals>.MyObject.__del__sLNNrNrrr rrsrMyObjectrs.
#
#
#
#
#
#
#rrr!r)r*rr5)rrros  @r	test_3114zExceptionTests.test_3114
s	#	#	#	#	#	#	#	#	#	#
	HHJJ'''	D./////s+/cGddt}Gddt}Gddt}		|#|$r}|}	|#|$r}|}	|#|$r}|}	||||||||	|||j||j|||	j||d}~wwxYwd}~wwxYwd}~wwxYw#|$r}
|
}Yd}
~
nd}
~
wwxYw|||||j|	||	j|||jdS)NceZdZdS)HExceptionTests.test_raise_does_not_create_context_chain_cycle.<locals>.ANrr!rrArrrrceZdZdS)HExceptionTests.test_raise_does_not_create_context_chain_cycle.<locals>.BNrr!rrBrrrrceZdZdS)HExceptionTests.test_raise_does_not_create_context_chain_cycle.<locals>.CNrr!rrCr!rrr)r*r,r>r5r)rrrra_rb_rSc_cror0s            r.test_raise_does_not_create_context_chain_cyclez=ExceptionTests.test_raise_does_not_create_context_chain_cycles&																												
 
 
 
  G   A
    --a333--a333--a333))!-888

amQ777

amQ777 	 	
 "			CCCCCC		


c1

amQ'''

amQ'''!-(((((sj>DC=AC:
C5AC2BC--C22C55C::C==DDD
DDcd}	|n#t$r}|}Yd}~nd}~wwxYw||t||jt||jj|jdS)Ncr	td#t$r}||_tdd}~wwxYwNrNr)rYr5rXexs rcyclezBExceptionTests.test_no_hang_on_context_chain_cycle1.<locals>.cycleGsE
# mm#
#
#
#!#ll"
#s
616)r*r,rXr5rYr)rrror0s    r$test_no_hang_on_context_chain_cycle1z3ExceptionTests.test_no_hang_on_context_chain_cycle1Ds	#	#	#	EGGGG			CCCCCC		
c9---coz:::

co13?CCCCCs

&!&zSee issue 44895c@Gddt}Gddt}Gddt}||5}	|#|$rD}|}	|#|$r*}|}	|#|$r}	|	}
|
|_|
d}	~	wwxYwd}~wwxYwd}~wwxYw#1swxYwY||j|
||
j|||j|||j|
dS)NceZdZdS)>ExceptionTests.test_no_hang_on_context_chain_cycle2.<locals>.ANrr!rrrr[rrrceZdZdS)>ExceptionTests.test_no_hang_on_context_chain_cycle2.<locals>.BNrr!rrrr]rrrceZdZdS)>ExceptionTests.test_no_hang_on_context_chain_cycle2.<locals>.CNrr!rrrr_rrrr*r\r5rr)rrrrr_ar_brS_crs           r$test_no_hang_on_context_chain_cycle2z3ExceptionTests.test_no_hang_on_context_chain_cycle2Ws																											

q
!
!	 R

 acc	
 
 
 	 !##I   A acc	   ()
 	 	
 	 	 	 	 	 	 	 	  	


blA&&&

amQ'''

amQ'''

amQ'''''slB'
AB$ B#
A--B2B5
A??B	B	B	BBBB$$B''B+.B+c@Gddt}Gddt}Gddt}Gddt}Gd	d
t}||5}	|#|$rh}|}	|#|$rN}	|	}
	|#|$r4}|}||_	|#|$r}
|
}|}|d}
~
wwxYwd}~wwxYwd}	~	wwxYwd}~wwxYw#1swxYwY||j|||j|||j|||j|
||
j|||j|dS)NceZdZdS)>ExceptionTests.test_no_hang_on_context_chain_cycle3.<locals>.ANrr!rrrrrrrceZdZdS)>ExceptionTests.test_no_hang_on_context_chain_cycle3.<locals>.BNrr!rrrrrrrceZdZdS)>ExceptionTests.test_no_hang_on_context_chain_cycle3.<locals>.CNrr!rrrrrrrceZdZdS)>ExceptionTests.test_no_hang_on_context_chain_cycle3.<locals>.DNrr!rrDrrrrceZdZdS)>ExceptionTests.test_no_hang_on_context_chain_cycle3.<locals>.ENrr!rrErrrrr)rrrrrrrrrrrSrr_ddros                r$test_no_hang_on_context_chain_cycle3z3ExceptionTests.test_no_hang_on_context_chain_cycle3|s																																													

q
!
!	$R
$acc	
$
$
$$!##I$$$A
$acc	$$$()
$"#!##I $$$ "A !A"#G$$	$	
$	$	$	$	$	$	$	$	$*	


blA&&&

amQ'''

amQ'''

amQ'''

amQ'''

amQ'''''s5C17
BC.C)	
BC&C!
B%%C	*	C	4
B>>CCCC	C	C!!C&&C))C..C11C58C5c		td}|#td}|xYw#t$r}|}Yd}~nd}~wwxYw|||||j|dSr)rXrYr*rr5)rteveror0s     r,test_context_of_exception_in_try_and_finallyz;ExceptionTests.test_context_of_exception_in_try_and_finallys	
q\\]]			CCCCCC		


c2

cor*****s&)
?:?cV		td}|#td}|xYw#td}|xYw#t$r}|}Yd}~nd}~wwxYw|||||j|||jj|dS)NrNrr)rXrYrCr*rr5)rrroeror0s      r/test_context_of_exception_in_except_and_finallyz>ExceptionTests.test_context_of_exception_in_except_and_finallys	
q\\
]]QZZ			CCCCCC		


c2

cor***

co1266666s%'*<?
A	AAc			td}|#YnxYw	td}|#td}|xYw#t$r}|}Yd}~nd}~wwxYw|||||j|dSr)rYrCr*rr5)rrr	ror0s     r-test_context_of_exception_in_else_and_finallyz<ExceptionTests.test_context_of_exception_in_else_and_finallys		
 ]]	

QZZQZZ			CCCCCC		


c2

cor*****s...AAA
A
AActddddd}|t|dd|_|t|dd|_d	|_|t|d
d|_|t|dd
|_|t|dtddddd}|t|dd|_|t|dd|_d	|_|t|dd|_|t|dd
|_|t|dtdddd}|t|dd|_|t|dd|_d	|_|t|dd
|_|t|ddS)NrxxxxxrNrrz8'baz' codec can't encode characters in position 1-4: foorz<'baz' codec can't encode character '\x78' in position 1: foolESh
MQ)EzJ'baz' codec can't encode characters in position 1-4: 965230951443685724997izK'4000' codec can't encode characters in position 1-4: 965230951443685724997izN'4000' codec can't encode characters in position 1000-4: 965230951443685724997sxxxxxz3'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: 965230951443685724997xxxxz/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: 965230951443685724997)	rr5r4rrrArr	r)rus  rtest_unicode_change_attributesz-ExceptionTests.test_unicode_change_attributess?
ugq!U;;Q![\\\Q!`aaa'Q!mnnn
Q!noooQ!qrrruh1e<<Q!VWWWQ!XYYY'Q!hiii
Q!ijjjQ!lmmm!&!Q66Q!RSSSQ!WXXX'Q!deeeQ!ghhhhhrctttf}|D]8}|t	||d9dS)N)rr	rr5r4__new__)rklassesklasss   rtest_unicode_errors_no_objectz,ExceptionTests.test_unicode_errors_no_objectsV$&8:OO	<	<ESu!5!566;;;;	<	<rcGddt}Gddt|}t5}	t#|$r}|dYd}~n*d}~wt$rYn|dYnxYwdddn#1swxYwYfd\}}}||tt||d	t|dS)
NceZdZdZdS)/ExceptionTests.test_badisinstance.<locals>.MetactrrN)clssubclasss  r__subclasscheck__zAExceptionTests.test_badisinstance.<locals>.Meta.__subclasscheck__
s ll"rN)rrr rr!rrMetars#
#
#
#
#
#rrceZdZdS)6ExceptionTests.test_badisinstance.<locals>.MyExceptionNrr!rrr*r!rrr*)	metaclasszShould have raised KeyErrorz%exception should not be a MyExceptionc`	S#t$rtjcYSwxYwr)rQr^rrOsrrPz,ExceptionTests.test_badisinstance.<locals>.gs@
&qss
!
&
&
&|~~%%%
&s	
--z maximum recursion depth exceeded)	r
r*rrHrir,rQrr4)rrr*rrovrrPs       @rtest_badisinstancez!ExceptionTests.test_badisinstances	#	#	#	#	#4	#	#	#					)t				


	9&	
9jj 
C
C
C		ABBBBBBBB



9		788888
	9
	9
	9
	9
	9
	9
	9
	9
	9
	9
	9
	9
	9
	9
	9	&	&	&	&	&
1331baa999

8#a&&AAAAAs@BAB
A'"B'
B4B6BBB!$B!cFd}|tjdS)NcTt}tdD]	}|j}
dS)Ni@B)rrg__dir__)ors  rrz3ExceptionTests.test_trashcan_recursion.<locals>.foo-s7A9%%

I

r)rr)rrs  rtest_trashcan_recursionz&ExceptionTests.test_trashcan_recursion(s3
				rcdtz}tjdd|\}}}||d|d||d||d|dS)Naif 1:
            import sys
            from _testinternalcapi import get_recursion_depth

            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()
            depth = get_recursion_depth()
            try:
                # Upon the last recursive invocation of recurse(),
                # tstate->recursion_depth is equal to (recursion_limit - 1)
                # and is equal to recursion_limit when _gen_throw() calls
                # PyErr_NormalizeException().
                recurse(setrecursionlimit(depth + 2) - depth)
            finally:
                sys.setrecursionlimit(recursionlimit)
                print('Done.')
        -Wd-crNsRecursionErrorsResourceWarningDone.)__file__r	assert_python_failurer5rrrrcoutr6s     r$test_recursion_normalizing_exceptionz3ExceptionTests.test_recursion_normalizing_exception7s(PQ(R%:5$MMCQ

'---

(#...

h$$$$$rcd}tjd|\}}}||d|d||d|dS)Nzif 1:
            import _testcapi
            try:
                raise _testcapi.RecursingInfinitelyError
            finally:
                print('Done.')
        r-rNsORecursionError: maximum recursion depth exceeded while normalizing an exceptionr.)r	r0r5rr1s     r-test_recursion_normalizing_infinite_exceptionz<ExceptionTests.test_recursion_normalizing_infinite_exceptionrsq
%:4FFCQ

89<	>	>	>

h$$$$$rcd}fdfdfdtj}	|dfD]a}||5	||dn#t$rYnwxYwdddn#1swxYwYb	tj|dS#tj|wxYw)Ncd}		tj|n#t$r|dz
}YnwxYw,tj||zdSr)r^setrecursionlimitrQ)ndepths  rset_relative_recursion_limitzUExceptionTests.test_recursion_in_except_handler.<locals>.set_relative_recursion_limitssE
)%000&QJEEE

!%'*****s,,c8	ddzdS#YdSxYwrr!)recurse_in_exceptsrr>zJExceptionTests.test_recursion_in_except_handler.<locals>.recurse_in_excepts6
$!
$!!######s
c8	ddzn#YnxYwdSrr!)recurse_after_exceptsrr@zMExceptionTests.test_recursion_in_except_handler.<locals>.recurse_after_excepts6
!
  """""s	
cB	dS#YdSxYwrr!)recurse_in_body_and_exceptsrrBzSExceptionTests.test_recursion_in_except_handler.<locals>.recurse_in_body_and_excepts>
-**,,,,,
-**,,,,,,s
rG)funcz#Should have raised a RecursionError)r^getrecursionlimitr3rirQr9)rr<recursionlimitrCr@rBr>s    @@@r test_recursion_in_except_handlerz/ExceptionTests.test_recursion_in_except_handlers		+		+		+	$	$	$	$	$	#	#	#	#	#	-	-	-	-	-.00	2((,,,*,@B\]
I
I\\t\,,III		"GHHHH*IIIIIIIIIIIIIII
I
!.11111C!.1111sS(B3B
A4B4
B>BBBB3B	B3B	B33C	cd}t5tjd|\}}}|d|ddddS#1swxYwYdS)Na+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-MemoryError)r
r	r0rr1s     r)test_recursion_normalizing_with_no_memoryz8ExceptionTests.test_recursion_normalizing_with_no_memorys!
"
"	/	/(>tTJJLBSMM.#...	/	/	/	/	/	/	/	/	/	/	/	/	/	/	/	/	/	/s0AAAcddlddlmfd}|}|}||dS)Nrraise_memoryerrorc	dn#t$r}|j}Yd}~nd}~wwxYw|S)Nz Should have raised a MemoryError)rirKr-	format_tb)rorrLr	tracebacks  r
raiseMemErrorz6ExceptionTests.test_MemoryError.<locals>.raiseMemErrorsw
>!!###		<====
%
%
%_
%&&r***s
#
>9>)rOrrLr5)rrPtb1tb2rLrOs`   @@rtest_MemoryErrorzExceptionTests.test_MemoryErrors|	//////	+	+	+	+	+	+	+moomooc"""""rc,ddl}d}d}|t|jd|d}|t|t
|t|t|	|j
|d|}||j
||d|}|t||Gd	d
t}|d|||f}|t|||t||||j
||dd
|ddi}	|t|	|||	j
d||	j
d
dS)NrzThis is a test docstring.zThis is another test docstring.error1z_testcapi.error1z_testcapi.error2z_testcapi.error3)baseceZdZdS)1ExceptionTests.test_exception_with_doc.<locals>.CNrr!rrrrXrrrz_testcapi.error4z_testcapi.error5rrrN)rr\rVmake_exception_with_docrr
r
issubclassr*r>__doc__r5rr)
rrdoc2doc4rUerror2error3rerror4error5s
          rtest_exception_with_docz&ExceptionTests.test_exception_with_docs"*0+y'H"	$	$	$223EFF

d6llD)))
6955666&.)))223EtLL...223E8>3@@
6622333								223Et4:A;@@
6622333
61--......223Er39C8EE
66223331%%%,,,,,rcHddlmGdddfd}	||dn5#t$r(}|dYd}~nd}~wwxYwt|ddS)NrrKceZdZdS)3ExceptionTests.test_memory_error_cleanup.<locals>.CNrr!rrrre
rrrcX}tj|dSrrzr{)rrrLr|s rinnerz7ExceptionTests.test_memory_error_cleanup.<locals>.inner
s0AQBrzMemoryError not raised)rrLrirKassertNotEqualrr5)rrhrorrLr|s   @@@rtest_memory_error_cleanupz(ExceptionTests.test_memory_error_cleanups
	0/////								
	 	 	 	 	 	 	 	0EGGG
II.////	,	,	,d++++++++	,	t$$$$$s
A
A3A..A3c<Gdddfd	|dn5#t$r(}|dYd}~nd}~wwxYwt|ddS)NceZdZdS)6ExceptionTests.test_recursion_error_cleanup.<locals>.CNrr!rrrrmrrrcX}tj|dSrrg)rrrhr|s rrhz:ExceptionTests.test_recursion_error_cleanup.<locals>.inner"s*AQBEGGGGGrzRecursionError not raised)rirQrirr5)rrorrhr|s  @@@rtest_recursion_error_cleanupz+ExceptionTests.test_recursion_error_cleanups								
								3EGGG
II12222	,	,	,d++++++++	,	t$$$$$s
;
A-A((A-c|t5}tjtdddn#1swxYwY||jjtj|jdSr)	r\rCoslistdirr/r5rrENOTDIR)rrs  rtest_errno_ENOTDIRz!ExceptionTests.test_errno_ENOTDIR1s


w
'
'	!2Jx   	!	!	!	!	!	!	!	!	!	!	!	!	!	!	!+U]BLIIIIIsAAAc2Gdd}|}tj5}~t||jj|j||jjddddS#1swxYwYdS)NceZdZdZdS)1ExceptionTests.test_unraisable.<locals>.BrokenDelc$td}|)Nz
del is brokenrNrr0s  rrz9ExceptionTests.test_unraisable.<locals>.BrokenDel.__del__:s 11	rNrr!rr	BrokenDelrw9s#




rrz)	rcatch_unraisable_exceptionrr5
unraisablerrassertIsNotNone
exc_traceback)rrzrcrs    rtest_unraisablezExceptionTests.test_unraisable7s								ikk

/
1
1	>RLLLR]193DEEE  !<===	>	>	>	>	>	>	>	>	>	>	>	>	>	>	>	>	>	>sABBBc	ttfD]G}||5	|d}|#|$rHt5}t	jt	jdddn#1swxYwYYnwxYw|}|d||d|||j	||tur|d|n|d||
|ddddn#1swxYwYIdS)Nztest messagerz	raise excz<exception str() failed>r)rYr'r3rr^__excepthook__rgetvaluerrrr)rrtr0rreports     rtest_unhandledzExceptionTests.test_unhandledGs#%78	7	7Hh''
7
7<"(>22CI<<<(**<f*CLNN;;<<<<<<<<<<<<<<<< **

2F;;;

k6222

h/888111MM"<fEEEEMM.&999 5 5666!
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7	7	7sQE
6B	 A5	)B5A9
9B<A9
=BEBB<EE	E	cd}tddD]J}tjd||z\}}}||d|d|KdS)Nzif 1:
            import _testcapi
            class C(): pass
            _testcapi.set_nomemory(0, %d)
            C()
        rNrr-)rNxrH)rgr	r0r)rrr}r2r3r6s      r"test_memory_error_in_PyErr_PrintExz1ExceptionTests.test_memory_error_in_PyErr_PrintEx\ssq"	/	/A(>tTAXNNLBSMM"h'''MM.#....	/	/rc6GddtGddtfd}|}|d|5|ddddS#1swxYwYdS)NceZdZdS)BExceptionTests.test_yield_in_nested_try_excepts.<locals>.MainErrorNrr!rr	MainErrorrorrrceZdZdS)AExceptionTests.test_yield_in_nested_try_excepts.<locals>.SubErrorNrr!rrSubErrorrrrrrc3TK	#$r	dVn#$rYnwxYwwxYwrr!)rrsrmainz=ExceptionTests.test_yield_in_nested_try_excepts.<locals>.mainusf
ikk!


EEEED
s 
''"'"')r*rr\r)rrcororrs   @@r test_yield_in_nested_try_exceptsz/ExceptionTests.test_yield_in_nested_try_exceptsms"														y									tvv		$


y
)
)	#	#JJxxzz"""	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#s#BBBcfd}|}	t#t$r&t|dYnwxYwt|ddS)Nc3K	t#t$rdVYnwxYwtjddVdS)NrNrr)rYr5r^rr+srrPz?ExceptionTests.test_generator_doesnt_retain_old_exc2.<locals>.gsd
  



S\^^-?@@@GGGGGsrNr)rFr5r)rrPrs`  r%test_generator_doesnt_retain_old_exc2z4ExceptionTests.test_generator_doesnt_retain_old_exc2s					acc	+	+	+	+T#YY*****	+cA&&&&&s-A	A	cd}|t5|}	ddzn%#t|t|YnxYwddddS#1swxYwYdS)Nc3KdVrr!r!rrrPz1ExceptionTests.test_raise_in_generator.<locals>.gsGGGrrNr)r\rZr)rrPr}s   rtest_raise_in_generatorz&ExceptionTests.test_raise_in_generators			


0
1
1		A
!
QQ
																		s%A"0A" AA""A&)A&z Won't work if __debug__ is Falsecta	b|ddS#t$rJ}b||t|t
|dYd}~dSd}~wwxYw)Nrhello)rXAssertionErrorrirr,r5r4r%s  rtest_assert_shadowingz$ExceptionTests.test_assert_shadowings
#	,II*+++++
	.	.	.!!!^444SVVW---------	.s
A5?A00A5cGddt}	t#t$r}|}Yd}~nd}~wwxYw	|#t$rYnwxYwtdD]/}	t#t$r
}Yd}~nd}~wwxYwt0dS)NceZdZdS)BExceptionTests.test_memory_error_subclasses.<locals>.TestExceptionNrr!rr
TestExceptionrrrrrG)rKr*rgr)rrr0inst_s     rtest_memory_error_subclassesz+ExceptionTests.test_memory_error_subclassess					K							DDDDDD					D	r		A
!!




LLLL
		s1
2-28
AAA!!
A50A5)NNr?)Srrr r9rpr|rrrrunittestskipIfrr^maxsizerrequires_resource
bigmemtestrrrr
skipUnlessrrrr&r.r2r8r:r?rBrIrrQrTr[r]r~rrrrrrrrrrrrrrrrskiprrrr
rrrr%r*r4r6rFrIrSrbrjrortrrrrrrrrr!rrr.r.,s444RCRCRCh???.'Q'Q'QR7777"222a)a)a)FX_W+-XYYWu%%W5999//:9&%ZY/
--\-^%0%0%0NX0355;;55;B@B@B@H2226...*---JJJ	0	0	0''' 111$***
-
-Z
-222						wwwr;;;<
=
=
====&===6
3
3
3===2::::::
888
999999
0
0
0&)&)&)PDDD&X]$%%"("(&%"(H-(-(-(^+++777$+++$#i#i#iJ<<<BBZB>Wu%%&%\8%8%\8%t%%\%$,2,2,2^//\/*##\#$%-%-\%-N%%\%,%%Z%(JJJ>>> 777*//\/ ###.'''$


X$FGG
,
,HG
,rr.cPeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dS)
NameErrorTestsc|	tdS#t$r&}|d|jYd}~dSd}~wwxYw)Nbluch)rrLr5namerys  rtest_name_error_has_namez'NameErrorTests.test_name_error_has_namesY	0EEE	0	0	0Wch/////////	0s
;6;cd}d}d}d}d}d}|df|df|d	f|d
f|df|dffD]\}}d}		|na#t$rT}
tj5}	tjtjdddn#1swxYwYYd}
~
nd}
~
wwxYw|||	dS)NcBdx}x}x}}d}ttdSrrr)noise
more_noiserbcblechs     rSubstitutionz@NameErrorTests.test_name_error_suggestions.<locals>.Substitutions**..E.J.RE%LLLLLrcBdx}x}x}}d}ttdSrr)rrrrblchs     rEliminationz?NameErrorTests.test_name_error_suggestions.<locals>.Eliminations**..E.J.RD%LLLLLrcBdx}x}x}}d}ttdSrr)rrrrbluchins     rAdditionz<NameErrorTests.test_name_error_suggestions.<locals>.Additions**..E.J.RG%LLLLLrc6d}d}ttdSrr)blachblucs  rSubstitutionOverEliminationzONameErrorTests.test_name_error_suggestions.<locals>.SubstitutionOverEliminationsED%LLLLLrc6d}d}ttdSrr)rbluchis  rSubstitutionOverAdditionzLNameErrorTests.test_name_error_suggestions.<locals>.SubstitutionOverAdditionsEF%LLLLLrc6d}d}ttdSrr)bluchars  rEliminationOverAdditionzKNameErrorTests.test_name_error_suggestions.<locals>.EliminationOverAdditionsFD%LLLLLr'blech'?'blch'?
'bluchin'?z	'blucha'?'blach'?rLrrr^rrrr)rrrrrrrrC
suggestionr6r0s           rtest_name_error_suggestionsz*NameErrorTests.test_name_error_suggestionss			
			
			
			
			
			
#/
!;!,i 8!)< 8!8+ F!<j I!9: F!H	6	6D*C
8
8
8
8,..8#&77888888888888888
8
MM*cllnn5555	6	6s9
:
BB B7BBB
BBBc6d}	|na#t$rT}tj5}tjtjdddn#1swxYwYYd}~nd}~wwxYw|d|dS)Nc.ttdSr)rglobal_for_suggestior!rrrCzENameErrorTests.test_name_error_suggestions_from_globals.<locals>.func
s&'''''rz'global_for_suggestions'?rrrCr0r6s    r(test_name_error_suggestions_from_globalsz7NameErrorTests.test_name_error_suggestions_from_globals	s	(	(	(	4DFFFF	4	4	4(**
4c"CLNN33
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4	4	


13<<>>BBBBB7

A.A) A
A)A	A) A	!A))A.c6d}	|na#t$rT}tj5}tjtjdddn#1swxYwYYd}~nd}~wwxYw|d|dS)Nc.ttdSr)rZeroDivisionErrrrrr!rrrCzFNameErrorTests.test_name_error_suggestions_from_builtins.<locals>.funcs$%%%%%rz'ZeroDivisionError'?rrs    r)test_name_error_suggestions_from_builtinsz8NameErrorTests.test_name_error_suggestions_from_builtinss	&	&	&	4DFFFF	4	4	4(**
4c"CLNN33
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4	4	


,cllnn=====rc6d}	|na#t$rT}tj5}tjtjdddn#1swxYwYYd}~nd}~wwxYw|d|dS)Nc2d}ttdSr)rsomethingverywronghe)somethingverywronghehehehehehes rrLzSNameErrorTests.test_name_error_suggestions_do_not_trigger_for_long_names.<locals>.fs-1*&'''''rsomethingverywrongheherLrrr^rrrXrrrLr0r6s    r9test_name_error_suggestions_do_not_trigger_for_long_nameszHNameErrorTests.test_name_error_suggestions_do_not_trigger_for_long_namess	(	(	(	4
ACCCC	4	4	4(**
4c"CLNN33
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4	4	
13<<>>BBBBBrc\dx}x}x}x}}|d5	tna#t$rT}tj5}tjtjdddn#1swxYwYYd}~nd}~wwxYw|d|	|d|	|d|	|d|	|d|	|d|	dddn#1swxYwY|d	5	tna#t$rT}tj5}tjtjdddn#1swxYwYYd}~nd}~wwxYw|d|	|d|	|d|	|d|	|d|	|d|	dddn#1swxYwY|d
5	tna#t$rT}tj5}tjtjdddn#1swxYwYYd}~nd}~wwxYw|d|	|d|	|d|	|d|	|d|	|d|	dddn#1swxYwY|d5	tna#t$rT}tj5}tjtjdddn#1swxYwYYd}~nd}~wwxYw|d|	|d|	|d|	|d|	|d|	|d|	ddddS#1swxYwYdS)NrSryou meanvvvmom'id''w''pytho'r$mpy)
r3rSrLrrr^rrrXrr$rr)rrrr>idpythor0r6s        r>test_name_error_bad_suggestions_do_not_trigger_for_small_nameszMNameErrorTests.test_name_error_bad_suggestions_do_not_trigger_for_small_names*s@%)))c)A)U
\\s\
#
#	8	8
8
8
8
8,..8#&77888888888888888
8
Z888UCLLNN333UCLLNN333VS\\^^444UCLLNN333Y777	8	8	8	8	8	8	8	8	8	8	8	8	8	8	8\\s\
#
#	8	8
8
8
8
8,..8#&77888888888888888
8
Z888UCLLNN333UCLLNN333VS\\^^444UCLLNN333Y777	8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x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}	x}
x}x}x}
x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}x}}ttdSr)ra0( a1a2a3a4a5a6a7a8a9a10a11a12a13a14a15a16a17a18a19a20a21a22a23a24a25a26a27a28a29a30a31a32a33a34a35a36a37a38a39a40a41a42a43a44a45a46a47a48a49a50a51a52a53a54a55a56a57a58a59a60a61a62a63a64a65a66a67a68a69a70a71a72a73a74a75a76a77a78a79a80a81a82a83a84a85a86a87a88a89a90a91a92a93a94a95a96a97a98a99a100a101a102a103a104a105a106a107a108a109a110a111a112a113a114a115a116a117a118a119a120a121a122a123a124a125a126a127a128a129a130a131a132a133a134a135a136a137a138a139a140a141a142a143a144a145a146a147a148a149a150a151a152a153a154a155a156a157a158a159a160a161a162a163a164a165a166a167a168a169a170a171a172a173a174a175a176a177a178a179a180a181a182a183a184a185a186a187a188a189a190a191a192a193a194a195a196a197a198a199a200a201a202a203a204a205a206a207a208a209a210a211a212a213a214a215a216a217a218a219a220a221a222a223a224a225a226a227a228a229a230a231a232a233a234a235a236a237a238a239a240a241a242a243a244a245a246a247a248a249a250a251a252a253a254a255a256a257a258a259a260a261a262a263a264a265a266a267a268a269a270a271a272a273a274a275a276a277a278a279a280a281a282a283a284a285a286a287a288a289a290a291a292a293a294a295a296a297a298a299a300a301a302a303a304a305a306a307a308a309a310a311a312a313a314a315a316a317a318a319a320a321a322a323a324a325a326a327a328a329a330a331a332a333a334a335a336a337a338a339a340a341a342a343a344a345a346a347a348a349a350a351a352a353a354a355a356a357a358a359a360a361a362a363a364a365a366a367a368a369a370a371a372a373a374a375a376a377a378a379a380a381a382a383a384a385a386a387a388a389a390a391a392a393a394a395a396a397a398a399a400a401a402a403a404a405a406a407a408a409a410a411a412a413a414a415a416a417a418a419a420a421a422a423a424a425a426a427a428a429a430a431a432a433a434a435a436a437a438a439a440a441a442a443a444a445a446a447a448a449a450a451a452a453a454a455a456a457a458a459a460a461a462a463a464a465a466a467a468a469a470a471a472a473a474a475a476a477a478a479a480a481a482a483a484a485a486a487a488a489a490a491a492a493a494a495a496a497a498a499a500a501a502a503a504a505a506a507a508a509a510a511a512a513a514a515a516a517a518a519a520a521a522a523a524a525a526a527a528a529a530a531a532a533a534a535a536a537a538a539a540a541a542a543a544a545a546a547a548a549a550a551a552a553a554a555a556a557a558a559a560a561a562a563a564a565a566a567a568a569a570a571a572a573a574a575a576a577a578a579a580a581a582a583a584a585a586a587a588a589a590a591a592a593a594a595a596a597a598a599a600a601a602a603a604a605a606a607a608a609a610a611a612a613a614a615a616a617a618a619a620a621a622a623a624a625a626a627a628a629a630a631a632a633a634a635a636a637a638a639a640a641a642a643a644a645a646a647a648a649a650a651a652a653a654a655a656a657a658a659a660a661a662a663a664a665a666a667a668a669a670a671a672a673a674a675a676a677a678a679a680a681a682a683a684a685a686a687a688a689a690a691a692a693a694a695a696a697a698a699a700a701a702a703a704a705a706a707a708a709a710a711a712a713a714a715a716a717a718a719a720a721a722a723a724a725a726a727a728a729a730a731a732a733a734a735a736a737a738a739a740a741a742a743a744a745a746a747a748a749a750a751a752a753a754a755a756a757a758a759a760a761a762a763a764a765a766a767a768a769a770a771a772a773a774a775a776a777a778a779a780a781a782a783a784a785a786a787a788a789a790a791a792a793a794a795a796a797a798a799a800s                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 rrLzXNameErrorTests.test_name_error_suggestions_do_not_trigger_for_too_many_locals.<locals>.fbsW'daP
BP
P
bP
2P
P
RP
"P
rP
BP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&AP
@)-AP
@04AP
@7;AP
@>BAP
@EIAP
@LPAP
B
CP
BCP
BCP
B"&CP
B)-CP
B04CP
B7;CP
B>BCP
BEICP
BLPCP
D
EP
DEP
DEP
D"&EP
D)-EP
D04EP
D7;EP
D>BEP
DEIEP
DLPEP
F
GP
FGP
FGP
F"&GP
F)-GP
F04GP
F7;GP
F>BGP
FEIGP
FLPGP
H
IP
HIP
HIP
H"&IP
H)-IP
H04IP
H7;IP
H>BIP
HEIIP
HLPIP
J
KP
JKP
JKP
J"&KP
J)-KP
J04KP
J7;KP
J>BKP
JEIKP
JLPKP
L
MP
LMP
LMP
L"&MP
L)-MP
L04MP
L7;MP
L>BMP
LEIMP
LLPMP
N
OP
NOP
NOP
N"&OP
N)-OP
N04OP
N7;OP
N>BOP
NEIOP
NLPOP
P
QP
PQP
PQP
P"&QP
P)-QP
P04QP
P7;QP
P>BQP
PEIQP
PLPQP
R
SP
RSP
RSP
R"&SP
R)-SP
R04SP
R7;SP
R>BSP
REISP
RLPSP
T
UP
TUP
TUP
T"&UP
T)-UP
T04UP
T7;UP
T>BUP
TEIUP
TLPUP
V
WP
VWP
VWP
V"&WP
V)-WP
V04WP
V7;WP
V>BWP
VEIWP
VLPWP
X
YP
XYP
XYP
X"&YP
X)-YP
X04YP
X7;YP
X>BYP
XEIYP
XLPYP
Z
[P
Z[P
Z[P
Z"&[P
Z)-[P
Z04[P
Z7;[P
Z>B[P
ZEI[P
ZLP[P
\
]P
\]P
\]P
\"&]P
\)-]P
\04]P
\7;]P
\>B]P
\EI]P
\LP]P
^
_P
^_P
^_P
^"&_P
^)-_P
^04_P
^7;_P
^>B_P
^EI4"IIIIIrz
NameError.*a1)rLrrr^rrassertNotRegexrrs    r>test_name_error_suggestions_do_not_trigger_for_too_many_localszMNameErrorTests.test_name_error_suggestions_do_not_trigger_for_too_many_localsasS	S	S	j	4
ACCCC	4	4	4(**
4c"CLNN33
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4	4	
CLLNN,<=====rcfd}	|na#t$rT}tj5}tjtjdddn#1swxYwYYd}~nd}~wwxYw|d|d}	|na#t$rT}tj5}tjtjdddn#1swxYwYYd}~nd}~wwxYw|d|dS)Nc"d}trrLrs rrLz@NameErrorTests.test_name_error_with_custom_exceptions.<locals>.fsE++rrcd}trrrs rrLz@NameErrorTests.test_name_error_with_custom_exceptions.<locals>.fsEOrrrs    r&test_name_error_with_custom_exceptionsz5NameErrorTests.test_name_error_with_custom_exceptionss				4
ACCCC	4	4	4(**
4c"CLNN33
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4	4	
#,,..111				4
ACCCC	4	4	4(**
4c"CLNN33
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4	4	
#,,..11111ss

A.A) A
A)A	A) A	!A))A.
B((
D2D C1%D1C5	5D8C5	9DDc6d}	|na#t$rT}tj5}tjtjdddn#1swxYwYYd}~nd}~wwxYw|d|dS)Nc,d}t|d}dS)Nr)r)r	somethongs  rrzDNameErrorTests.test_unbound_local_error_doesn_not_match.<locals>.foosI)IIIrr)rZrrr^rrrXr)rrr0r6s    r(test_unbound_local_error_doesn_not_matchz7NameErrorTests.test_unbound_local_error_doesn_not_matchs			
	4CEEEE 	4	4	4(**
4c"CLNN33
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4	4	
cllnn55555rc.fd}	|nZ#j$rMtj5}tjtjdddn#1swxYwYYnwxYwd|dS)Nc~td5tddddS#1swxYwYdS)Naaa)rrLaabr+srrLz)NameErrorTests.test_issue45826.<locals>.fs''	599



















s266r!)failureExceptionrrr^rrrrrrLr6s`  rtest_issue45826zNameErrorTests.test_issue45826s						4
ACCCC$	4	4	4(**
4c"CLNN33
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4	4	


eS\\^^,,,,,s2
A* AA*A 	 A*#A 	$A*)A*cxd}	|nZ#t$rMtj5}tjtjdddn#1swxYwYYnwxYw|d||d|dS)Nc	tdS#t$r(}|dtd}~wwxYwr)nonsenserr+rZ)rs rrLz1NameErrorTests.test_issue45826_focused.<locals>.fsO
* 
*
*
*  &&&')))
*s
=#8=r'rZ)rZrrr^rrrrr#s   rtest_issue45826_focusedz&NameErrorTests.test_issue45826_focuseds	*	*	*	4
ACCCC 	4	4	4(**
4c"CLNN33
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4	4	


j#,,..111

)3<<>>:::::s2
A' A
A'A	A' A	!A'&A'N)rrr rrrrrrrrrr$r(r!rrrrs000+6+6+6ZCCC>>>CCC585858n\>\>\>|2222666---;;;;;rrc\eZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdS)AttributeErrorTestsc8td}||j||jt	}tdd|}||jd||j|dS)NzOuch!Ouchcarryrrc)r;r>rrcrr5r)rr0sentinels   rtest_attributesz#AttributeErrorTests.test_attributessW%%#(####'"""88V'x@@@7+++

cgx(((((rcGdd}|}	|jnM#t$r@}|d|j|||jYd}~nd}~wwxYw	t
|ddS#t$rA}|d|j|||jYd}~dSd}~wwxYw)NceZdZdZdS)<AttributeErrorTests.test_getattr_has_name_and_obj.<locals>.ANrrr rr!rrrr3EEErrr)rr;r5rrcr__getattribute__rrrcr0s    rtest_getattr_has_name_and_objz1AttributeErrorTests.test_getattr_has_name_and_objs%								acc	+III	+	+	+Wch///S#'********	+	+##C11111	+	+	+Wch///S#'*********	+s,!
A+6A&&A+/B
C6CCcGdd}|}	|dS#t$rA}|d|j|||jYd}~dSd}~wwxYw)NceZdZdZdS)GAttributeErrorTests.test_getattr_has_name_and_obj_for_method.<locals>.AcdSrr!r+s rrzMAttributeErrorTests.test_getattr_has_name_and_obj_for_method.<locals>.A.blech$srNr4r!rrrr;#s#




rrr)rr;r5rrcr7s    r(test_getattr_has_name_and_obj_for_methodz<AttributeErrorTests.test_getattr_has_name_and_obj_for_method"s								acc	+IIKKKKK	+	+	+Wch///S#'*********	+s/
A:6A55A:c
Gdd}Gdd}Gdd}Gdd}Gd	d
}Gdd}|d
f|df|df|df|df|dffD]\}}	|jna#t$rT}	tj5}
t	jt	jdddn#1swxYwYYd}	~	nd}	~	wwxYw|||
dS)Nc"eZdZdxZxZxZZdZdS)BAttributeErrorTests.test_getattr_suggestions.<locals>.SubstitutionN)rrr rrrrrr!rrrr@/s'*..E.J.REEErrc"eZdZdxZxZxZZdZdS)AAttributeErrorTests.test_getattr_suggestions.<locals>.EliminationN)rrr rrrrrr!rrrrB3s'*..E.J.RDDDrrc"eZdZdxZxZxZZdZdS)>AttributeErrorTests.test_getattr_suggestions.<locals>.AdditionN)rrr rrrrrr!rrrrD7s'*..E.J.RGGGrrceZdZdZdZdS)QAttributeErrorTests.test_getattr_suggestions.<locals>.SubstitutionOverEliminationN)rrr rrr!rrrrF;sEDDDrrceZdZdZdZdS)NAttributeErrorTests.test_getattr_suggestions.<locals>.SubstitutionOverAdditionN)rrr rrr!rrrrH?sEFFFrrceZdZdZdZdS)MAttributeErrorTests.test_getattr_suggestions.<locals>.EliminationOverAdditionN)rrr rrr!rrrrJCsFDDDrrrrrz'bluc'?r	rr;rrr^rrrr)rrrrrrrrrr0r6s           rtest_getattr_suggestionsz,AttributeErrorTests.test_getattr_suggestions.s																																																".z :!,i 8!)< 8!8) D!<j I!9: F H	6	6OC
8!
8
8
8,..8#&77888888888888888
8
MM*cllnn5555	6	6s<)A99
CC C6CCC	C
CCcTGdd}	|jna#t$rT}tj5}t	jt	jdddn#1swxYwYYd}~nd}~wwxYw|d|dS)NceZdZdZdS)ZAttributeErrorTests.test_getattr_suggestions_do_not_trigger_for_long_attributes.<locals>.ANr4r!rrrrOVr5rrr)	somethingverywrongr;rrr^rrrXrrrr0r6s    r;test_getattr_suggestions_do_not_trigger_for_long_attributeszOAttributeErrorTests.test_getattr_suggestions_do_not_trigger_for_long_attributesUs									4
ACC"""	4	4	4(**
4c"CLNN33
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4	4	
#,,..111117
A=A8 A(A8(A,	,A8/A,	0A88A=cbGdd}|d5	|jna#t$rT}tj5}tjtjdddn#1swxYwYYd}~nd}~wwxYw|d|	|d|	|d|	|d|	|d	|	|d
|	dddn#1swxYwY|d5	|j
na#t$rT}tj5}tjtjdddn#1swxYwYYd}~nd}~wwxYw|d|	|d|	|d|	|d|	|d	|	|d
|	dddn#1swxYwY|d5	|jna#t$rT}tj5}tjtjdddn#1swxYwYYd}~nd}~wwxYw|d|	|d|	|d|	|d|	|d	|	|d
|	dddn#1swxYwY|d
5	|jna#t$rT}tj5}tjtjdddn#1swxYwYYd}~nd}~wwxYw|d|	|d|	|d|	|d|	|d	|	|d
|	ddddS#1swxYwYdS)Nc"eZdZdxZxZxZxZZdS)fAttributeErrorTests.test_getattr_error_bad_suggestions_do_not_trigger_for_small_names.<locals>.MyClassN)rrr rrr>rrr!rrMyClassrVbs')--C-#--BrrWrSrrrrrrrr$rr)
r3rSr;rrr^rrrXrr$rr)rrWr0r6s    rAtest_getattr_error_bad_suggestions_do_not_trigger_for_small_nameszUAttributeErrorTests.test_getattr_error_bad_suggestions_do_not_trigger_for_small_namesasY	.	.	.	.	.	.	.	.\\s\
#
#	8	8
8			!
8
8
8,..8#&77888888888888888
8
Z888UCLLNN333UCLLNN333VS\\^^444UCLLNN333Y777	8	8	8	8	8	8	8	8	8	8	8	8	8	8	8\\s\
#
#	8	8
8			!
8
8
8,..8#&77888888888888888
8
Z888UCLLNN333UCLLNN333VS\\^^444UCLLNN333Y777	8	8	8	8	8	8	8	8	8	8	8	8	8	8	8\\s\
#
#	8	8
8			!
8
8
8,..8#&77888888888888888
8
Z888UCLLNN333UCLLNN333VS\\^^444UCLLNN333Y777	8	8	8	8	8	8	8	8	8	8	8	8	8	8	8\\t\
$
$	8	8
8


!
8
8
8,..8#&77888888888888888
8
Z888UCLLNN333UCLLNN333VS\\^^444UCLLNN333Y777	8	8	8	8	8	8	8	8	8	8	8	8	8	8	8	8	8	8s~F.F
BB A7+B7A;;B>A;?BFBC3FFF,L.F65L6
HH G?3H?HHHH
LHC3LLL4R6L>=R>
NN N;NNNNNRNC3RR"R<X$>SX$
T$T# TTTTTTX$T$$C3X$$X(+X(cGdd}tdD]}t|d|d	|jna#t$rT}t	j5}t
jt
jdddn#1swxYwYYd}~nd}~wwxYw|	d|
dS)NceZdZdZdS)TAttributeErrorTests.test_getattr_suggestions_do_not_trigger_for_big_dicts.<locals>.ANr4r!rrrr[r5rriindex_r)rgr6rr;rrr^rrrXr)rrindexr0r6s     r5test_getattr_suggestions_do_not_trigger_for_big_dictszIAttributeErrorTests.test_getattr_suggestions_do_not_trigger_for_big_dictss2								4[[	/	/EA'''....	4
ACCIII	4	4	4(**
4c"CLNN33
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4	4	
#,,..11111s;A
B#B" BBB	BB	BB#cGdd}	|jna#t$rT}tj5}t	jt	jdddn#1swxYwYYd}~nd}~wwxYw|d|Gdd}	|jna#t$rT}tj5}t	jt	jdddn#1swxYwYYd}~nd}~wwxYw|d|dS)NceZdZdZdZdS)?AttributeErrorTests.test_getattr_suggestions_no_args.<locals>.ANctrr;rattrs  r__getattr__zKAttributeErrorTests.test_getattr_suggestions_no_args.<locals>.A.__getattr__s$&&&rrrr rrfr!rrrras(E
'
'
'
'
'rrrceZdZdZdZdS)raNctrrcrds  rrfzKAttributeErrorTests.test_getattr_suggestions_no_args.<locals>.A.__getattr__s$$rrgr!rrrz?AttributeErrorTests.test_getattr_suggestions_no_args.<locals>.As(E
%
%
%
%
%rrKrQs    r test_getattr_suggestions_no_argsz4AttributeErrorTests.test_getattr_suggestions_no_argss	'	'	'	'	'	'	'	'
	4
ACCIII	4	4	4(**
4c"CLNN33
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4	4	


gs||~~...	%	%	%	%	%	%	%	%
	4
ACCIII	4	4	4(**
4c"CLNN33
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4	4	


gs||~~.....ss
A=A8 A(A8(A,	,A8/A,	0A88A=6C
D$D# DDD	DD	DD$cGddGfdd}Gdd}Gdd}|||fD]}	|jna#t$rT}tj5}t	jt	jdddn#1swxYwYYd}~nd}~wwxYw|d	|dS)
NceZdZdZdZdS)TAttributeErrorTests.test_getattr_suggestions_invalid_args.<locals>.NonStringifyClassN)rrr r,__repr__r!rrNonStringifyClassrmsGHHHrroceZdZdZfdZdS)DAttributeErrorTests.test_getattr_suggestions_invalid_args.<locals>.ANc2trrc)rreros  rrfzPAttributeErrorTests.test_getattr_suggestions_invalid_args.<locals>.A.__getattr__s$%6%6%8%8999rrg)rosrrrqs3E
:
:
:
:
:
:
:rrceZdZdZdZdS)DAttributeErrorTests.test_getattr_suggestions_invalid_args.<locals>.BNc"tdd)NErrorrcrds  rrfzPAttributeErrorTests.test_getattr_suggestions_invalid_args.<locals>.B.__getattr__s$Wb111rrgr!rrrrts(E
2
2
2
2
2rrceZdZdZdZdS)DAttributeErrorTests.test_getattr_suggestions_invalid_args.<locals>.CNc td)Nrwrcrds  rrfzPAttributeErrorTests.test_getattr_suggestions_invalid_args.<locals>.C.__getattr__s$R(((rrgr!rrrrys(E
)
)
)
)
)rrrrK)rrrrrr0r6ros       @r%test_getattr_suggestions_invalid_argsz9AttributeErrorTests.test_getattr_suggestions_invalid_argss									:	:	:	:	:	:	:	:	:	:
	2	2	2	2	2	2	2	2
	)	)	)	)	)	)	)	)
q!9	3	3C
8!
8
8
8,..8#&77888888888888888
8
MM'3<<>>2222	3	3s<A
B.B)- B
B)BB) B!B))B.cTGdd}	|jna#t$rT}tj5}t	jt	jdddn#1swxYwYYd}~nd}~wwxYw|d|dS)NceZdZdZdS)EAttributeErrorTests.test_getattr_suggestions_for_same_name.<locals>.AcdgS)Nrr!r+s rr(zMAttributeErrorTests.test_getattr_suggestions_for_same_name.<locals>.A.__dir__s
y rN)rrr r(r!rrrr~s#
!
!
!
!
!rrDid you mean)	rr;rrr^rrrXrrQs    r&test_getattr_suggestions_for_same_namez:AttributeErrorTests.test_getattr_suggestions_for_same_names	!	!	!	!	!	!	!	!	4
ACCIII	4	4	4(**
4c"CLNN33
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4	4	
88888rScGdd}	|jna#t$rT}tj5}t	jt	jdddn#1swxYwYYd}~nd}~wwxYw|d||d|dS)NceZdZdZdZdS)EAttributeErrorTests.test_attribute_error_with_failing_dict.<locals>.TrNc td)Noh no!rcr+s rr(zMAttributeErrorTests.test_attribute_error_with_failing_dict.<locals>.T.__dir__s$X...rN)rrr rr(r!rrTrs(E
/
/
/
/
/rrrr)	blichr;rrr^rrrXr)rrr0r6s    r&test_attribute_error_with_failing_dictz:AttributeErrorTests.test_attribute_error_with_failing_dicts	/	/	/	/	/	/	/	/
	4
ACCIII	4	4	4(**
4c"CLNN33
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4	4	
#,,..1113<<>>22222rSc<	tdd#t$rT}tj5}tjtjdddn#1swxYwYYd}~nd}~wwxYw|d|dS)Nrwr.?)r;rrr^rrrXr)rr0r6s   r"test_attribute_error_with_bad_namez6AttributeErrorTests.test_attribute_error_with_bad_names	4 bb1111	4	4	4(**
4c"CLNN33
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4	4	
cllnn-----s7
A1A, AA,A 	 A,#A 	$A,,A1cGddGfdd}	|jna#t$rT}tj5}t	jt	jdddn#1swxYwYYd}~nd}~wwxYw|d||d|dS)NceZdZdZdS)IAttributeErrorTests.test_attribute_error_inside_nested_getattr.<locals>.ArNN)rrr rr!rrrr	sEEErrceZdZfdZdS)IAttributeErrorTests.test_attribute_error_inside_nested_getattr.<locals>.Bc&}|jSr)r)rrerrs   rr6zZAttributeErrorTests.test_attribute_error_inside_nested_getattr.<locals>.B.__getattribute__	sACCwrN)rrr r6)rsrrr
	s.






rrrr)	rr;rrr^rrrr)rrr0r6rs    @r*test_attribute_error_inside_nested_getattrz>AttributeErrorTests.test_attribute_error_inside_nested_getattr	sJ																		
	4
ACCMMM	4	4	4(**
4c"CLNN33
4
4
4
4
4
4
4
4
4
4
4
4
4
4
4	4	


ncllnn555

gs||~~.....s8/
B
B A8,B8A<	<B?A<	BB
N)rrr r0r8r=rLrRrXr^rjr{rrrrr!rrr*r*s	)	)	)+++ 
+
+
+%6%6%6N
2
2
2686868r222 ///6333:
9
9
9
3
3
3.../////rr*c&eZdZdZdZdZdZdS)ImportErrorTestsctd}||j||jtdd}||jd||jtdd}||jd||jtddd}||jd||jdd}|t|5tdd	
dddn#1swxYwY|t|5tddd	dddn#1swxYwY|t|5tdd
d	dddn#1swxYwY|t|5td	
dddn#1swxYwY|t|5tdd	dddddS#1swxYwYdS)Ntest
somemodulersomepathpathsomename)rrz8'invalid' is an invalid keyword argument for ImportErrorkeyword)invalidr)rrr)rrT)ranother)rDr>rrr5rrX)rr0rts   rr0z ImportErrorTests.test_attributes	s&!!#(####(###&|444<000#(###&z222:...#(###&z
CCC:...:...H

#
#Is
3
3	3	3	2222	3	3	3	3	3	3	3	3	3	3	3	3	3	3	3
#
#Is
3
3	@	@VY????	@	@	@	@	@	@	@	@	@	@	@	@	@	@	@
#
#Is
3
3	@	@VY????	@	@	@	@	@	@	@	@	@	@	@	@	@	@	@
#
#Is
3
3	+	+	****	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+
#
#Is
3
3	A	A	4@@@@	A	A	A	A	A	A	A	A	A	A	A	A	A	A	A	A	A	AsZ5EEE9FFF>GG!$G!H  H$'H$I&&I*-I*ctddd}||jd||jd||jd||jd|||jd||jd||jd||jddS)Nrrrrrrr!)rDr5rrtrrrrys  rtest_reset_attributesz&ImportErrorTests.test_reset_attributes=	s&vF;;;9---&)))6***6***	2&&&$'''4(((4(((((rctdtfd5d}t|}|t	|t	|ddddS#1swxYwYdS)NrT)quietsabc)rBytesWarningrDr5r4)rargr0s   rtest_non_str_argumentz&ImportErrorTests.test_non_str_argumentK	s
R.d
;
;
;	1	1Cc""CSXXs3xx000	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1sAA((A,/A,cRttdtdtddfD]g}tdi|}ttjdzD]}tjtj||}||jd||j	d||j
|j
||j|jtjtj
fD]}||}||jd||j	d||j
|j
||j|jidS)	NrrrrrrrNr)dictrDrgrrrcrr5rrtrrcopydeepcopy)rkwargsorigprotor0rs      rtest_copy_picklez!ImportErrorTests.test_copy_pickleR	svv,,,,,,*===?	6	6F0000Dv6:;;
6
6l6<e#<#<==  9555  &111  49555  495555Y
-
6
6agg  9555  &111  49555  495555
6	6	6rN)rrr r0rrrr!rrrr	sT A A AD)))11166666rrc2eZdZdZdZdZdZdZdZdS)SyntaxErrorTestscdtdfdtdfdtdfdtdfdtd	fd
td	fdtd	fdtd	fd
tdfg	}|D]\}}||5	td|#t$r~}tj5}tjtjdddn#1swxYwY|||	|}Yd}~nd}~wwxYw	dddn#1swxYwYdS)N)bad.pyrNrabcdefgrNrz
               File "bad.py", line 1
                 abcdefg
                  ^^^^^
             SyntaxError: bad bad
             )rrNrrrNrz
               File "bad.py", line 1
                 abcdefg
                  ^
             SyntaxError: bad bad
             )rrNrrrN)rrNrrrNrz
               File "bad.py", line 1
                 abcdefg
                    ^
             SyntaxError: bad bad
             )rrNrrNrzn
               File "bad.py", line 1
                 abcdefg
             SyntaxError: bad bad
             )rrNrrrN)rrNrrrNr)rrNrrrNrrrNrrrNdz
               File "bad.py", line 1
                 abcdefg
                  ^^^^^^
             SyntaxError: bad bad
             )rbad bad)
rr3rRrrr^rrrr)rcasesrrr0r6
the_exceptions       rtest_range_of_offsetsz&SyntaxErrorTests.test_range_of_offsetsf	sj/

/

0

/

1

1

/

/

1

MN
^$	(	(ND(4((
(
((%i666"((( 022<c*CLNN;;<<<<<<<<<<<<<<<MM(CLLNN;;;$'MMMMMM	("
(
(
(
(
(
(
(
(
(
(
(
(
(
(
(	(	(sZ0E2C
E
E D	?ED
ED
-EEE

EE	!E	cd}	ttdd5}||dddn#1swxYwYtjdddt\}}}|d}||d	d
||ddttn#ttwxYwd
}	ttdd5}||dddn#1swxYwYtjdddt\}}}|d}||d	d||ddttdS#ttwxYw)NuU# -*- coding: cp437 -*-
"¢¢¢¢¢¢" + f(4, x for x in range(1))
r>cp437r@r,-Xutf8r?u@    "¢¢¢¢¢¢" + f(4, x for x in range(1))rz-                          ^^^^^^^^^^^^^^^^^^^z# -*- coding: ascii -*-

(
rz    (z    ^)	r_rwriter	r0r
splitlinesr5r
)rrtestfiler2r3r6s      rtest_encodingszSyntaxErrorTests.test_encodings	s*
M			fcG444
'v&&&
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'(>udFTZ[BS**W%%0022CSW&hiiiSW&UVVV6NNNNF6NNNN2		fcG444
'v&&&
'
'
'
'
'
'
'
'
'
'
'
'
'
'
'(>udFTZ[BS**W%%0022CSWg...SWg...6NNNNNF6NNNNs]C=CACABCC28GD1%G1D55G8D59BGG'c	ttd5}|ddddn#1swxYwYtjdddt\}}}|d}|d|dttdS#ttwxYw)	Nbwr,rrr?z8SyntaxError: Non-UTF-8 code starting with '\x89' in filer)	r_rrr	r0rrrr
)rrr2r3r6s     r
test_non_utf8zSyntaxErrorTests.test_non_utf8	s	fd##
(xw'''
(
(
(
(
(
(
(
(
(
(
(
(
(
(
((>udFTZ[BS**W%%0022CMMUWZ[]W^___6NNNNNF6NNNNs)B=9B==B==A&B==Ccd}td|}|\}}}}}}|||j|||j|||j|||j|||j|||j|d|jdS)Nrr	rRr5rrrrrrrt)	rrrrrrerrorrrs	         rtest_attributes_new_constructorz0SyntaxErrorTests.test_attributes_new_constructor	s2#It44
BF?&&%Z=#9:::!5666]%=>>>!5666]%=>>>
 2333M$566666rcd}td|}|\}}}}|||j|||j|d|j|||j|d|j|||j|d|jdS)N)rrNrrrr)rrrrrrrs       rtest_attributes_old_constructorz0SyntaxErrorTests.test_attributes_old_constructor	s*#It44
*.'&&%=#9:::!5666}7888!5666}7888
 2333M$566666rcd}|ttd|d}|ttd|d}|ttd|dS)N)rrNrr)rrNrrrrr)rrNrrrN)r\rXrRrrs  rtest_incorrect_constructorz+SyntaxErrorTests.test_incorrect_constructor
se)[)TBBB+)[)TBBB-)[)TBBBBBrN)	rrr rrrrrrr!rrrre	swX(X(X(t:



7
7
7
7
7
7CCCCCrrceZdZdZdS)TestInvalidExceptionMatcherc.|t5	t#d$rYnwxYw	dddn#1swxYwY|t5	t#tdf$rYnwxYw	ddddS#1swxYwYdS)Nr!)r\rXrYr+s r'test_except_star_invalid_exception_typezCTestInvalidExceptionMatcher.test_except_star_invalid_exception_type
sF


y
)
)		
  



																

y
)
)		
  #



																			sS<$,<,<AA!B
#A**A96B
8A99B

BBN)rrr rr!rrrr
s#rrcPeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dS)
PEP626Testsc`	||dn#t$r}|j}Yd}~nd}~wwxYwg}|j}|r@|j}||jdn|j|jjz
|j}|@|	t||dS)Nr1)rir*r-tb_nextrrf_linenorco_firstlinenor5tuple)rrLrrtlinesframes       rlineno_after_raisezPEP626Tests.lineno_after_raise
s	-
ACCC
II+,,,,	!	!	! AAAAAA	!
I	JELL.u|::


	A
		
ux00000s
"
=8=c8d}||ddS)NcddzdSrr!r!rrsimplez:PEP626Tests.test_lineno_after_raise_simple.<locals>.simple0
s
aCCDrrNr)rrs  rtest_lineno_after_raise_simplez*PEP626Tests.test_lineno_after_raise_simple/
s/				
*****rc8d}||ddS)Nc,	ddzdS#ddzYdSxYwrr!r!rr	in_exceptz@PEP626Tests.test_lineno_after_raise_in_except.<locals>.in_except6
s-
!
!s	rr)rrs  r!test_lineno_after_raise_in_exceptz-PEP626Tests.test_lineno_after_raise_in_except5
s/				
	1-----rc8d}||ddS)NcB	ddzdS#t$r}Yd}~dSd}~wwxYwr)rXrs rother_exceptz@PEP626Tests.test_lineno_after_other_except.<locals>.other_except?
s@
!



s	
rr)rrs  rtest_lineno_after_other_exceptz*PEP626Tests.test_lineno_after_other_except>
s/			
	
a00000rc8d}||ddS)NcL	ddzdS#t$r}ddzYd}~dSd}~wwxYwrr)rs rin_named_exceptz@PEP626Tests.test_lineno_in_named_except.<locals>.in_named_exceptG
sI
!


!
s	
##rr)rrs  rtest_lineno_in_named_exceptz'PEP626Tests.test_lineno_in_named_exceptF
s/				
33333rc8d}||ddS)Nc	ddzdS#wxYwrr!r!rrin_tryz.PEP626Tests.test_lineno_in_try.<locals>.in_tryP
s
!s	rr)rrs  rtest_lineno_in_tryzPEP626Tests.test_lineno_in_tryO
s/			
	
*****rc8d}||ddS)Nc(		ddzdS#ddzwxYwrr!r!rrin_finally_normalzDPEP626Tests.test_lineno_in_finally_normal.<locals>.in_finally_normalX
s-
!!srr)rrs  rtest_lineno_in_finally_normalz)PEP626Tests.test_lineno_in_finally_normalW
0				
 1155555rc8d}||ddS)Nc0	ddzddzdS#ddzwxYwrr!r!rrin_finally_exceptzDPEP626Tests.test_lineno_in_finally_except.<locals>.in_finally_excepta
s3
!!!srr)rrs  rtest_lineno_in_finally_exceptz)PEP626Tests.test_lineno_in_finally_except`
rrcXGddfd}||ddS)NceZdZdZdZdS)0PEP626Tests.test_lineno_after_with.<locals>.Noopc|Srr!r+s rrqz:PEP626Tests.test_lineno_after_with.<locals>.Noop.__enter__k
rrrcdSrr!rs  rrwz9PEP626Tests.test_lineno_after_with.<locals>.Noop.__exit__m
srNrxr!rrNooprj
s2







rrcZ5ddz	ddddS#1swxYwYdSrr!)rsr
after_withz6PEP626Tests.test_lineno_after_with.<locals>.after_witho
s

!

















s $$rr)rr
rs  @rtest_lineno_after_withz"PEP626Tests.test_lineno_after_withi
sb								
						

A.....rcd}||d|jd|_||ddS)NcddzdSrr!r!rrrLz8PEP626Tests.test_missing_lineno_shows_as_none.<locals>.fv
s
aCCCCrrNs)co_linetable)r__code__r)rrLs  r!test_missing_lineno_shows_as_nonez-PEP626Tests.test_missing_lineno_shows_as_noneu
s^			1%%%Z''5T'UU
4(((((rcZGddfd}||dddS)NceZdZdZdZdS)CPEP626Tests.test_lineno_after_raise_in_with_exit.<locals>.ExitFailsc|Srr!r+s rrqzMPEP626Tests.test_lineno_after_raise_in_with_exit.<locals>.ExitFails.__enter__~
rrrctrrNrs  rrwzLPEP626Tests.test_lineno_after_raise_in_with_exit.<locals>.ExitFails.__exit__
s  rNrxr!rr	ExitFailsr}
s2



!
!
!
!
!rrcX5ddzddddS#1swxYwYdSrr!)rsrr
zDPEP626Tests.test_lineno_after_raise_in_with_exit.<locals>.after_with
s|

!

















s##rNr)rr
rs  @r$test_lineno_after_raise_in_with_exitz0PEP626Tests.test_lineno_after_raise_in_with_exit|
sd	!	!	!	!	!	!	!	!						

Aq11111rN)rrr rrrrrrrrrrrr!rrrr
s111$+++...111444+++666666
/
/
/)))
2
2
2
2
2rr__main__)-rgcrqr^rrrzrtextwraprtest.supportrrrrrr	r
test.support.import_helperrtest.support.os_helperrr
test.support.warnings_helperrrrrrrDr*rr#r'TestCaser.global_for_suggestionsrr*rrrrrrr!rr<module>r"sn								







//////////////////54444411111111777777!!!!!!!GGG
YI
++++++++eeeeeX&eeeN5n;n;n;n;n;X&n;n;n;b	P/P/P/P/P/(+P/P/P/fJ6J6J6J6J6x(J6J6J6XdCdCdCdCdCx(dCdCdCN("3k2k2k2k2k2(#k2k2k2ZzHMOOOOOsAA%$A%