python (3.12.0)

(root)/
lib/
python3.12/
test/
__pycache__/
test_genericclass.cpython-312.pyc

Αe%ddlZddlmZGddejZGddejZejGddejZed	k(rejyy)
N)supportcBeZdZdZdZdZdZdZdZdZ	dZ
d	Zy
)TestMROEntrycgGdd}Gfdd}|jgGdd||}|jd||ff|jdiy)	NceZdZy)0TestMROEntry.test_mro_entry_signature.<locals>.BN__name__
__module____qualname__J/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/test/test_genericclass.pyBrrrceZdZfdZy)0TestMROEntry.test_mro_entry_signature.<locals>.Cc0j||gfSNextend)selfargskwargsCtesteds   r__mro_entries__z@TestMROEntry.test_mro_entry_signature.<locals>.C.__mro_entries__
s

tVn-trNr
rrrrrsrrr	
rrceZdZy)0TestMROEntry.test_mro_entry_signature.<locals>.DNr	r
rrDr"rrr#r)assertEqual)rrcr#rrs    @@rtest_mro_entry_signaturez%TestMROEntry.test_mro_entry_signaturesh		
C$1aVI.B'rcgGdd}Gdd}Gfdd}|}|jgGdd|||}|jd	|||f|j|j|||f|j|j|||f|j|j||||tf|}Gd
d|}|jd	|f|j|j|fy)NceZdZy)&TestMROEntry.test_mro_entry.<locals>.ANr	r
rrAr*rrr+ceZdZy)&TestMROEntry.test_mro_entry.<locals>.BNr	r
rrrr-rrrceZdZfdZy)&TestMROEntry.test_mro_entry.<locals>.Cc@j||jfSr)append	__class__rbasesrs  rrz6TestMROEntry.test_mro_entry.<locals>.C.__mro_entries__s

e$((rNrrsrrr/s
)rrceZdZy)&TestMROEntry.test_mro_entry.<locals>.DNr	r
rrr#r7rrr#ceZdZy)&TestMROEntry.test_mro_entry.<locals>.ENr	r
rrEr:#rrr;r%	__bases____orig_bases____mro__object)	rr+rrr&r#dr;rs	        @rtest_mro_entryzTestMROEntry.test_mro_entrys	)	)
C$1aaAY/q!Qi0))Aq!95Q1a$89
CaT*qd+rcgGdd}Gdd}Gfdd}|}|jgGdd|||}|jd	|||f|j|j||f|j|j|||f|j|j|||tfGd
d|}|jd	|f|j|jtf|j|j|f|j|j|tfy)NceZdZy)+TestMROEntry.test_mro_entry_none.<locals>.ANr	r
rrr+rE)rrr+ceZdZy)+TestMROEntry.test_mro_entry_none.<locals>.BNr	r
rrrrG*rrrceZdZfdZy)+TestMROEntry.test_mro_entry_none.<locals>.Cc(j|yNr
r1r3s  rrz;TestMROEntry.test_mro_entry_none.<locals>.C.__mro_entries__,s

e$rNrr5srrrI+s
rrceZdZy)+TestMROEntry.test_mro_entry_none.<locals>.DNr	r
rrr#rN1rrr#r8ceZdZy)+TestMROEntry.test_mro_entry_none.<locals>.ENr	r
rrr;rP6rrr;r<)rr+rrr&r#r;rs       @rtest_mro_entry_nonez TestMROEntry.test_mro_entry_none's		
C$1aaAY/q!f-))Aq!95Q1f$56aT*vi0))A40QK0rc~gGdd}Gfdd}|}|jgGdd||}|jd||f|j|j|tf|j|j||f|j|j||tt
fy)NceZdZy)4TestMROEntry.test_mro_entry_with_builtins.<locals>.ANr	r
rrr+rT>rrr+ceZdZfdZy)4TestMROEntry.test_mro_entry_with_builtins.<locals>.Cc4j|tfSr)r1dictr3s  rrzDTestMROEntry.test_mro_entry_with_builtins.<locals>.C.__mro_entries__@s

e$wrNrr5srrrV?s
rrceZdZy)4TestMROEntry.test_mro_entry_with_builtins.<locals>.DNr	r
rrr#rZErrr#r8)r%r=rXr>r?r@)rr+rr&r#rs     @rtest_mro_entry_with_builtinsz)TestMROEntry.test_mro_entry_with_builtins<s		
C$1aV,q$i0))Aq62Q4$89rcgGfdd}|jgGdd|t}|jd|tf|j|jtf|j|j|tf|j|j|tt
fy)NceZdZfdZy)6TestMROEntry.test_mro_entry_with_builtins_2.<locals>.Cc,j|fSrrL)rr4rrs  rrzFTestMROEntry.test_mro_entry_with_builtins_2.<locals>.C.__mro_entries__Ns

e$trNrrsrrr^Mr rrceZdZy)6TestMROEntry.test_mro_entry_with_builtins_2.<locals>.DNr	r
rrr#raSrrr#r8)r%rXr=r>r?r@)rr&r#rrs   @@rtest_mro_entry_with_builtins_2z+TestMROEntry.test_mro_entry_with_builtins_2Ks		
C$4aY/q$i0))At95Q4$89rcGdd}|}|jt5Gdd|}dddGdd}|}|jt5Gdd|}dddy#1swYDxYw#1swYyxYw)NceZdZdZy)6TestMROEntry.test_mro_entry_errors.<locals>.C_too_manycyrKr
)rr4	somethingothers    rrzFTestMROEntry.test_mro_entry_errors.<locals>.C_too_many.__mro_entries__[rNrr
rr
C_too_manyreZ
rrjceZdZy-TestMROEntry.test_mro_entry_errors.<locals>.DNr	r
rrr#rn_rrr#ceZdZdZy)5TestMROEntry.test_mro_entry_errors.<locals>.C_too_fewcyrKr
rs rrzETestMROEntry.test_mro_entry_errors.<locals>.C_too_few.__mro_entries__arirNrr
rr	C_too_fewrp`rkrrsceZdZyrmr	r
rrr#z-TestMROEntry.test_mro_entry_errors.<locals>.DerrassertRaises	TypeError)rrjr&r#rsrAs      rtest_mro_entry_errorsz"TestMROEntry.test_mro_entry_errorsYs		
L


y
)	AO			
K


y
)	AO		
				A6!B6A?BcGdd}|}|jt5Gdd|}dddGdd}|}|jt5Gdd|}dddy#1swYDxYw#1swYyxYw)NceZdZdZy)<TestMROEntry.test_mro_entry_errors_2.<locals>.C_not_callable	Surprise!Nrr
rrC_not_callabler|hs)Orr~ceZdZy/TestMROEntry.test_mro_entry_errors_2.<locals>.DNr	r
rrr#rlrrr#ceZdZdZy)9TestMROEntry.test_mro_entry_errors_2.<locals>.C_not_tuplectSr)r@rrs rrzITestMROEntry.test_mro_entry_errors_2.<locals>.C_not_tuple.__mro_entries__ns
rNrr
rrC_not_tuplerms
rrceZdZyrr	r
rrr#z/TestMROEntry.test_mro_entry_errors_2.<locals>.Drrrru)rr~r&r#rs     rtest_mro_entry_errors_2z$TestMROEntry.test_mro_entry_errors_2gs	*	*


y
)	AO			
M


y
)	AO		
				ryc$gGfddt}GddGfdd}|}Gdd||	}|jd
||jdd|jdf|jd
dd|j|jf|j|j|f|j|j|t
f|j|j|y)Nc"eZdZfdZxZS)3TestMROEntry.test_mro_entry_metaclass.<locals>.MetacRj||||gt|	||||Sr)rsuper__new__)mclsnamer4nsr2	meta_argss    rrz;TestMROEntry.test_mro_entry_metaclass.<locals>.Meta.__new__ws/  $eR!89wtT5"==r)r
rrr
__classcell__)r2rs@rMetarvs

>
>rrceZdZy)0TestMROEntry.test_mro_entry_metaclass.<locals>.ANr	r
rrr+rzrrr+ceZdZfdZy)0TestMROEntry.test_mro_entry_metaclass.<locals>.Cc
fSrr
)rr4r+s  rrz@TestMROEntry.test_mro_entry_metaclass.<locals>.C.__mro_entries__|s
trNr)r+srrr{s
rrceZdZdZy)0TestMROEntry.test_mro_entry_metaclass.<locals>.Dr$N)r
rrxr
rrr#rsArr#	metaclassrr$r)typer%r=r>r?r@r2)rrrr&r#r+rs     @@rtest_mro_entry_metaclassz%TestMROEntry.test_mro_entry_metaclassts		>4	>			
C	T	1t,1s+1t,1c*A.qd+))A40Q6N3d+rcGdd}|}|jtd5td|fidddy#1swYyxYw)NceZdZdZy)0TestMROEntry.test_mro_entry_type_call.<locals>.CcyrKr
)rr4s  rrz@TestMROEntry.test_mro_entry_type_call.<locals>.C.__mro_entries__rirNrr
rrrrrkrrz+MRO entry resolution; use types.new_class()Bad)assertRaisesRegexrwr)rrr&s   rtest_mro_entry_type_callz%TestMROEntry.test_mro_entry_type_callsO		
C

#
#I%<=	"
b!	"	"	"sAA	N)r
rrr'rBrQr[rbrxrrrr
rrrrs/(,(1*
::,,	"rrcTeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZy
)TestClassGetitemcgGfdd}|ttf|jd|ttff|jdiy)NceZdZfdZy).TestClassGetitem.test_class_getitem.<locals>.Cc,j||gyrr)rrgetitem_argss  r__class_getitem__z@TestClassGetitem.test_class_getitem.<locals>.C.__class_getitem__s##T6N3rNr
rrr)rsrrrs
rrrr$)intstrr%)rrrs  @rtest_class_getitemz#TestClassGetitem.test_class_getitemsO			
#s(a1sCj/:a"-rctGdd}|j|td|j||dy)NceZdZdZy)5TestClassGetitem.test_class_getitem_format.<locals>.Cc"d|jdS)NzC[]r
clsitems  rrzGTestClassGetitem.test_class_getitem_format.<locals>.C.__class_getitem__sDMM?!,,rNrr
rrrr
-rrC[int]zC[C]r%r)rrs  rtest_class_getitem_formatz*TestClassGetitem.test_class_getitem_formats6	-	-	
3*1v&rcGdd}Gdd|}|j|td|j||dy)NceZdZdZy):TestClassGetitem.test_class_getitem_inheritance.<locals>.Cc:|jd|jdSN[rrrs  rrzLTestClassGetitem.test_class_getitem_inheritance.<locals>.C.__class_getitem__,,qq99rNrr
rrrr
:rrceZdZy):TestClassGetitem.test_class_getitem_inheritance.<locals>.DNr	r
rrr#rrrr#D[int]D[D]rrrr#s   rtest_class_getitem_inheritancez/TestClassGetitem.test_class_getitem_inheritances=	:	:	3*1v&rcGdd}Gdd|}|j|td|j||dy)NceZdZdZy)<TestClassGetitem.test_class_getitem_inheritance_2.<locals>.Ccy)NzShould not see thisr
rs  rrzNTestClassGetitem.test_class_getitem_inheritance_2.<locals>.C.__class_getitem__s,rNrr
rrrrrrrceZdZdZy)<TestClassGetitem.test_class_getitem_inheritance_2.<locals>.Dc:|jd|jdSrrrs  rrzNTestClassGetitem.test_class_getitem_inheritance_2.<locals>.D.__class_getitem__rrNrr
rrr#rrrr#rrrrs   r test_class_getitem_inheritance_2z1TestClassGetitem.test_class_getitem_inheritance_2sB	-	-	:	:	
3*1v&rcGdd}Gdd|}|j|td|j||dy)NceZdZedZy):TestClassGetitem.test_class_getitem_classmethod.<locals>.Cc:|jd|jdSrrrs  rrzLTestClassGetitem.test_class_getitem_classmethod.<locals>.C.__class_getitem__s,,qq99rN)r
rrclassmethodrr
rrrrs

:
:rrceZdZy):TestClassGetitem.test_class_getitem_classmethod.<locals>.DNr	r
rrr#rrrr#rrrrs   rtest_class_getitem_classmethodz/TestClassGetitem.test_class_getitem_classmethods=	:	:	3*1v&rcGdd}Gdd|}|j|td|j||dy)NceZdZdZy)6TestClassGetitem.test_class_getitem_patched.<locals>.Cc*d}t||_y)Nc:|jd|jdSrrrs  rrzcTestClassGetitem.test_class_getitem_patched.<locals>.C.__init_subclass__.<locals>.__class_getitem__s!ll^1T]]O1==r)rr)rrs  r__init_subclass__zHTestClassGetitem.test_class_getitem_patched.<locals>.C.__init_subclass__s>(34E(F%rN)r
rrrr
rrrrs
GrrceZdZy)6TestClassGetitem.test_class_getitem_patched.<locals>.DNr	r
rrr#rrrr#rrrrs   rtest_class_getitem_patchedz+TestClassGetitem.test_class_getitem_patcheds?	G	G
	3*1v&rcGddt}Gdd|}|j|jd|t|j|jty)NceZdZdZdZy)<TestClassGetitem.test_class_getitem_with_builtins.<locals>.ANc||_yr)called_withrs  rrzNTestClassGetitem.test_class_getitem_with_builtins.<locals>.A.__class_getitem__s	"&r)r
rrrrr
rrr+rsK
'rr+ceZdZy)<TestClassGetitem.test_class_getitem_with_builtins.<locals>.BNr	r
rrrrrr)rXassertIsrr)rr+rs   r test_class_getitem_with_builtinsz1TestClassGetitem.test_class_getitem_with_builtinssE	'	'
		

ammT*	#

ammS)rcGdd}|jt5|tdddGdd}|jt5|tdddy#1swY;xYw#1swYyxYw)NceZdZdZy)=TestClassGetitem.test_class_getitem_errors.<locals>.C_too_fewcyrr
)rs rrzOTestClassGetitem.test_class_getitem_errors.<locals>.C_too_few.__class_getitem__rNrr
rrrsr
rrsceZdZdZy)>TestClassGetitem.test_class_getitem_errors.<locals>.C_too_manycyrr
)ronetwos   rrzPTestClassGetitem.test_class_getitem_errors.<locals>.C_too_many.__class_getitem__rrNrr
rrrjrrrrj)rvrwr)rrsrjs   rtest_class_getitem_errorsz*TestClassGetitem.test_class_getitem_errorsss		

y
)	cN			

y
)	sO		
				s
A$
A0$A-0A9c Gdd}|jt5|tdddGdd}|}d|_|jt5|tdddGdd}|jt5|tdddGdd	t}|jtd	5|tdddy#1swYxYw#1swY~xYw#1swYYxYw#1swYyxYw)
NceZdZdZy)7TestClassGetitem.test_class_getitem_errors_2.<locals>.Ccyrr
rs  rrzITestClassGetitem.test_class_getitem_errors_2.<locals>.C.__class_getitem__rrNrr
rrrrrrrceZdZy)7TestClassGetitem.test_class_getitem_errors_2.<locals>.ENr	r
rrr;rrrr;cy)NzThis will not workr
rs  r<lambda>z>TestClassGetitem.test_class_getitem_errors_2.<locals>.<lambda>srceZdZdZy)DTestClassGetitem.test_class_getitem_errors_2.<locals>.C_not_callabler}Nrr
rrr~rs +rr~ceZdZdZy)?TestClassGetitem.test_class_getitem_errors_2.<locals>.C_is_noneNrr
rr	C_is_noner
s $rr)rvrwrrtupler)rrr;er~rs      rtest_class_getitem_errors_2z,TestClassGetitem.test_class_getitem_errors_2s		

y
)	
CH		
CD


y
)	
cF		,	,


y
)	 3	 	%	%

#
#I{
;	cN		!				
	 	 
		s/C %
C,
C8
D C),C58DD
cTGddt}|j|tdy)NceZdZdZy);TestClassGetitem.test_class_getitem_metaclass.<locals>.Metac:|jd|jdSrrrs  rrzMTestClassGetitem.test_class_getitem_metaclass.<locals>.Meta.__class_getitem__rrNrr
rrrrrrrz	Meta[int]rr%r)rrs  rtest_class_getitem_metaclassz-TestClassGetitem.test_class_getitem_metaclasss$	:4	:	
cK0rclGddt}Gdd|}|j|tdy)NceZdZy)@TestClassGetitem.test_class_getitem_with_metaclass.<locals>.MetaNr	r
rrrrrrrceZdZdZy)=TestClassGetitem.test_class_getitem_with_metaclass.<locals>.Cc:|jd|jdSrrrs  rrzOTestClassGetitem.test_class_getitem_with_metaclass.<locals>.C.__class_getitem__rrNrr
rrrrrrrrrrrrrs   r!test_class_getitem_with_metaclassz2TestClassGetitem.test_class_getitem_with_metaclasss,4	:$	:	
3*rclGddt}Gdd|}|j|tdy)NceZdZdZy)ATestClassGetitem.test_class_getitem_metaclass_first.<locals>.Metacy)Nfrom metaclassr
rs  r__getitem__zMTestClassGetitem.test_class_getitem_metaclass_first.<locals>.Meta.__getitem__s'rN)r
rrr"r
rrrrs
(rrceZdZdZy)>TestClassGetitem.test_class_getitem_metaclass_first.<locals>.Ccy)Nzfrom __class_getitem__r
rs  rrzPTestClassGetitem.test_class_getitem_metaclass_first.<locals>.C.__class_getitem__s/rNrr
rrrr$s
0rrrr!rrs   r"test_class_getitem_metaclass_firstz3TestClassGetitem.test_class_getitem_metaclass_first
s1	(4	(	0$	0	
3!12rN)r
rrrrrrrrrrrrrr&r
rrrrs>.'''''
*.1+3rrceZdZdZy)CAPITestcddlm}m}|j|j	t
||t
}|j
t|||j|jdt
fGdd|}|j|jt
f|j|j|f|j|j|t
tfy)Nr)GenericGenericAliasr
ceZdZy) CAPITest.test_c_class.<locals>.CNr	r
rrrr-rrr)	_testcapir*r+assertIsInstancerrrrr%rr=r>r?r@)rr*r+
IntGenericrs     rtest_c_classzCAPITest.test_c_classs3g77<lKS\


d:&533B7#@	
	sf-))J=9QV$45rN)r
rrr1r
rrr(r(s6rr(__main__)
unittesttestrTestCaserrcpython_onlyr(r
mainr
rr<module>r8svN"8$$N"b{3x(({3|	
6x  
6
6 zHMMOr