python (3.11.7)

(root)/
lib/
python3.11/
test/
__pycache__/
test_descr.cpython-311.opt-1.pyc

eW2ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
mZddlmZddlmZ	ddlZn
#e$rdZYnwxYwGdde
jZGdde
jZGd	d
e
jZGdde
jZGd
de
jZGdde
jZGdde
jZGddeZGdde
jZe dkre
j!dSdS)N)deepcopy)redirect_stdout)supportceZdZdZddZd dZd!d
Zd"d
Zd#dZd$dZ	dZ
dZgfdZdZ
dZdZdZejddZejddZdZdS)%
OperatorsTestc*tjj|g|Ri|iddddddddd	d
ddd
d
dddddddddddddddddddd d!d"d#d$|_t	|jD].\}}|r|d%z}nd&|z}||j|</ddd'd(d)d*d+|_t	|jD].\}}|r|d,z}nd-|z}||j|</dS).Nadd+sub-mul*matmul@truediv/floordivz//divmodpowz**lshiftz<<rshiftz>>and&xor^or|cmplt<le<=eq==!=>>=)negtgez(a, b)za %s babs~intfloat)posnegr+invertr-r.z(a)z%s a)unittestTestCase__init__binopslistitemsislowerunops)selfargskwargsnameexprs     C/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/test/test_descr.pyr4zOperatorsTest.__init__s"49$999&999
3
3

3

c	


s




h

4

d

d

3

3

#

5

#
 
$!
"
$#
$)


.t{002233	%	%JD$||~~
'h$ $DK



tz//1122	$	$JD$||~~
%e|}#DJt	$	$len(a)__len__cd|i}|t|||t|}t||}||jvr|jd}||jv|t|d||j|||||t||}|||dS)Narim_funcassertEqualevaltypegetattr__dict__	__bases__)	r:rDresr>methdtmbms	         r?	unop_testzOperatorsTest.unop_testKs
!HdA,,,GGAt!*$$AA!*$$	
Iq111:d3CDDD1s###
Q

s#####r@a+b__add__c||d}|t|||t|}t||}||jvr|jd}||jv|t|d||j||||||t||}	||	||dS)NrDbrrErF)
r:rDrXrMr>rNrOrPrQrRs
          r?
binop_testzOperatorsTest.binop_test[s!dA,,,GGAt!*$$AA!*$$	
Iq111:d3CDDD1a#&&&
Q

A$$$$$r@a[b:c]__getitem__c	|||d}|t|||t|}t||}	||jvr|jd}||jv|t|	d|	|j|||	|t
|||t||}
||
t
|||dS)NrDrXcrrE)rGrHrIrJrKrLslice)r:rDrXr^rMr>rNrOrPrQrRs           r?sliceop_testzOperatorsTest.sliceop_testjs!!$$dA,,,GGAt!*$$AA!*$$	
Iq111:d3CDDD1eAqkk**C000
Q

E!QKK#.....r@a+=b__iadd__c|t||d}t||||d|t|}t	||}||jvr|jd}||jv|t	|d||j|t||d<||d|||d|t||d<t	|d|}	|	|||d|dS)NrWrDrrErexecrGrIrJrKrL)
r:rDrXrMstmtrNrOrPrQrRs
          r?
setop_testzOperatorsTest.setop_testxs31++A&&T1


3%%%GGAt!*$$AA!*$$	
Iq111:d3CDDD!#	!C&!3%%%!#
QsVT
"
"
13%%%%%r@a[b]=c__setitem__ct|||d}t||||d|t|}t	||}	||jvr|jd}||jv|t	|	d|	|j|t||d<|	|d||||d|t||d<t	|d|}
|
||||d|dS)Nr]rDrrErd)r:rDrXr^rMrfrNrOrPrQrRs           r?set2op_testzOperatorsTest.set2op_tests91++AA..T1


3%%%GGAt!*$$AA!*$$	
Iq111:d3CDDD!#	!C&!Q3%%%!#
QsVT
"
"
1a3%%%%%r@a[b:c]=dct||||d}t||||d|t|}	||	jvr|	jd}	||	jvt
|	|}
|t
|
d|
|	j|t||d<|
|dt|||||d|t||d<t
|d|}|t|||||d|dS)N)rDrXr^rOrDrrE)rrerGrIrKrLrJr_)r:rDrXr^rOrMrfrN
dictionaryrPrQrRs            r?setsliceop_testzOperatorsTest.setsliceop_testsT#A;;QQQ??
T:C#...GG!*$$AA!*$$At	
Iq111:d3CDDD"1++
3	*S/5A;;***C#..."1++
3
Z_d
+
+
5A;;C#.....r@c	|dgdgddgdd|gddddd|gddd	dd|gdddd
d|gdd	dddgdd|dgdgddgd
d|ddgdgddd|gdddd|ddgdgddd|ddgdgddd|ddgddddgdd|gdddddggddddS) NrTrUrqrrb in a__contains__ra[b]r[rZrarbrtrqrrrqrrrqrra*=b__imul__rArBa*b__mul__b*a__rmul__rhrirqrrrtrwrqrrrwrl)rYr`rgrSrkror:s r?
test_listszOperatorsTest.test_listss	
aS1Q%	:::Ax@@@Ax@@@Av}==='''1a!A-HHHaS1Q%<<<1q---DDDwww8Y7771q---	BBB1q---
CCC!A1qeX}EEEYYY1qeYYY
%	'	'	'	'	'r@c	|ddddddd|ddddddd|ddddddd	ddd}g}t|D]}||g}t	|D]}|||||g}|D]}|||||g}t|D]}|||||ddd}||dd
d|tt|i||t|i||ddddddddd
dddS)Nrrrwrqrtrqrurvrrxr[rArBrtrsrhri)
rYr6keysappenditerrG__iter__dictrSrHrepr__repr__rk)r:rOl1ils     r?
test_dictszOperatorsTest.test_dictss1q		1a>BBB1q		1a>BBB1q		1a???AJJ
affhh		AIIaLLLLa		A
HHQKKKKB		A
HHQKKKKBq!!		A
HHQKKKKBAJJq!Xy111d1ggr**A...ajjllB//333AAqQQ--%	'	'	'	'	'r@c||d}|jD]G\}}||vr>d|z}t||r)t||}||||||Ht|jD]F\}}||vr=d|z}t||r(t||}|||||GdS)NrWz__%s__)r5r7hasattrrHrYr6r9rS)r:rDrXskiprr=r>rMs        r?number_operatorszOperatorsTest.number_operatorssQ+++--	;	;JD$4$1d##;tT**COOAq#tT:::tz//1122	7	7JD$4$1d##7tT**CNN1c4666	7	7r@c|dd|dd|ddGddt}||dd	|dz|d	dS#t
$rYdSwxYw)
NdrtrqrceZdZdZdS)"OperatorsTest.test_ints.<locals>.CctSNNotImplementedr:others  r?rUz*OperatorsTest.test_ints.<locals>.C.__add__%%r@N)__name__
__module____qualname__rUr@r?Cr#
&
&
&
&
&r@rrz+NotImplemented should have caused TypeError)rrG__bool__r-fail	TypeErrorr:rs  r?	test_intszOperatorsTest.test_intssc1%%%!+++!+++	&	&	&	&	&	&	&	&	
1q!!!	E
ACC"HH
IICDDDDD			DD	s
B>>
CCc2|dddS)NgY@@)rrs r?test_floatszOperatorsTest.test_floatsseS)))))r@c|ddgdGddt}|dd	}|t|d
||jd||d	}|t|d||jd|d
}|t|d||jddS)NyY@@)	rr!r)r*r-r.rrmod)rc$eZdZdgZdZdZeZdS),OperatorsTest.test_complexes.<locals>.Numberprecc`tj|g|R}|dd|_|S)Nr)complex__new__getr)clsr;kwdsresults    r?rz4OperatorsTest.test_complexes.<locals>.Number.__new__s3 4t444"hhvr22
r@c|j}|jdkrd||jfzS|jdkrd||jfzSd||j||jfzS)N%.*gz%.*gjz(%.*g+%.*gj))rimagreal)r:rs  r?rz5OperatorsTest.test_complexes.<locals>.Number.__repr__s_y9##!T49$5559##"dDI%666%ty$	(JJJr@N)rrr	__slots__rr__str__rr@r?Numberr
s=I



K
K
KGGGr@rgQ	@rrz3.14rrz3.1gPm@z234.5r)rrrGrr)r:rrDs   r?test_complexeszOperatorsTest.test_complexess9fd2O2O2O	P	P	P
	
	
	
	
	W
	
	
	
F4a   a&)))###F11a%(((###F5MMa'***$$$$$r@c|tddtdd|tddddS)Nrg@rrqg)rGr__radd__r.__rsub__rs r?test_explicit_reverse_methodsz+OperatorsTest.test_explicit_reverse_methods(s\))"c22GC4E4EFFFQ//66666r@"the module 'xxsubtype' is internalc
dddl}ddl}d%d}||j|j<||dg|dg|ddgdd||gddddd	||gdd
ddd	||gddddd||gddd|ddgd
d||dg|dg|ddgdd||ddgd|gddd||gdddd||ddgd|gddd||ddgd|gddd||ddgdd|ddgdd|	|gddd|ddg|gdd dGd!d"|j}|}|
|g|
|d|d#|
|d#g|
|
d|d$|
|
d$dS)&Nrc4ddl}||SNr)	xxsubtypespamlist)rmemospams   r?rz/OperatorsTest.test_spam_lists.<locals>.spamlist2s $$$$==###r@rqrrrTrUrsrurvrwrxr[rZrarbrtryrzr{rArBr|r}r~rrhrirrrrrlceZdZdZdS)(OperatorsTest.test_spam_lists.<locals>.CcdSNrqrrs r?fooz,OperatorsTest.test_spam_lists.<locals>.C.fooO!!r@Nrrrrrr@r?rrN#####r@rr*r)copyr_deepcopy_dispatchrrYr`rgrSrkrorGrrgetstatesetstate)r:rrrrrDs      r?test_spam_listszOperatorsTest.test_spam_lists-s	'&&&&&&&	$	$	$	$
2:
.!

xx}}hh!uoou 	"	"	"))1a>JJJ))1a>JJJ))1aGGG((777++Q88QqE??H'	)	)	)!

xx}}hh!uoov"	$	$	$!AHH]]],C,CV"	$	$	$xx((!XyAAA!AHH]]],C,CU!	#	#	#!AHH]]],C,CU"	$	$	$1Q%!Q!A&	(	(	(XXiii00!Q!A%Xiii00*m	M	M	M	$	$	$	$	$
	$	$	$
ACCB!$$$	


SE"""q)))	

2r*****r@cddl}ddl}dd}||j|j<||ddddddd||ddddddd||dddddd	d
|ddd}g}t|D]}||g}t|D]}|||	||g}|
D]}|||	||g}t|i
|D]}|||	||ddd}||}	||	ddd||	t|d
d||ddddd|ddddddGdd|j}
|
}|	t|g|	|dd|d<|	t|dg|	|d|d|	|ddS)Nrcddl}|}t|D]
\}}|||<|Sr)rspamdictr6r7)rOrrsdkvs      r?rz/OperatorsTest.test_spam_dicts.<locals>.spamdict]sL$$$$BQWWYY

11Ir@rrrwrrqrurvrxr[rArBzrepr(a)rrtrsrhriceZdZdZdS)(OperatorsTest.test_spam_dicts.<locals>.CcdSrrrs r?rz,OperatorsTest.test_spam_dicts.<locals>.C.foorr@Nrrr@r?rrrr@rbarrrrrr)rrrrrYr6rrrrGrrIrSrrkr7rrr)r:rrrrOrrr	straightdspamdrrDs            r?test_spam_dictszOperatorsTest.test_spam_dictsYsu	'&&&&&&&				2:
.A++Q8^LLLA++Q8^LLLA++Q6=IIIHAYY
affhh		AIIaLLLLa		A
HHQKKKKB		A
HHQKKKKBhhrll##,,Q//		A
HHQKKKKBAJJ	##ua9555ud9ooy*EEEQ)),,aHHA]]4K4K]	,	,	,	$	$	$	$	$
	$	$	$
ACCaggii"---!$$$%aggii>*:;;;q)))	

3s+++++r@c|ttjtjdSr)rGrangesysmaxsizerBrs r?test_wrap_lenfunc_bad_castz(OperatorsTest.test_wrap_lenfunc_bad_casts6s{++3355s{CCCCCr@N)rArB)rTrU)rZr[)rarb)rhri)rlri)rrrr4rSrYr`rgrkrorrrrrrrrimpl_detailrrrrr@r?rrs}.$.$.$`$$$$ 
%
%
%
%////&&&&&&&&&&////&'''"'''<+-7777"EEE$***%%%B777
W=>>)+)+?>)+VW=>>/,/,?>/,bDDDDDr@rceZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZfdZejdZejddZdZejdZejddZdZ dZ!dZ"e#j$dZ%d Z&e#j$d!Z'd"Z(d#Z)d$Z*d%Z+ejd&d'Z,d(Z-d)Z.d*Z/d+Z0e#j1e2j3j4d,kd-d.Z5ej6d/Z7d0Z8d1Z9d2Z:fd3Z;d4Z<d5Z=d6Z>d7Z?d8Z@d9ZAd:ZBd;ZCd<ZDd=ZEd>ZFd?ZGd@ZHdAZIdBZJdCZKdDZLdEZMdFZNdGZOdHZPdIZQdJZRdKZSdLZTdMZUdNZVdOZWdPZXdQZYdRZZdSZ[dTZ\dUZ]dVZ^dWZ_dXZ`dYZadZZbd[Zcd\Zdejd]d^Zed_Zfd`ZgdaZhdbZidcZjddZkejldedfZmdgZndhZodiZpdjZqdkZrdlZsdmZtdnZudoZvdpZwdqZxdrZydsZzdtZ{duZ|dvZ}dwZ~dxZdyZdzZd{Zd|Zd}Zd~ZdZfdZe#j1eduddZdZdZxZS)ClassPropertiesAndMethodscX|t|||d|dS)Nz has no attribute )
assertTruerr:objr=s   r?
assertHasAttrz'ClassPropertiesAndMethods.assertHasAttrsAT**47CC>	@	@	@	@	@r@cX|t|||d|dS)Nz has unexpected attribute )assertFalserrs   r?assertNotHasAttrz*ClassPropertiesAndMethods.assertNotHasAttrsCd++=@SS$$G	I	I	I	I	Ir@ctttitt}|i|jt|tGfddt}t|t|d}|jd|dd}|ddko|dd|}|jd	|d	|	d
|jd
|d
|	d|jd|d|dd
d
|d<|dd
d}t|D]/}|||<t|D]}||z|||<0t|D]9}t|D]'}|||||z(:dS)Nc:eZdZdZfdZdZfdZdZdZdS)6ClassPropertiesAndMethods.test_python_dicts.<locals>.Cc|r0t|d|d|_|r,t|D]\}}|||<dSdSNrqr)rGlenstater6r7)
self_localrDkwrrr:s     r?r4z?ClassPropertiesAndMethods.test_python_dicts.<locals>.C.__init__s},$$SVVQ///'(tJ$* $RXXZZ 0 0**1()
1

****r@c.||dSr)rr:keys  r?r[zBClassPropertiesAndMethods.test_python_dicts.<locals>.C.__getitem__sxxQ'''r@c|tdt|||dSr)assertIsInstancerIrri)r	r
valuer:s   r?rizBClassPropertiesAndMethods.test_python_dicts.<locals>.C.__setitem__s=%%c477333  S%88888r@c||_dSrrr:rs  r?rz?ClassPropertiesAndMethods.test_python_dicts.<locals>.C.setstate
"


r@c|jSrrrs r?rz?ClassPropertiesAndMethods.test_python_dicts.<locals>.C.getstate
z!r@N)	rrrrr4r[rirrrsr?rrsyE
*
*
*
*
*
(
(
(
9
9
9
9
9
#
#
#
"
"
"
"
"r@rrrqrrrrrrr
r2)r
issubclassrrrGassertIs	__class__rrrr)	r:rOra1a2rDNrjs	`        r?test_python_dictsz+ClassPropertiesAndMethods.test_python_dictss
4..///b$'''FFB

ak4(((a&&&	"	"	"	"	"	"	"	"	"	"$	

1d++,,,
QrUU2&&&
Q1!___A%1BqE5999
ACC"%%%r***	

1


!$$$q)))	

2"%%%r***2""""2###q		A133AaD1XX

A#!Q
q	/	/A1XX
/
/  1a!A#....
/	/	/r@cRGddt}|}|gd||dd||dd||dd	||dd
ddS)NceZdZdZdS)6ClassPropertiesAndMethods.test_python_lists.<locals>.Cct|tr|j|jfSt||dzSNr)
isinstancer_startstopr6r[r:rs  r?r[zBClassPropertiesAndMethods.test_python_lists.<locals>.C.__getitem__s=a''+7AF?*''a00366r@Nrrrr[rr@r?rr$s#
7
7
7
7
7r@rrrqrrrrrqerrf)rr/)r6extendrGr:rrDs   r?test_python_listsz+ClassPropertiesAndMethods.test_python_listss	7	7	7	7	7	7	7	7

ACC	1s###1s###1s###3s7Y/////r@cGddt}|}||d|d||dGddt}Gdd	|}||||}||j|Gd
dt}Gdd|}||jd
|}||jd
GddtGfddt}Gdd|}||jd||j	d|
d|j|}||dGfddtGdd}	Gdd|	}
Gdd|	}Gdd	||
}||
dGdd |
|}||
d!Gfd"d#tGd$d}	|	}||d%d&|_||jd&||jd'Gd(d)}Gd*d|}	Gd+d|	}
Gd,d|	}Gd-d	||
}||jdGfd.d/tGd0d}|jd
|}|t|||jd
Gd1dt}|}||d2n#t&$rYnwxYwGd3dt}	Gd4dt}
Gd5dt|	}Gd6d	|
|}||	t|gGfd7d8t}
Gfd9d:|
}Gd;d|
}	|d8gGd<d|}
|d:d8gGd=d|	|
}|d:d8g|
d>|jGd?d@|
|	}|d:d8g|
d>|jGdAd	|t}|d:d8g|
d>|jGdBd ||
}|d:d8g|
d>|jtfdC}GdDdE|}GdFdGt|}GdHdI||}||||||gGfdJdK}GfdLdM|}GdNd|}	||t|	|dKg|dKgGdOd|}
||t|
|dMdKg|dMdKgGdPd|	|
}||t||dMdKg|dMdKgGdQd@|
|	}||t||dMdKg|dMdKg|t&5GdRd	|t}dddn#1swxYwYGdSd ||}||t||dMdKg|dMdKgGdTdUt|}||t||dMdKg|dMdKgGdVdW|t}||t||dMdKg|dMdKg|t&5GdXdE|t1}dddn#1swxYwY|t&5GdYdEt1|}ddddS#1swxYwYdS)ZNc eZdZdZdZdZdS)3ClassPropertiesAndMethods.test_metaclass.<locals>.Ccd|_dSr	_C__staters r?r4z<ClassPropertiesAndMethods.test_metaclass.<locals>.C.__init__
 r@c|jSrr7rs r?rz<ClassPropertiesAndMethods.test_metaclass.<locals>.C.getstate
|#r@c||_dSrr7rs  r?rz<ClassPropertiesAndMethods.test_metaclass.<locals>.C.setstate
$r@Nrrrr4rrrr@r?rr5A
!
!
!
$
$
$
%
%
%
%
%r@r	metaclassrrceZdZdZdS)<ClassPropertiesAndMethods.test_metaclass.<locals>._metaclassc|Srrrs r?myselfzCClassPropertiesAndMethods.test_metaclass.<locals>._metaclass.myselfsCZr@N)rrrrFrr@r?
_metaclassrCs'''''r@rGceZdZdS3ClassPropertiesAndMethods.test_metaclass.<locals>.DNrrrrr@r?DrJDr@rLceZdZdZdS)4ClassPropertiesAndMethods.test_metaclass.<locals>.M1cFd|d<t||||S)Nrq__spam__rIr)rr=basesrs    r?rz<ClassPropertiesAndMethods.test_metaclass.<locals>.M1.__new__s$#$Z ||Cud;;;r@Nrrrrrr@r?M1rOs#
<
<
<
<
<r@rUceZdZdSr5NrKrr@r?rz3ClassPropertiesAndMethods.test_metaclass.<locals>.CrMr@rqceZdZdS);ClassPropertiesAndMethods.test_metaclass.<locals>._instanceNrKrr@r?	_instancerYrMr@rZc0eZdZedZfdZdS)4ClassPropertiesAndMethods.test_metaclass.<locals>.M2cdt|}||_||_||_|Sr)objectrr=rSr)rr=rSrr:s     r?rz<ClassPropertiesAndMethods.test_metaclass.<locals>.M2.__new__s-~~c** 	"
 	r@c	}|jD]H}|drt|||j|||I|S)N__)r
startswithsetattr__get__)r:itr
rZs   r?__call__z=ClassPropertiesAndMethods.test_metaclass.<locals>.M2.__call__shY[[9GGC~~d++! BTYs^%;%;B%E%EFFFF	r@N)rrrstaticmethodrre)rZsr?M2r\sG


\







r@rgceZdZdZdS)r5cdSNrrrs r?rz8ClassPropertiesAndMethods.test_metaclass.<locals>.C.spamrr@Nrrrrrr@r?rz3ClassPropertiesAndMethods.test_metaclass.<locals>.C#




r@rrrc"eZdZfdZxZS);ClassPropertiesAndMethods.test_metaclass.<locals>.autosuperct|||||}|dddkr|dd}|dddk|rd|z}nd}t||t||S)Nrq_z
_%s__super__super)superrrb)rAr=rSrrr	autosupers     r?rzCClassPropertiesAndMethods.test_metaclass.<locals>.autosuper.__new__sIy1199):>tMM2A2h#oo8D2A2h#oo%'$.DD$DT5::...
r@rrrr
__classcell__)rrts@r?rtros>









r@rtceZdZdZdS)3ClassPropertiesAndMethods.test_metaclass.<locals>.AcdSNArrs r?rNz8ClassPropertiesAndMethods.test_metaclass.<locals>.A.meth&sr@NrrrrNrr@r?r{rx%#




r@r{ceZdZdZdS)3ClassPropertiesAndMethods.test_metaclass.<locals>.Bc:d|jzSNB	_B__superrNrs r?rNz8ClassPropertiesAndMethods.test_metaclass.<locals>.B.meth)T\..0000r@Nr}rr@r?rr(#
1
1
1
1
1r@rceZdZdZdS)r5c:d|jzSNr	_C__superrNrs r?rNz8ClassPropertiesAndMethods.test_metaclass.<locals>.C.meth,rr@Nr}rr@r?rz3ClassPropertiesAndMethods.test_metaclass.<locals>.C+rr@ceZdZdZdS)rJc:d|jzSNrL)	_D__superrNrs r?rNz8ClassPropertiesAndMethods.test_metaclass.<locals>.D.meth/rr@Nr}rr@r?rLz3ClassPropertiesAndMethods.test_metaclass.<locals>.D.rr@DCBAceZdZdZdS)3ClassPropertiesAndMethods.test_metaclass.<locals>.Ec:d|jzS)NE)	_E__superrNrs r?rNz8ClassPropertiesAndMethods.test_metaclass.<locals>.E.meth3rr@Nr}rr@r?rr2rr@rEBCAc"eZdZfdZxZS)>ClassPropertiesAndMethods.test_metaclass.<locals>.autopropertyci}|D]\}}|dr-|dd}||d\}}|}||f||<G|dr,|dd}||d\}}|}||f||<|D]\}\}}t||||<t	
|||||S)N_get_rNN_set_)r7rarpropertyrsr)rAr=rSrhitsr
valrsetrautopropertys         r?rzFClassPropertiesAndMethods.test_metaclass.<locals>.autoproperty.__new__:s $


-
-HC~~g..	-!!""g#'88C#>#>S!$'HS		00-!!""g#'88C#>#>S!$'HS	'+zz||33OC#s (c 2 2DII\955==i<@%OOOr@ru)rrs@r?rr7sH
O
O
O
O
O
O
O
O
O
Or@rceZdZdZdZdS)rxc|jSr_A__xrs r?_get_xz:ClassPropertiesAndMethods.test_metaclass.<locals>.A._get_xLsy r@c||_dSrrr:xs  r?_set_xz:ClassPropertiesAndMethods.test_metaclass.<locals>.A._set_xNs2r@N)rrrrrrr@r?r{z3ClassPropertiesAndMethods.test_metaclass.<locals>.AKs2
!
!
!




r@rriceZdZdS)@ClassPropertiesAndMethods.test_metaclass.<locals>.multimetaclassNrKrr@r?multimetaclassrVDr@rceZdZdZdS)rxcdSrzrrs r?rz:ClassPropertiesAndMethods.test_metaclass.<locals>.A._get_xZr|r@Nrrrrrr@r?r{z3ClassPropertiesAndMethods.test_metaclass.<locals>.AYr~r@ceZdZdZdS)rc:d|jzSr)rrrs r?rz:ClassPropertiesAndMethods.test_metaclass.<locals>.B._get_x]T\002222r@Nrrr@r?rz3ClassPropertiesAndMethods.test_metaclass.<locals>.B\#
3
3
3
3
3r@ceZdZdZdS)r5c:d|jzSr)rrrs r?rz:ClassPropertiesAndMethods.test_metaclass.<locals>.C._get_x`rr@Nrrr@r?rz3ClassPropertiesAndMethods.test_metaclass.<locals>.C_rr@ceZdZdZdS)rJc:d|jzSr)rrrs r?rz:ClassPropertiesAndMethods.test_metaclass.<locals>.D._get_xcrr@Nrrr@r?rLz3ClassPropertiesAndMethods.test_metaclass.<locals>.Dbrr@ceZdZdZfdZdS)3ClassPropertiesAndMethods.test_metaclass.<locals>.Trc(xjdz
c_dSrcounter)r:r;Ts  r?r4z<ClassPropertiesAndMethods.test_metaclass.<locals>.T.__init__js		Q				r@N)rrrrr4)rsr?rrhs3G






r@rceZdZdSrWrKrr@r?rz3ClassPropertiesAndMethods.test_metaclass.<locals>.ClrMr@ceZdZdSrWrKrr@r?rz3ClassPropertiesAndMethods.test_metaclass.<locals>.Csr@z5calling object w/o call method should raise TypeErrorceZdZdZdS)rxc$tj|i|SrrRr;r<s  r?rz;ClassPropertiesAndMethods.test_metaclass.<locals>.A.__new__|s|T4V444r@NrTrr@r?r{z3ClassPropertiesAndMethods.test_metaclass.<locals>.A{#
5
5
5
5
5r@ceZdZdSrNrKrr@r?rz3ClassPropertiesAndMethods.test_metaclass.<locals>.BrMr@ceZdZdSrWrKrr@r?rz3ClassPropertiesAndMethods.test_metaclass.<locals>.CrMr@ceZdZdSrIrKrr@r?rLz3ClassPropertiesAndMethods.test_metaclass.<locals>.DrMr@cHeZdZefdZedZxZS)7ClassPropertiesAndMethods.test_metaclass.<locals>.AMetacvdt||||S)NAMetarrsrmclsr=rSnsr	new_callss    r?rz?ClassPropertiesAndMethods.test_metaclass.<locals>.AMeta.__new__3  )))wwtT5"===r@ciSrr)rr=rSs   r?__prepare__zCClassPropertiesAndMethods.test_metaclass.<locals>.AMeta.__prepare__s	r@rrrrfrclassmethodrrvrrs@r?rrsc

>
>
>
>
>\
>

[




r@rcLeZdZefdZefdZxZS)7ClassPropertiesAndMethods.test_metaclass.<locals>.BMetacvdt||||S)NBMetarrs    r?rz?ClassPropertiesAndMethods.test_metaclass.<locals>.BMeta.__new__rr@cVt||}d|d<|S)NTBMeta_was_here)rsr)rr=rSrrs    r?rzCClassPropertiesAndMethods.test_metaclass.<locals>.BMeta.__prepare__s,WW((u55'+#$	r@rrs@r?rrsm

>
>
>
>
>\
>



[




r@rceZdZdSrxNrKrr@r?r{z3ClassPropertiesAndMethods.test_metaclass.<locals>.ArMr@ceZdZdSrrKrr@r?rz3ClassPropertiesAndMethods.test_metaclass.<locals>.BrMr@ceZdZdSrWrKrr@r?rz3ClassPropertiesAndMethods.test_metaclass.<locals>.CrMr@rceZdZdS4ClassPropertiesAndMethods.test_metaclass.<locals>.C2NrKrr@r?C2rrMr@rceZdZdSrIrKrr@r?rLz3ClassPropertiesAndMethods.test_metaclass.<locals>.DrMr@ceZdZdSrNrKrr@r?rz3ClassPropertiesAndMethods.test_metaclass.<locals>.ErMr@cSrr)r;r<markers  r?funcz6ClassPropertiesAndMethods.test_metaclass.<locals>.funcsMr@ceZdZdS3ClassPropertiesAndMethods.test_metaclass.<locals>.XNrKrr@r?XrrMr@rceZdZdS)3ClassPropertiesAndMethods.test_metaclass.<locals>.YNrKrr@r?YrrMr@rceZdZdS)3ClassPropertiesAndMethods.test_metaclass.<locals>.ZNrKrr@r?ZrrMr@rc<eZdZfdZefdZxZS):ClassPropertiesAndMethods.test_metaclass.<locals>.ANotMetacpdt|SNANotMetarrr;r<rrs   r?rzBClassPropertiesAndMethods.test_metaclass.<locals>.ANotMeta.__new__-  ,,,wwt,,,r@c2diSrr)rr=rS
prepare_callss   r?rzFClassPropertiesAndMethods.test_metaclass.<locals>.ANotMeta.__prepare__s$$Z000	r@rrrrrrrvrrrs@r?rrsc
-
-
-
-
-
-



[




r@rc>eZdZfdZefdZxZS):ClassPropertiesAndMethods.test_metaclass.<locals>.BNotMetacpdt|SNBNotMetarrs   r?rzBClassPropertiesAndMethods.test_metaclass.<locals>.BNotMeta.__new__rr@crdt||Sr)rrsr)rr=rSrrs   r?rzFClassPropertiesAndMethods.test_metaclass.<locals>.BNotMeta.__prepare__s1$$Z000ww**4777r@rrs@r?r	rsh
-
-
-
-
-
-
8
8
8
8
8[
8
8
8
8
8r@r	ceZdZdSrrKrr@r?r{z3ClassPropertiesAndMethods.test_metaclass.<locals>.ArMr@ceZdZdSrrKrr@r?rz3ClassPropertiesAndMethods.test_metaclass.<locals>.BrMr@ceZdZdSrWrKrr@r?rz3ClassPropertiesAndMethods.test_metaclass.<locals>.CrMr@ceZdZdSrrKrr@r?rz4ClassPropertiesAndMethods.test_metaclass.<locals>.C2rMr@ceZdZdSrIrKrr@r?rLz3ClassPropertiesAndMethods.test_metaclass.<locals>.D
r@ceZdZdSrrKrr@r?rz3ClassPropertiesAndMethods.test_metaclass.<locals>.ErMr@ceZdZdS)3ClassPropertiesAndMethods.test_metaclass.<locals>.FNrKrr@r?FrrMr@rceZdZdS)4ClassPropertiesAndMethods.test_metaclass.<locals>.F2NrKrr@r?F2r rMr@rceZdZdSrrKrr@r?rz3ClassPropertiesAndMethods.test_metaclass.<locals>.X+rr@ceZdZdSrrKrr@r?rz3ClassPropertiesAndMethods.test_metaclass.<locals>.X.rr@)rIrGrrrFrrQr^r=rSassertInrrrNrrrrrrrclearrKassertRaisesr-)r:rrDrGrLrOrUr^rgr{rrrrrrrrrrrr	rrrrZrrtrrrs                        @@@@@@@r?test_metaclassz(ClassPropertiesAndMethods.test_metaclasssU	%	%	%	%	%$	%	%	%	%
ACCq)))	

2r***	(	(	(	(	(	(	(	(					*				Q'''
ACCa(((	<	<	<	<	<	<	<	<					"				Q'''
ACCQ'''																		 					"					
%%%"%%%

faf%%%
ACC2&&&															)					1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	1	11	1	1	1	
V,,,	1	1	1	1	11	1	1	1	
V,,,	O	O	O	O	O	O	O4	O	O	O(					,				

ACCa%%%b!!!#&&&					\9								.					3	3	3	3	3	3	3	3	3	3	3	3	3	3	3	3	3	3	3	3	31	3	3	3	
'''															!				A&&&
ACCa!$$$A&&&
ACC
QSSSii$%%%%$$
	5	5	5	5	5	5	5	5													!									1			

aa!!!								D																	E											%				'I...					%					
'7+Y777					1				
'7+Y777

&
333					A			'7+Y777

&444					T				'7+Y777

&
333					U				'7+Y777

&
333										$									$									T				

fa   

fa   

fa   
												8	8	8	8	8	8	8	8x	8	8	8					(				

hQ(((*}555*y111					(				

hQ(((*j1=AAA*j19===					1			

hQ(((*j19===*j1=AAA					A			

hR)))*j19===*j1=AAA

y
)
)		




A



																				X				

hQ(((*j19===*j1=AAA					!			

hQ(((*j19===*j1=AAA					FHH			

hR)))*j19===*j1=AAA

y
)
)		




Asuu


															

y
)
)		




CEE1


																		sH%
R
RR)hhh'ppp4qq!$q!c	gttGfdd}|d}d|_|j}|`|gd	Gddtjt}|dn#t$rYnwxYwd		Gd
d	fdtd
D}|
|dS)Nc>eZdZfdZfdZfdZfdZdS)<ClassPropertiesAndMethods.test_module_subclasses.<locals>.MMc4||dSr)r4)r:r=MTs  r?r4zEClassPropertiesAndMethods.test_module_subclasses.<locals>.MM.__init__6sD$'''''r@c^d|f||S)NrJ)r__getattribute__r:r=r"logs  r?r$zMClassPropertiesAndMethods.test_module_subclasses.<locals>.MM.__getattribute__8s0

It,---**4666r@cfd||f|||dS)Nrb)r__setattr__)r:r=rr"r&s   r?r(zHClassPropertiesAndMethods.test_module_subclasses.<locals>.MM.__setattr__;s8

ItU3444tT511111r@cbd|f||dS)Ndelattr)r__delattr__r%s  r?r+zHClassPropertiesAndMethods.test_module_subclasses.<locals>.MM.__delattr__>s4

It,---tT*****r@N)rrrr4r$r(r+)r"r&sr?MMr 5s
(
(
(
(
(
7
7
7
7
7
7
2
2
2
2
2
2
+
+
+
+
+
+
+
+r@r,rDr))rbrrrJr)r*rceZdZdS)@ClassPropertiesAndMethods.test_module_subclasses.<locals>.ModuleNrKrr@r?Moduler/Krr@r0z?inheriting from ModuleType and str at the same time should failchdtjtjdS)Nrr)r)joinrandomchoicesstring
ascii_lettersrr@r?random_namezEClassPropertiesAndMethods.test_module_subclasses.<locals>.random_nameTs&776>&*>"EEEFFFr@ceZdZdS);ClassPropertiesAndMethods.test_module_subclasses.<locals>.ANrKrr@r?r{r9VrMr@r{cDg|]}tfiSrrI).0rr{r7s  r?
<listcomp>zDClassPropertiesAndMethods.test_module_subclasses.<locals>.<listcomp>Xs-HHHd;;==1$33HHHr@r)rIrrrGtypes
ModuleTypestrrrr__subclasses__)
r:r,rDrr0
subclassesr{r"r&r7s
      @@@@r?test_module_subclassesz0ClassPropertiesAndMethods.test_module_subclasses1s
#YY	+	+	+	+	+	+	+	+	+	+	+
BsGG
E
E333	4	4	4
	%




)3




II$
%
%
%
%			D		G	G	G								HHHHHU3ZZHHH
))++Z88888s B
B! B!c:Gddt}||d|d||dGfddt}|}|t|gd|d<|t|d	g||dd||d|d||d||j|ttfGd
dt}Gdd
|t
}||	d|t|d||	d|t|ddS)Nc eZdZdZdZdZdS)>ClassPropertiesAndMethods.test_multiple_inheritance.<locals>.Ccd|_dSrr7rs r?r4zGClassPropertiesAndMethods.test_multiple_inheritance.<locals>.C.__init__^r9r@c|jSrr7rs r?rzGClassPropertiesAndMethods.test_multiple_inheritance.<locals>.C.getstate`r;r@c||_dSrr7rs  r?rzGClassPropertiesAndMethods.test_multiple_inheritance.<locals>.C.setstatebr=r@Nr>rr@r?rrF]r?r@rrrceZdZfdZdS)>ClassPropertiesAndMethods.test_multiple_inheritance.<locals>.Dcvti||dSr)rIr4rs r?r4zGClassPropertiesAndMethods.test_multiple_inheritance.<locals>.D.__init__is5R!!$'''

4     r@Nrrrr4rsr?rLrKhs.
!
!
!
!
!
!
!r@rLworldhello)rPrOceZdZdZdZdS)AClassPropertiesAndMethods.test_multiple_inheritance.<locals>.NodecDt|Sr)r-rrs r?__int__zIClassPropertiesAndMethods.test_multiple_inheritance.<locals>.Node.__int__xs488::&r@cdS)N23rrs r?rzEClassPropertiesAndMethods.test_multiple_inheritance.<locals>.Node.fooztr@N)rrrrTrrr@r?NoderRws2
'
'
'




r@rXceZdZdZdS)AClassPropertiesAndMethods.test_multiple_inheritance.<locals>.FragcdS)N42rrs r?rzEClassPropertiesAndMethods.test_multiple_inheritance.<locals>.Frag.foo}rWr@Nrrr@r?FragrZ|#




r@r]r)r^rGrrrr6rr7__mro__rTr-)r:rDrLrOrXr]rs      @r?test_multiple_inheritancez3ClassPropertiesAndMethods.test_multiple_inheritance[s	%	%	%	%	%	%	%	%
ACCq)))	

2r***	!	!	!	!	!	!	!a	!	!	!
ACCaffhh,,,'
aggii+=*>???7W---q)))	

2r***Qa$8999					6			
					4				
))2...TTVVb)))))2...TTVVb)))))r@clGddt}||dGdd|}||d||dGdd|}||d||dGdd||}||d||d||j||||tfGd	d
||}||d||d||j||||tf	Gdd||}|d
n#t$rYnwxYw	Gdd||}|ddS#t$rYdSwxYw)NceZdZdZdS)=ClassPropertiesAndMethods.test_diamond_inheritance.<locals>.AcdSrzrrs r?rzBClassPropertiesAndMethods.test_diamond_inheritance.<locals>.A.spam33r@Nrlrr@r?r{rds&&&&&r@r{ceZdZdZdZdS)=ClassPropertiesAndMethods.test_diamond_inheritance.<locals>.BcdSrrrs r?boozAClassPropertiesAndMethods.test_diamond_inheritance.<locals>.B.boo##r@cdSrrrs r?rzBClassPropertiesAndMethods.test_diamond_inheritance.<locals>.B.spamrfr@N)rrrrjrrr@r?rrhs"%%%&&&&&r@rceZdZdZdS)=ClassPropertiesAndMethods.test_diamond_inheritance.<locals>.CcdSrrrs r?rjzAClassPropertiesAndMethods.test_diamond_inheritance.<locals>.C.boorkr@N)rrrrjrr@r?rrns%%%%%r@rceZdZdS)=ClassPropertiesAndMethods.test_diamond_inheritance.<locals>.DNrKrr@r?rLrqrr@rLceZdZdS)=ClassPropertiesAndMethods.test_diamond_inheritance.<locals>.ENrKrr@r?rrsrr@rceZdZdS)=ClassPropertiesAndMethods.test_diamond_inheritance.<locals>.FNrKrr@r?rrurr@rz#expected MRO order disagreement (F)ceZdZdS)=ClassPropertiesAndMethods.test_diamond_inheritance.<locals>.GNrKrr@r?Grwrr@rxz#expected MRO order disagreement (G))r^rGrrjr`rr)r:r{rrrLrrrxs        r?test_diamond_inheritancez2ClassPropertiesAndMethods.test_diamond_inheritances	'	'	'	'	'	'	'	'S)))	'	'	'	'	'	'	'	'	
S)))C(((	&	&	&	&	&	&	&	&S)))C(((1S)))C(((Q1a$89991S)))C(((Q1a$8999	=Aq
II;<<<<			D		=Aq
II;<<<<<			DD	s$	I..
I;:I;?J%%
J32J3c
 Gddt}Gddt}Gddt}Gdd|}Gd	d
|}Gdd||||}||j||||||tfdS)
NceZdZdS)<ClassPropertiesAndMethods.test_ex5_from_c3_switch.<locals>.ANrKrr@r?r{r|rr@r{ceZdZdS)<ClassPropertiesAndMethods.test_ex5_from_c3_switch.<locals>.BNrKrr@r?rr~rr@rceZdZdS)<ClassPropertiesAndMethods.test_ex5_from_c3_switch.<locals>.CNrKrr@r?rrrr@rceZdZdS)<ClassPropertiesAndMethods.test_ex5_from_c3_switch.<locals>.XNrKrr@r?rrrr@rceZdZdS)<ClassPropertiesAndMethods.test_ex5_from_c3_switch.<locals>.YNrKrr@r?rrrr@rceZdZdS)<ClassPropertiesAndMethods.test_ex5_from_c3_switch.<locals>.ZNrKrr@r?rrrr@rr^rGr`)r:r{rrrrrs       r?test_ex5_from_c3_switchz1ClassPropertiesAndMethods.test_ex5_from_c3_switchs!AaQ1aAv$>?????r@cGddt}Gdd|}Gdd|}Gdd|}Gd	d
|}Gdd||}Gd
d|}Gdd||}||j|||||tf||j||||tf||j||||||||tf	dS)NceZdZdS)9ClassPropertiesAndMethods.test_monotonicity.<locals>.BoatNrKrr@r?Boatrrr@rceZdZdS)<ClassPropertiesAndMethods.test_monotonicity.<locals>.DayBoatNrKrr@r?DayBoatrrr@rceZdZdS)>ClassPropertiesAndMethods.test_monotonicity.<locals>.WheelBoatNrKrr@r?	WheelBoatrrr@rceZdZdS)?ClassPropertiesAndMethods.test_monotonicity.<locals>.EngineLessNrKrr@r?
EngineLessrrr@rceZdZdS)CClassPropertiesAndMethods.test_monotonicity.<locals>.SmallMultihullNrKrr@r?SmallMultihullrrr@rceZdZdS)CClassPropertiesAndMethods.test_monotonicity.<locals>.PedalWheelBoatNrKrr@r?PedalWheelBoatrrr@rceZdZdS)CClassPropertiesAndMethods.test_monotonicity.<locals>.SmallCatamaranNrKrr@r?SmallCatamaranrrr@rceZdZdS);ClassPropertiesAndMethods.test_monotonicity.<locals>.PedaloNrKrr@r?Pedalorrr@rr)	r:rrrrrrrrs	         r?test_monotonicityz+ClassPropertiesAndMethods.test_monotonicitysy     6   !!!!!d!!!########''''''''+++++W+++88888Z	88822222^22299999^N999/z7ItVL	N	N	N/~wfE	G	G	G~z>w	4A	B	B	B	B	Br@c
 Gddt}Gddt}Gddt}Gdd||}Gd	d
||}Gdd||}||j||||||tfdS)
NceZdZdS)AClassPropertiesAndMethods.test_consistency_with_epg.<locals>.PaneNrKrr@r?Panerrr@rceZdZdS)KClassPropertiesAndMethods.test_consistency_with_epg.<locals>.ScrollingMixinNrKrr@r?ScrollingMixinrrr@rceZdZdS)IClassPropertiesAndMethods.test_consistency_with_epg.<locals>.EditingMixinNrKrr@r?EditingMixinrrr@rceZdZdS)KClassPropertiesAndMethods.test_consistency_with_epg.<locals>.ScrollablePaneNrKrr@r?ScrollablePanerrr@rceZdZdS)IClassPropertiesAndMethods.test_consistency_with_epg.<locals>.EditablePaneNrKrr@r?EditablePanerrr@rceZdZdS)SClassPropertiesAndMethods.test_consistency_with_epg.<locals>.EditableScrollablePaneNrKrr@r?EditableScrollablePanerrr@rr)r:rrrrrrs       r?test_consistency_with_epgz3ClassPropertiesAndMethods.test_consistency_with_epgs     6   *****V***(((((6(((77777T.777333334333GGGGG^LGGG/7%~|Tf6	7	7	7	7	7r@c	d}fd}Gddt}Gdd|}Gddt}|td	td
||fi|t|td
||fi|t|td
|||fiGddt}Gd
d|}Gdd|}Gdd||}	Gdd||}
|t|td|	|
fidS)NzCCannot create a consistent method resolution
order (MRO) for bases c<	||d|zdS#|$rt}tjrPt||s4dt|d|Yd}~dSYd}~dSYd}~dSd}~wwxYw)NzExpected %szMessage z, expected )rrcheck_impl_detailr@ra)excexpectedcallabler;msgr:s     r?raisesz?ClassPropertiesAndMethods.test_mro_disagreement.<locals>.raisess	
/$		-#-.....
8
8
8,..8s88..x888			#&s8888XX#7888888888888888888888
8s"BABBceZdZdS):ClassPropertiesAndMethods.test_mro_disagreement.<locals>.ANrKrr@r?r{rrr@r{ceZdZdS):ClassPropertiesAndMethods.test_mro_disagreement.<locals>.BNrKrr@r?rrrr@rceZdZdS):ClassPropertiesAndMethods.test_mro_disagreement.<locals>.CNrKrr@r?rrrr@rzduplicate base class ArceZdZdS)CClassPropertiesAndMethods.test_mro_disagreement.<locals>.GridLayoutNrKrr@r?
GridLayoutrrr@rceZdZdS)GClassPropertiesAndMethods.test_mro_disagreement.<locals>.HorizontalGridNrKrr@r?HorizontalGridrrr@rceZdZdS)EClassPropertiesAndMethods.test_mro_disagreement.<locals>.VerticalGridNrKrr@r?VerticalGridrrr@rceZdZdS)?ClassPropertiesAndMethods.test_mro_disagreement.<locals>.HVGridNrKrr@r?HVGridrrr@rceZdZdS)?ClassPropertiesAndMethods.test_mro_disagreement.<locals>.VHGridNrKrr@r?VHGridrrr@rConfusedGrid)r^rrI)r:mro_err_msgrr{rrrrrrrs`          r?test_mro_disagreementz/ClassPropertiesAndMethods.test_mro_disagreements
	/
	/
	/
	/
	/		y2S1a&"	&	&	&y+S1a&"	&	&	&y+S1a)R	)	)	)	'&&&&&&&.....Z...,,,,,:,,,88888^\88888888\>888y+^ff%5r	;	;	;	;	;r@ct}||jt|t|tt}|||||d	d|_|dn#ttf$rYnwxYw|tdGddt}|}||j
id|_||jd||j
ddidS)Nrrz1object() should not allow setting a foo attributerKceZdZdS):ClassPropertiesAndMethods.test_object_class.<locals>.CdictNrKrr@r?CdictrrMr@rrq)r^rGrrIassertNotEqualrrrAttributeErrorrrK)r:rDrXrrs     r?test_object_classz+ClassPropertiesAndMethods.test_object_classsjHHf---a&)))HHAq!!!a'''	KAE
IIIJJJJ	*			D		
fhh
333					F			EGGR((("""eQZ00000sB//CCcrGddtj}tjd}||jtju|t|d||_||j|u|t|dtj|_||jtju|t|dGddt}|t5|d_dddn#1swxYwYGdd	t}|t5|d
_dddn#1swxYwYGddt}|t5|d
_dddn#1swxYwYGddt}|t5|d_dddn#1swxYwYGddt}|t5|d_dddn#1swxYwYGddt}|t5|d_dddn#1swxYwYGddt}	|t5|	t_ddddS#1swxYwYdS)NceZdZdZdS)jClassPropertiesAndMethods.test_object_class_assignment_between_heaptypes_and_nonheaptypes.<locals>.SubTyperqNrrrrDrr@r?SubTypersAAAr@rrQrDceZdZdZdS)hClassPropertiesAndMethods.test_object_class_assignment_between_heaptypes_and_nonheaptypes.<locals>.MyIntrNrrrrrr@r?MyIntr.IIIr@rrqceZdZdZdS)jClassPropertiesAndMethods.test_object_class_assignment_between_heaptypes_and_nonheaptypes.<locals>.MyFloatrNrrr@r?MyFloatr3rr@r?ceZdZdZdS)lClassPropertiesAndMethods.test_object_class_assignment_between_heaptypes_and_nonheaptypes.<locals>.MyComplexrNrrr@r?	MyComplexr8rr@ry?@ceZdZdZdS)hClassPropertiesAndMethods.test_object_class_assignment_between_heaptypes_and_nonheaptypes.<locals>.MyStrrNrrr@r?MyStrr=rr@rceZdZdZdS)jClassPropertiesAndMethods.test_object_class_assignment_between_heaptypes_and_nonheaptypes.<locals>.MyBytesrNrrr@r?MyBytesrBrr@raceZdZdZdS)jClassPropertiesAndMethods.test_object_class_assignment_between_heaptypes_and_nonheaptypes.<locals>.MyTuplerNrrr@r?MyTuplerGrr@rrceZdZdZdS)nClassPropertiesAndMethods.test_object_class_assignment_between_heaptypes_and_nonheaptypes.<locals>.MyFrozenSetrNrrr@r?MyFrozenSetrLrr@r)r>r?rrrrr-rrr.rr@bytestuple	frozenset)
r:rrQrrrrrrrs
          r??test_object_class_assignment_between_heaptypes_and_nonheaptypeszYClassPropertiesAndMethods.test_object_class_assignment_between_heaptypes_and_nonheaptypess@					e&			
S!!u'77888C)))w.///3(((&u'77888C)))					C			


y
)
)	"	"!QM	"	"	"	"	"	"	"	"	"	"	"	"	"	"	"					e			


y
)
)	&	&%SO	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&								


y
)
)	+	+!*V	+	+	+	+	+	+	+	+	+	+	+	+	+	+	+					C			


y
)
)	"	"!CM	"	"	"	"	"	"	"	"	"	"	"	"	"	"	"					e			


y
)
)	%	%$DN	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%					e			


y
)
)	#	#"BL	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#					)			


y
)
)	0	0$/IKK!	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0	0s~EEEF##F'*F'G//G36G3'H;;H?H?3JJJ?KKKL,,L03L0cpGddt}|}|d|dGddt}|}|d|dd|_|jdd|_|jd|`|dGd	d
t}|}|d|d|d|dd|_d
|_d|_|jd|jd
|jdGddt}|d}|d|d|d	d|_dn#t$rYnwxYw	Gddt}dn#t$rYnwxYw	Gddt}dn#t$rYnwxYw	Gddt}dn#t$rYnwxYw	Gddt}dn#t$rYnwxYw	Gddt}dn#t$rYnwxYwGd dt}Gd!dt}|}d|_|jdGd"dt}|}d|_|jdd#Gfd$dt}|}d|_|jd
td%t	Gd&dt}d'n#tt f$rYnwxYwGfd(d)tGd*dt}|}|_|_|_jd~t%jjd%Gd+d,|}|}|_|_jd
~t%jjd%Gd-d.|}	|	}|_|_|_jd~t%jjd%Gd/d0t}
|
}|g|_jdd}t%jjd%t-t.d1rGd2d3t}|}
t1t/j}t5d4D]}|
|
k	t1t/j}||Gfd5d6t}t%jd75}|}~dddn#1swxYwY|d8Gd9d:t}t5|`dddn#1swxYwYGd;d:t}td<5|jdddn#1swxYwYGd=d>tGfd?d:t}d|_td<5|jddddS#1swxYwYdS)@NceZdZgZdS)0ClassPropertiesAndMethods.test_slots.<locals>.C0Nrrr@r?C0rSrr@rrKrceZdZdgZdS)0ClassPropertiesAndMethods.test_slots.<locals>.C1rDNrrr@r?C1rYIIIr@rrDrqceZdZgdZdS)0ClassPropertiesAndMethods.test_slots.<locals>.C3r]Nrrr@r?C3r	e'IIIr@r
rXr^rrrtc$eZdZdZdgZdZdZdS)0ClassPropertiesAndMethods.test_slots.<locals>.C4zValidate name mangling__ac||_dSr_C4__ar:rs  r?r4z9ClassPropertiesAndMethods.test_slots.<locals>.C4.__init__v
 r@c|jSrrrs r?rz4ClassPropertiesAndMethods.test_slots.<locals>.C4.getx	xr@N)rrr__doc__rr4rrr@r?C4r
ss?((I
!
!
!
 
 
 
 
 r@rrrrz$Double underscored names not mangledceZdZdgZdS/ClassPropertiesAndMethods.test_slots.<locals>.CNrrr@r?rrs!F			r@rz[None] slots not caughtceZdZdgZdS)rzfoo barNrrr@r?rz/ClassPropertiesAndMethods.test_slots.<locals>.Cs&K			r@z['foo bar'] slots not caughtceZdZdgZdS)rzfoobarNrrr@r?rz/ClassPropertiesAndMethods.test_slots.<locals>.Cs'L			r@z['foo\0bar'] slots not caughtceZdZdgZdS)r1Nrrr@r?rz/ClassPropertiesAndMethods.test_slots.<locals>.Cs E			r@z['1'] slots not caughtceZdZdgZdS)rrNrrr@r?rz/ClassPropertiesAndMethods.test_slots.<locals>.CsD			r@z[''] slots not caughtceZdZgdZdS)r)rDa_b_aA0123456789ZNrrr@r?rz/ClassPropertiesAndMethods.test_slots.<locals>.Cs:::IIIr@ceZdZdZdSrabcNrrr@r?rz/ClassPropertiesAndMethods.test_slots.<locals>.CIIIr@ceZdZdZdSr%rrr@r?rz/ClassPropertiesAndMethods.test_slots.<locals>.Cr'r@rceZdZZdSrr)slotssr?rz/ClassPropertiesAndMethods.test_slots.<locals>.CsIIIr@rc&eZdZedgZdS)rN)rrrchrrrr@r?rz/ClassPropertiesAndMethods.test_slots.<locals>.Cs SXXJ			r@zhr(128)] slots not caughtc(eZdZdZfdZfdZdS)5ClassPropertiesAndMethods.test_slots.<locals>.Countedrc(xjdz
c_dSrrr:Counteds r?r4z>ClassPropertiesAndMethods.test_slots.<locals>.Counted.__init__1$r@c(xjdzc_dSrrr1s r?__del__z=ClassPropertiesAndMethods.test_slots.<locals>.Counted.__del__r3r@N)rrrrr4r5)r2sr?r2r/sLG
%
%
%
%
%
%
%
%
%
%
%
%r@r2ceZdZgdZdS)rr]Nrrr@r?rz/ClassPropertiesAndMethods.test_slots.<locals>.Crr@ceZdZdS)/ClassPropertiesAndMethods.test_slots.<locals>.DNrKrr@r?rLr8rMr@rLceZdZdgZdS)/ClassPropertiesAndMethods.test_slots.<locals>.EeNrrr@r?rr:rr@rceZdZddgZdS)/ClassPropertiesAndMethods.test_slots.<locals>.FrDrXNrrr@r?rr=c
IIIr@rget_objectsceZdZdZdS)/ClassPropertiesAndMethods.test_slots.<locals>.GcdS)NFrrs  r?__eq__z6ClassPropertiesAndMethods.test_slots.<locals>.G.__eq__s 5r@NrrrrCrr@r?rxrAs#!!!!!r@rxrc(eZdZddgZdZfdZdS)/ClassPropertiesAndMethods.test_slots.<locals>.HrDrXc"d|_d|_dSNrqrrrWrs r?r4z8ClassPropertiesAndMethods.test_slots.<locals>.H.__init__sr@ct|jd|jddSrH)rGrDrX)self_r:s r?r5z7ClassPropertiesAndMethods.test_slots.<locals>.H.__del__s9  !,,,  !,,,,,r@N)rrrrr4r5rsr?HrF	sFc
I



-
-
-
-
-
-
-r@rKstderrrceZdZdZdS/ClassPropertiesAndMethods.test_slots.<locals>.XrDNrrr@r?rrOIIIr@rceZdZdZdSrNrrr@r?rz/ClassPropertiesAndMethods.test_slots.<locals>.XrPr@z'X' object has no attribute 'a'ceZdZdS)4ClassPropertiesAndMethods.test_slots.<locals>.SubStrNrKrr@r?SubStrrS"rMr@rTc(eZdZdfZdS)rOrNr)rTsr?rz/ClassPropertiesAndMethods.test_slots.<locals>.X$sIIIr@) r^rrDrGrXr^r_ClassPropertiesAndMethods__arrrr&rrrIr@UnicodeEncodeErrorrr
gc_collectzr;rgcrr?rcaptured_outputgetvaluerassertRaisesRegexr)r:rrrr
rrr^rLrrsrxgorig_objectsrnew_objectsrKhrr2rTr*s`                   @@@r?
test_slotsz$ClassPropertiesAndMethods.test_slotsQs								BDDa,,,a'''								BDDa,,,a%%%a   d###
Ca%%%	(	(	(	(	(	(	(	(BDDa,,,a%%%a%%%a%%%a   a   a   	 	 	 	 	 	 	 	 
BqEEa,,,a'''!$$$	>AE
II<====			D		1
#
#
#
#
#F
#
#
#

II/0000			D		6
(
(
(
(
(F
(
(
(

II45555			D		8
)
)
)
)
)F
)
)
)

II67777			D		0
"
"
"
"
"F
"
"
"

II.////			D		/
!
!
!
!
!F
!
!
!

II-....			D		;	;	;	;	;	;	;	;								
ACC"""								
ACC"""										
ACC"""

d58nnc***	5
'
'
'
'
'F
'
'
'

II34444-.			D		%	%	%	%	%	%	%f	%	%	%	(	(	(	(	(	(	(	(
ACCgiigiigii!,,,
!,,,								
ACCgiigii!,,,
!,,,								
ACCgiigiigii!,,,
!,,,	#	#	#	#	#	#	#	#
ACCwyy!n!,,,!,,,2}%%		8
!
!
!
!
!F
!
!
!Ar~//00L2YY

1bn..//K\;777	-	-	-	-	-	-	-	-	-	-
$X
.
.	!A																
r***								


~
.
.																									

#
#N4U
V
V		
ACCEE																				S				'	'	'	'	'	'	'	'	'	'

#
#N4U
V
V		
ACCEE																		sI
I+*I+/J
J%$J%)K
KK#L
LLM
MMN
N
N
R<<SS
_%%_),_)aa #a b11b58b5d++d/2d/crGddt}|}||d||dd|_||jddiGddt}|}||d||d	d|_|d	n#t$rYnwxYwGd
d||}|}||d||dd|_||jddiGdd
||}|}||d||dd|_||jddidS)NceZdZdgZdS)7ClassPropertiesAndMethods.test_slots_special.<locals>.DrKNrrr@r?rLrf,#IIIr@rLrK__weakref__rrceZdZdgZdS)7ClassPropertiesAndMethods.test_slots_special.<locals>.WrhNrrr@r?Wrj4&IIIr@rkz!shouldn't be allowed to set a.fooceZdZgZdS)8ClassPropertiesAndMethods.test_slots_special.<locals>.C1Nrrr@r?rrn@rr@rceZdZgZdS)8ClassPropertiesAndMethods.test_slots_special.<locals>.C2Nrrr@r?rrpHrr@r)r^rrrrGrKrr)r:rLrDrkrrs      r?test_slots_specialz,ClassPropertiesAndMethods.test_slots_special*s?	%	%	%	%	%	%	%	%
ACC1j)))a///eR[111	(	(	(	(	(	(	(	(
ACC1m,,,a,,,	;AE
II9::::			D	
					A			BDD1j)))1m,,,eR[111					A			BDD1j)))1m,,,eR[11111s8C
C"!C"cGfddt}Gdd}Gdd||d}|jdtj|}|jd	|dd	|_|jd		t5Gd
d}dddn#1swxYwYGdd
|d}|j|jddd
z|jdtj|}|dd|_|jd	t5Gdd}ddddS#1swxYwYdS)Nc"eZdZfdZxZS);ClassPropertiesAndMethods.test_slots_special2.<locals>.Metacx||t||||Sr)rrsr)rr=rS	namespaceattrrr:s     r?rzCClassPropertiesAndMethods.test_slots_special2.<locals>.Meta.__new__Ss3

dI...wwsD%CCCr@rurr:s@r?MetartRsH
D
D
D
D
D
D
D
D
D
Dr@ryceZdZdZdS)9ClassPropertiesAndMethods.test_slots_special2.<locals>.C1cd|_dSrj)rXrs r?r4zBClassPropertiesAndMethods.test_slots_special2.<locals>.C1.__init__Xs
r@NrMrr@r?rr{Wr^r@rc$eZdZdgZfdZxZS)9ClassPropertiesAndMethods.test_slots_special2.<locals>.C2rvcHtdSrrsr4)r:rs r?r4zBClassPropertiesAndMethods.test_slots_special2.<locals>.C2.__init__\s  """""r@)rrrrr4rvrs@r?rr~Zs@()I
#
#
#
#
#
#
#
#
#r@rrv)rArwrceZdZdZdgZdS)9ClassPropertiesAndMethods.test_slots_special2.<locals>.C3rrvN)rrrrvrrr@r?r
rfs "
,-			r@r
ceZdZdgZdS)9ClassPropertiesAndMethods.test_slots_special2.<locals>.Q1rNrrr@r?Q1rjs'(IIIr@rrqc(eZdZeZdgZdS)9ClassPropertiesAndMethods.test_slots_special2.<locals>.Q2rN)rrrr^rrr@r?Q2rts!%vxx+,			r@r)rIrrKr>MemberDescriptorTyperGrXrrvrrr)	r:ryrrr^r
rrrs	`        r?test_slots_special2z-ClassPropertiesAndMethods.test_slots_special2Ps	D	D	D	D	D	D	D4	D	D	D
									#	#	#	#	#t/	#	#	#	#	
bk/:#8	:	:	:BDDb!!!a111"---


y
)
)	.	.
.
.
.
.
.
.
.
.	.	.	.	.	.	.	.	.	.	.	.	.	.	.	.
	)	)	)	)	)4n	)	)	)	)"/#2#*>*EFFFbk.9#8	:	:	:BDDa000---


y
)
)	-	-
-
-
-
-
-
-
-
-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-s$C11C58C5>GG Gcddl}Gdd|j}Gddt}|||}||||t|jj|ddS)NrceZdZdZdS)>ClassPropertiesAndMethods.test_slots_descriptor.<locals>.MyABCrDNrrr@r?MyABCr|rPr@rr@ceZdZdS)BClassPropertiesAndMethods.test_slots_descriptor.<locals>.UnrelatedNrKrr@r?	UnrelatedrrMr@rrt)	r&ABCMetar^registerrrrrD__set__)r:r&rrus     r?test_slots_descriptorz/ClassPropertiesAndMethods.test_slots_descriptorxs	


					ck												
y!!!IKKa'''	
)UW_a;;;;;r@cGddt}Gdd|}Gdd|}d|_||jd||jd||jdGdd	t}|}||d
d|_||jdd|_||d
d|_|t|dd|_|t|d||jd||dd}||_
||jdd|_||jdd}||_
|t5d|_dddn#1swxYwY||jdGdd|}|}d|_||jdGddt}	|d|	dzd||	ddzd|d|	dzd||	ddzd||	d|	dzdGddt }
Gd d!|
"}||tdS)#NceZdZdS2ClassPropertiesAndMethods.test_dynamics.<locals>.DNrKrr@r?rLrrMr@rLceZdZdS)2ClassPropertiesAndMethods.test_dynamics.<locals>.ENrKrr@r?rrrMr@rceZdZdS)2ClassPropertiesAndMethods.test_dynamics.<locals>.FNrKrr@r?rrrMr@rrqceZdZdS)2ClassPropertiesAndMethods.test_dynamics.<locals>.CNrKrr@r?rrrMr@rfoobarrrcdSrjrrs r?<lambda>z9ClassPropertiesAndMethods.test_dynamics.<locals>.<lambda>sr@rcdS)NC()rrs r?rz9ClassPropertiesAndMethods.test_dynamics.<locals>.<lambda>s%r@rcdSr&rrs r?rz9ClassPropertiesAndMethods.test_dynamics.<locals>.<lambda>sr@rrc |dkrdStNrrr:r=s  r?	mygetattrz:ClassPropertiesAndMethods.test_dynamics.<locals>.mygetattrsv~~v  r@rcT|dkrtt|||Sr)rr^r()r:r=rs   r?	mysetattrz:ClassPropertiesAndMethods.test_dynamics.<locals>.mysetattrs)v~~$$%%dD%888r@znot spamceZdZdSrrKrr@r?rLz2ClassPropertiesAndMethods.test_dynamics.<locals>.DrMr@ceZdZdS)2ClassPropertiesAndMethods.test_dynamics.<locals>.INrKrr@r?IrrMr@rrDaartrceZdZdS)AClassPropertiesAndMethods.test_dynamics.<locals>.dynamicmetaclassNrKrr@r?dynamicmetaclassrrMr@rceZdZdS):ClassPropertiesAndMethods.test_dynamics.<locals>.someclassNrKrr@r?	someclassrrMr@rr@)r^rrGrrmethodrrrTr-__getattr__rnewr(rrrIr)r:rLrrrrDrrrOrrrs            r?
test_dynamicsz'ClassPropertiesAndMethods.test_dynamicssq																								"""""""""								
ACCa***1%%%"?R(((''
a%((($$	Q%%%1%%%a(((	!	!	!"
(((###	9	9	9"



~
.
.	 	 AF	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	
(((								
ACC"""								QQqTT4(((1c4(((11Q44###1a###1aaddA&&&					t								"2				Iv.....s?HHHc	Gddtt}|dn#t$rYnwxYw	Gddtd}|dn#t$rYnwxYwGdd}	Gddtt}|d	n#t$rYnwxYw	Gd
dt}|dn#t$rYnwxYw	Gddt}|d
n#t$rYnwxYwGddt
}Gddt
}Gddt|}Gddt|}	Gdd||}|ddS#t$rYdSwxYw)NceZdZdS0ClassPropertiesAndMethods.test_errors.<locals>.CNrKrr@r?rrrr@rz5inheritance from both list and dict should be illegalceZdZdSrrKrr@r?rz0ClassPropertiesAndMethods.test_errors.<locals>.Crr@z+inheritance from non-type should be illegalceZdZdS)6ClassPropertiesAndMethods.test_errors.<locals>.ClassicNrKrr@r?ClassicrrMr@rceZdZdSrrKrr@r?rz0ClassPropertiesAndMethods.test_errors.<locals>.Crr@z,inheritance from CFunction should be illegalceZdZdZdSrrqNrrr@r?rz0ClassPropertiesAndMethods.test_errors.<locals>.Cs			r@z__slots__ = 1 should be illegalceZdZdgZdSrrrr@r?rz0ClassPropertiesAndMethods.test_errors.<locals>.CsC			r@z!__slots__ = [1] should be illegalceZdZdS)1ClassPropertiesAndMethods.test_errors.<locals>.M1NrKrr@r?rUrrMr@rUceZdZdS)1ClassPropertiesAndMethods.test_errors.<locals>.M2NrKrr@r?rgrrMr@rgceZdZdS)1ClassPropertiesAndMethods.test_errors.<locals>.A1NrKrr@r?A1rrMr@rr@ceZdZdS)1ClassPropertiesAndMethods.test_errors.<locals>.A2NrKrr@r?A2rrMr@rceZdZdS)0ClassPropertiesAndMethods.test_errors.<locals>.BNrKrr@r?rrrr@rz5finding the most derived metaclass should have failed)r6rrrr^rIr)r:rrrUrgrrrs        r?test_errorsz%ClassPropertiesAndMethods.test_errorssk	O




D$




IIMNNNN			D	
	E




FD




IICDDDD			D										F




DII




IIDEEEE			D	
	9




F




II78888			D	
	;
 
 
 
 
 F
 
 
 

II9::::			D	
																					2									2					O




B




IIMNNNNN			DD	sf1
>>A,,
A98A9
 C
C
C
C::
DDD44
EEF;;
G	G	c
Gddt}|}||d|df||d|df||d|dfGdd|}|}||d|df||d|df||d|df|||d|dfd}t	|}||dtdtdf||ddtdf||jj|||jj||t||jj||t||jj||t|||f|t|||ft	dd}|	t|	t	|d	|d
n#t$rYnwxYwt	|}idtd|j
d
}	||j|	d|_||jd||jddi|	|`||ddS)Nc*eZdZdZeeZdS)6ClassPropertiesAndMethods.test_classmethods.<locals>.Cc|SrrrDs r?rz:ClassPropertiesAndMethods.test_classmethods.<locals>.C.foor@Nrrrrrgoorr@r?rr
&!!!+c""CCCr@rrqceZdZdS)6ClassPropertiesAndMethods.test_classmethods.<locals>.DNrKrr@r?rLrrMr@rLc
||fS)f docstringr)rargs  r?fz6ClassPropertiesAndMethods.test_classmethods.<locals>.fs:r@rrr
z)classmethod shouldn't accept keyword argsrr)__annotations__rrrrr)r^rGrrrrcr-__self__rsrrrrrrKrr)r:rr^rLrOrffrNcmcm_dictrs          r?test_classmethodsz+ClassPropertiesAndMethods.test_classmethodss	#	#	#	#	#	#	#	#
ACCqAq6***qAq6***qAq6***								
ACCqAq6***qAq6***qAq6***q!q!f---			^^+As++B//#r;;;Ar**S"I666	
++++++q0!444q0!444q))A4000q))A40001~~%%a(()T***	Ca    
IIABBBB			D	
^^&(+!)"#$>	33
	
g...r"""sR&;7&;<<<Db#&&&&&s7M
M+*M+ctjtd}td}|}t	dD]}|d|||z
dddSNgettotalrefcountrrr)delta)r
get_attributerrrr4assertAlmostEqual)r:rrrefs_beforers     r?%test_refleaks_in_classmethod___init__z?ClassPropertiesAndMethods.test_refleaks_in_classmethod___init__Bs"06HII


&&((s		AKK//11K?"MMMMMr@rcddl}d}ddi}|jj|i|\}}}|||j|||||||j|i|\}}}|||j|||||||jjd}||jg|Ri|\}}	}
|||j||	|||
|Gdd|j}||g|Ri|\}}	}
|||||	|||
||t5}|dddn#1swxYwY|t|jd|t5}||dddn#1swxYwY|t|jd	|t5}|tdddn#1swxYwYd
}
|t|j|
|t5}|
dtdddn#1swxYwY|t|j|
dS)Nrrsr&{	classmethceZdZdS)AClassPropertiesAndMethods.test_classmethods_in_c.<locals>.SubSpamNrKrr@r?SubSpamr^rr@rzGdescriptor 'classmeth' of 'xxsubtype.spamlist' object needs an argumentzfdescriptor 'classmeth' for type 'xxsubtype.spamlist' needs a type, not a 'xxsubtype.spamlist' as arg 2zUdescriptor 'classmeth' requires a subtype of 'xxsubtype.spamlist' but received 'list')rrrrGrKrrr@	exceptionr6rc)r:rrDrOrrd1spam_cmx2rd2rrexpected_errmsgs              r?test_classmethods_in_cz0ClassPropertiesAndMethods.test_classmethods_in_cKsq	!   
CL+DM+Q4!44	2rDM***BB-DMMOO-q6A66	2rDM***BB-(5WT]4Q444!44
BT]+++R   R   *****dm***WW.q...A..
BW%%%R   R   


y
)
)	RGIII															
'	(	(	(


y
)
)	%RGDMMOO$$$	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%
@	A	A	A


y
)
)	RGDMMM															
"		
R\**O<<<


y
)
)	(ROOD$'''	(	(	(	(	(	(	(	(	(	(	(	(	(	(	(R\**O<<<<<sH?GGG#I

IIJ77J;>J;L..L25L2cGddt}|}||dd||dd||d|dfGdd|}|}||dd||dd||d|df|||d|dft	d}||jddid|_||jd||jddd	|`||d
dS)Nc*eZdZdZeeZdS)7ClassPropertiesAndMethods.test_staticmethods.<locals>.Cc|Srrrs r?rz;ClassPropertiesAndMethods.test_staticmethods.<locals>.C.foorr@N)rrrrrfrrr@r?rrs&!!!,s##CCCr@rrqrqceZdZdS)7ClassPropertiesAndMethods.test_staticmethods.<locals>.DNrKrr@r?rLr
rMr@rLrr)rrr)r^rGrrrfrKrr)r:rr^rLrOsms      r?test_staticmethodsz,ClassPropertiesAndMethods.test_staticmethods}s	$	$	$	$	$	$	$	$
ACCq4(((q4(((qAq7+++								
ACCq4(((q4(((qAq6***q!q!f---
$

y$&7888r"""RD&A&ABBBDb#&&&&&r@ctjtd}td}|}t	dD]}|d|||z
dddSr)rrrrfrr4r)r:rrrrs     r?&test_refleaks_in_staticmethod___init__z@ClassPropertiesAndMethods.test_refleaks_in_staticmethod___init__s"06HII
$

&&((s		AKK//11K?"MMMMMr@cddl}d}ddi}|jj|i|\}}}||d|||||||j|i|\}}}||d||||||dS)Nrrsr&r)rr
staticmethrG)r:rrDrOrrrrs        r?test_staticmethods_in_cz1ClassPropertiesAndMethods.test_staticmethods_in_cs	!   
CL,DM,a5155	2rD!!!BB.DMMOO.7Q77	2rD!!!BBr@cGdd}|ddf||ddf||d|dfGdd}|}||d|df||d|df||d|df|||d|dfGfdd}||jjj|tjddS)	Nc*eZdZdZeeZdS)1ClassPropertiesAndMethods.test_classic.<locals>.Cc|Srrrs r?rz5ClassPropertiesAndMethods.test_classic.<locals>.C.foorr@Nrrr@r?rrrr@rrqceZdZdS)1ClassPropertiesAndMethods.test_classic.<locals>.DNrKrr@r?rLrrMr@rLceZdZjZdS)1ClassPropertiesAndMethods.test_classic.<locals>.ENrrNsr?rr%CCCr@r<bound method )rGrr__func__rrrcra)r:r^rLrOrrs     @r?test_classicz&ClassPropertiesAndMethods.test_classics	#	#	#	#	#	#	#	#
ACCqAq6***qAq6***qAq6***								
ACCqAq6***qAq6***qAq6***q!q!f---										)15111QU]]1133//00;;<LMMNNNNNr@cVGddt}|}||jd||jdd|_||jd||jd|`||ddS)Nc\eZdZGddeZdZdZdZdZeeeeZ	dS)2ClassPropertiesAndMethods.test_compattr.<locals>.Cc*eZdZddZddZdZdZdS)EClassPropertiesAndMethods.test_compattr.<locals>.C.computed_attributeNc0||_||_||_dSr)_computed_attribute__get_computed_attribute__set_computed_attribute__delete)r:rrdeletes    r?r4zNClassPropertiesAndMethods.test_compattr.<locals>.C.computed_attribute.__init__s!$DJ!$DJ$*DMMMr@c,||Sr)r$)r:rrIs   r?rczMClassPropertiesAndMethods.test_compattr.<locals>.C.computed_attribute.__get__s::c??*r@c.|||Sr)r%r:rrs   r?rzMClassPropertiesAndMethods.test_compattr.<locals>.C.computed_attribute.__set__s::c5111r@c,||Sr)r&r:rs  r?
__delete__zPClassPropertiesAndMethods.test_compattr.<locals>.C.computed_attribute.__delete__s==---r@rr)rrrr4rcrr-rr@r?computed_attributer"sZ++++++++222.....r@r.cd|_dSr_C__xrs r?r4z;ClassPropertiesAndMethods.test_compattr.<locals>.C.__init__
r@c(|j}|dz|_|Srr0rs  r?__get_xz:ClassPropertiesAndMethods.test_compattr.<locals>.C.__get_xsHQ3r@c||_dSrr0rs  r?__set_xz:ClassPropertiesAndMethods.test_compattr.<locals>.C.__set_xr2r@c
|`dSrr0rs r?
__delete_xz=ClassPropertiesAndMethods.test_compattr.<locals>.C.__delete_xHHHr@N)
rrrr^r.r4	_C__get_x	_C__set_x_C__delete_xrrr@r?rr s

.

.

.

.

.V

.

.

.











""7GZ@@AAAr@rrrqrr)r^rGrrr1s   r?
test_compattrz'ClassPropertiesAndMethods.test_compattrs	A	A	A	A	A	A	A	A.
ACCa   a   b!!!b!!!
Ca%%%%%r@cHGddt}|}||jd||j|Gdd|}|}||jd||j|dS)NceZdZdZdZdS)2ClassPropertiesAndMethods.test_newslots.<locals>.CcHt|}d|_|Sr)r6rrrr:s  r?rz:ClassPropertiesAndMethods.test_newslots.<locals>.C.__new__s||C((r@c$|jdz|_dSNrrrrs r?r4z;ClassPropertiesAndMethods.test_newslots.<locals>.C.__init__s8a<r@Nrrrrr4rr@r?rrAs2



(
(
(
(
(r@rrtceZdZdS)2ClassPropertiesAndMethods.test_newslots.<locals>.DNrKrr@r?rLrIrMr@rL)r6rGrr)r:rrDrLrXs     r?
test_newslotsz'ClassPropertiesAndMethods.test_newslotss	(	(	(	(	(	(	(	(
ACC"""a(((								
ACC"""a(((((r@c|ttj|ttjd|ttjt|ttjtGddt}|t|Gddt}|t|dS)NrceZdZejZdS1ClassPropertiesAndMethods.test_bad_new.<locals>.CN)rrrr6rrr@r?rrNslGGGr@rceZdZejZdSrM)rrrr^rrr@r?rz1ClassPropertiesAndMethods.test_bad_new.<locals>.CsnGGGr@)rrr^rr6rs  r?test_bad_newz&ClassPropertiesAndMethods.test_bad_news)V^444)V^R888)T\6:::)V^T:::	#	#	#	#	#	#	#	#)Q'''	%	%	%	%	%	%	%	%)Q'''''r@c
Gddt}t||ttj|dt||ttj|dGddt}t|t|dt|d|ttj|ddGddt}t||ttj|dt|dt|ddGddt}t||ttj|dt|d|ttj|dddS)NceZdZdS)4ClassPropertiesAndMethods.test_object_new.<locals>.ANrKrr@r?r{rSrMr@r{rceZdZdZdS)rSc||_dSrrFr:rs  r?r4z=ClassPropertiesAndMethods.test_object_new.<locals>.A.__init__
r@NrMrr@r?r{z4ClassPropertiesAndMethods.test_object_new.<locals>.A#




r@rtceZdZdZdS)rSc6t|Srr^rrrs  r?rz<ClassPropertiesAndMethods.test_object_new.<locals>.A.__new__~~c***r@NrTrr@r?r{z4ClassPropertiesAndMethods.test_object_new.<locals>.As#
+
+
+
+
+r@ceZdZdZdZdS)rSc6t|Srr[r\s  r?rz<ClassPropertiesAndMethods.test_object_new.<locals>.A.__new__r]r@c||_dSrrFrVs  r?r4z=ClassPropertiesAndMethods.test_object_new.<locals>.A.__init__rWr@NrGrr@r?r{z4ClassPropertiesAndMethods.test_object_new.<locals>.As2
+
+
+




r@)r^rrrr4r:r{s  r?test_object_newz)ClassPropertiesAndMethods.test_object_newsR								q)V^Q:::)V_aacc1===									qq!!)V_aaddA>>>	+	+	+	+	+	+	+	+	q)V^Q:::!!a   								
	q)V^Q:::!)V_aaddA>>>>>r@cGddt}|t|Gdd|}tj5tjdt|d}dddn#1swxYwY||jd||j	||`
|t||`
tj5tjdt|d}dddn#1swxYwY||jd||j	|dS)NceZdZdZdS)=ClassPropertiesAndMethods.test_restored_object_new.<locals>.ActrAssertionError)rr;r<s   r?rzEClassPropertiesAndMethods.test_restored_object_new.<locals>.A.__new__(s$$r@NrTrr@r?r{re'#
%
%
%
%
%r@r{c"eZdZejZdZdS)=ClassPropertiesAndMethods.test_restored_object_new.<locals>.Bc||_dSrrFrVs  r?r4zFClassPropertiesAndMethods.test_restored_object_new.<locals>.B.__init__-rWr@N)rrrr^rr4rr@r?rrk+s*nG




r@rerrorrt)r^rrhwarningscatch_warningssimplefilterDeprecationWarningrGrrr)r:r{rrXs    r?test_restored_object_newz2ClassPropertiesAndMethods.test_restored_object_new%s	%	%	%	%	%	%	%	%	
.!,,,								
$
&
&		!'+=>>>!A																
"""a(((
I.!,,,
I

$
&
&		!'+=>>>!A																
"""a(((((s$&BB	B5&D''D+.D+c	Gddt}Gdd|}Gdd|}Gdd||}|||tg||j|tf||||tg||j||tf||||tg||j||tf||||||tg||j||||tf||dGd	d
t
}Gdd|||||
}||jt|||||f||d	Gddt
}Gddt|
}t|}d|d<|dn#t$rYnwxYw	Gddt
}Gddt|
}|dn#t$rYnwxYw	Gddt
}Gddt|
}|ddS#t$rYdSwxYw)NceZdZdZdS)0ClassPropertiesAndMethods.test_altmro.<locals>.AcdSrzrrs r?rz2ClassPropertiesAndMethods.test_altmro.<locals>.A.f@r@Nrrrrrr@r?r{ru?rr@r{ceZdZdS)0ClassPropertiesAndMethods.test_altmro.<locals>.BNrKrr@r?rrzArMr@rceZdZdZdS)0ClassPropertiesAndMethods.test_altmro.<locals>.CcdSrrrs r?rz2ClassPropertiesAndMethods.test_altmro.<locals>.C.fDrwr@Nrxrr@r?rr|Crr@rceZdZdS)0ClassPropertiesAndMethods.test_altmro.<locals>.DNrKrr@r?rLrErMr@rLceZdZdZdS)?ClassPropertiesAndMethods.test_altmro.<locals>.PerverseMetaTypecbt|}||Sr)rImroreverse)rLs  r?rzCClassPropertiesAndMethods.test_altmro.<locals>.PerverseMetaType.mroRs#HHSMM		r@Nrrrrrr@r?PerverseMetaTyperQs#




r@rceZdZdS0ClassPropertiesAndMethods.test_altmro.<locals>.XNrKrr@r?rrVrMr@rr@ceZdZdZdS)9ClassPropertiesAndMethods.test_altmro.<locals>._metaclassc |ttgSr)rr^rs r?rz=ClassPropertiesAndMethods.test_altmro.<locals>._metaclass.mro]s $//r@Nrrr@r?rGr\s#00000r@rGceZdZdSrrKrr@r?rz0ClassPropertiesAndMethods.test_altmro.<locals>.X_rr@rrzdevious mro() return not caughtceZdZdZdS)rcdgSrrrs r?rz=ClassPropertiesAndMethods.test_altmro.<locals>._metaclass.mrops	3Jr@Nrrr@r?rGz9ClassPropertiesAndMethods.test_altmro.<locals>._metaclassos#r@ceZdZdSrrKrr@r?rz0ClassPropertiesAndMethods.test_altmro.<locals>.Xrrr@z!non-class mro() return not caughtceZdZdZdS)rcdSrrrs r?rz=ClassPropertiesAndMethods.test_altmro.<locals>._metaclass.mro{s1r@Nrrr@r?rGz9ClassPropertiesAndMethods.test_altmro.<locals>._metaclasszs#r@ceZdZdSrrKrr@r?rz0ClassPropertiesAndMethods.test_altmro.<locals>.X}rr@z$non-sequence mro() return not caught)	r^rGrr`rrIrrr)	r:r{rrrLrrrGrs	         r?test_altmroz%ClassPropertiesAndMethods.test_altmro=sx	$	$	$	$	$	$	$	$									$	$	$	$	$	$	$	$					1			1f+...QK0001a.111Q6N3331a.111Q6N3331aAv"6777Q1a$8999#&&&					t			
					!Aa#3				VQ1a$;<<<#&&&	9
0
0
0
0
0T
0
0
0




Fj



q!!AAaD
II78888			D	
		;




T







Fj





II9::::			D	
		>




T







Fj





II<=====			DD	s7:AJ
J$#J$((K&&
K32K37(L66
MMcGddtGfdd}|}||jdd|_||jd|`||jd||dd	d
|d<||jd|d=||jd||dd
dtdd
fd|dd
<||jtdd
df|dd
=||jtdd
dS)NceZdZdZdS)5ClassPropertiesAndMethods.test_overloading.<locals>.Bz<Intermediate class because object doesn't have a __setattr__Nrrrrrr@r?rrsJJJJr@rc<eZdZdZfdZfdZdZdZdZdS)5ClassPropertiesAndMethods.test_overloading.<locals>.Cc$|dkrd|fSt)NrrJrrs  r?rzAClassPropertiesAndMethods.test_overloading.<locals>.C.__getattr__s5==%t,,((r@cT|dkr||f|_dS|||SNr)rbr()r:r=rrs   r?r(zAClassPropertiesAndMethods.test_overloading.<locals>.C.__setattr__s15==$(%=DLLL==tU;;;r@cN|dkr	||_dS||Sr)r*r+)r:r=rs  r?r+zAClassPropertiesAndMethods.test_overloading.<locals>.C.__delattr__s+5==#'DLLL==t444r@c
d|fS)Ngetitemrrs  r?r[zAClassPropertiesAndMethods.test_overloading.<locals>.C.__getitem__s
!3''r@c||f|_dSr)setitem)r:r
rs   r?rizAClassPropertiesAndMethods.test_overloading.<locals>.C.__setitem__s #U|r@c||_dSr)delitemrs  r?__delitem__zAClassPropertiesAndMethods.test_overloading.<locals>.C.__delitem__s
"r@N)	rrrrr(r+r[rir)rsr?rrs
)
)
)

<
<
<
<
<

5
5
5
5
5
(
(
(
,
,
,
#
#
#
#
#r@rr-r)rrr)rr)rrrrr)r^rGrrbr*rrr_)r:rrDrs   @r?test_overloadingz*ClassPropertiesAndMethods.test_overloadings	K	K	K	K	K	K	K	K	#	#	#	#	#	#	#	#	#	#0
ACC 2333K000
EE***2000"H---
bEB'''1R49eArll";<<<!B$U1b\\5$9:::
adGU1b\\33333r@c	^Gdd}ddtdD}d|d}i}t|||d}td	D]C}|||t	tdDdS)
NceZdZdZdS)FClassPropertiesAndMethods.test_load_attr_extended_arg.<locals>.NumberscFt|dS)Nrq)r-lstripr:rws  r?rzRClassPropertiesAndMethods.test_load_attr_extended_arg.<locals>.Numbers.__getattr__s4;;s++,,,r@Nrrrrrr@r?Numbersrs#
-
-
-
-
-r@r, c3"K|]
}d|dVdS)zZ._03dNr)r<ns  r?	<genexpr>zHClassPropertiesAndMethods.test_load_attr_extended_arg.<locals>.<genexpr>s*<<A----<<<<<<r@iz"def number_attrs(Z):
    return [ z ]number_attrs)r2rrerGr6)r:rattrscoderrrqs       r?test_load_attr_extended_argz5ClassPropertiesAndMethods.test_load_attr_extended_args	-	-	-	-	-	-	-	-		<<s<<<<<>U>>>
T2.)r	H	HA\\''))44d5::6F6FGGGG	H	Hr@c	Gddtd|dGfdd}|d}||d||d||dGfddt}||jjj|tjd	d	dS)
NceZdZdZdZdS)1ClassPropertiesAndMethods.test_methods.<locals>.Cc||_dSrrrs  r?r4z:ClassPropertiesAndMethods.test_methods.<locals>.C.__init__
r@c|jSrrrs r?rz5ClassPropertiesAndMethods.test_methods.<locals>.C.foos	v
r@N)rrrr4rrr@r?rrs2







r@rrqc,eZdZjZjZdS)1ClassPropertiesAndMethods.test_methods.<locals>.DN)rrrrrjr)rc1sr?rLrs%C&CCCr@rLrrceZdZjZdS)1ClassPropertiesAndMethods.test_methods.<locals>.ENrrNsr?rrrr@rr)
r^rGrrjrrrrrcra)r:rLrrrrs    @@r?test_methodsz&ClassPropertiesAndMethods.test_methodss								
QqTT1%%%											QqTT1%%%1%%%1%%%										)15111QU]]11Q440011<<=MNNOOOOOr@z)testing error message from implementationctj}d}|t5}|dddn#1swxYwY||jjd|d}|t5}|ddddn#1swxYwY||jjd||t5}|ddddn#1swxYwY||jjd|dS)Nz*unbound method set.add() needs an argumentrzBdescriptor 'add' for 'set' objects doesn't apply to a 'int' object)rr	rrrGrr;rc)r:set_addrrs    r?test_methods_in_cz+ClassPropertiesAndMethods.test_methods_in_cs
'F


y
)
)	RGIII															*1-???^


y
)
)	RGAJJJ															*1-???


y
)
)	ROOA															*1-?????s5AAA
B%%B),B)0DDDcd}d}d}d}d}d}d}d/d}d	}	d
}
fd}fd}d
}
d}dt|tifdt|tifdt|t||dfdtj|tifd|	|tifd||tdifd|
|tdifd||td|
ifd||
td|ifdt|tifdt|tifdtj	|tifdtj
|tifdtj|tifd t|tifd!t|tifg}Gfd"d#t}Gfd$d%t}Gd&d'tGfd(d)t}|D]W\}}}}Gd*d+|}|D]\}}t#|||t#|||||gGd,d+|}|D]\}}t#|||t#||||||d-g|Gd.d+|}|D]\}}t#|||t#|||||YdS)0Nc>|5	ddddS#1swxYwYdSrr)managers r?run_contextzIClassPropertiesAndMethods.test_special_method_lookup.<locals>.run_contextso



















sc|Srrrs r?idenzBClassPropertiesAndMethods.test_special_method_lookup.<locals>.idensKr@cdS)Nshellorrs r?rPzCClassPropertiesAndMethods.test_special_method_lookup.<locals>.hellos8r@cgSrrrs r?	empty_seqzGClassPropertiesAndMethods.test_special_method_lookup.<locals>.empty_seqsIr@cdSrrrs r?zerozBClassPropertiesAndMethods.test_special_method_lookup.<locals>.zeros1r@cdS)N?rrs r?complex_numzIClassPropertiesAndMethods.test_special_method_lookup.<locals>.complex_nums2r@ctr)
StopIterationrs r?r)zBClassPropertiesAndMethods.test_special_method_lookup.<locals>.stopsr@cdS)NTr)r:things  r?return_truezIClassPropertiesAndMethods.test_special_method_lookup.<locals>.return_trues4r@c,tt|Sr)r'r-rs r?
do_isinstancezKClassPropertiesAndMethods.test_special_method_lookup.<locals>.do_isinstancec3'''r@c,tt|Sr)rr-rs r?
do_issubclasszKClassPropertiesAndMethods.test_special_method_lookup.<locals>.do_issubclassrr@cGdd|jt}|dddS)NceZdZdS)^ClassPropertiesAndMethods.test_special_method_lookup.<locals>.do_dict_missing.<locals>.DictSubNrKrr@r?DictSubr	rr@rhirw)rrrG)checkerrr:s  r?do_dict_missingzMClassPropertiesAndMethods.test_special_method_lookup.<locals>.do_dict_missingsX




'+T


WWYYt_a00000r@c4|ddS)NrrwrG)rJr
r:s  r?some_numberzIClassPropertiesAndMethods.test_special_method_lookup.<locals>.some_numbersS$'''1r@cdSrrr;s r?swallowzEClassPropertiesAndMethods.test_special_method_lookup.<locals>.swallowr@cdSNrPr)r:specs  r?format_implzIClassPropertiesAndMethods.test_special_method_lookup.<locals>.format_impls7r@	__bytes____reversed____length_hint__)r__next__
__sizeof____instancecheck____missing__r__subclasscheck__rL	__enter____exit____complex__
__format__	__floor__	__trunc____ceil____dir__	__round__c(eZdZfdZffd	ZdS)EClassPropertiesAndMethods.test_special_method_lookup.<locals>.CheckercV|d|dS)Nz__getattr__ called with {0})rformat)r:rwtests   r?rzQClassPropertiesAndMethods.test_special_method_lookup.<locals>.Checker.__getattr__-s)		7>>tDDEEEEEr@c|vr(|d|t||S)Nz __getattribute__ called with {0})rrr^r$)r:rwroks   r?r$zVClassPropertiesAndMethods.test_special_method_lookup.<locals>.Checker.__getattribute__/sCr>>II@GGMMNNN..tT:::r@Nrrrrr$)rr:sr?Checkerr	,sQ-1
F
F
F
F26
;
;
;
;
;
;
;
;r@rc eZdZdZfdZdS)JClassPropertiesAndMethods.test_special_method_lookup.<locals>.SpecialDescrc||_dSr)impl)r:rs  r?r4zSClassPropertiesAndMethods.test_special_method_lookup.<locals>.SpecialDescr.__init__4
 			r@cdd|j||Sr)rrrc)r:rownerrecords   r?rczRClassPropertiesAndMethods.test_special_method_lookup.<locals>.SpecialDescr.__get__6s-

a   y((e444r@N)rrrr4rc)rsr?SpecialDescrr3s=
!
!
!
5
5
5
5
5
5
5r@rceZdZdS)IClassPropertiesAndMethods.test_special_method_lookup.<locals>.MyExceptionNrKrr@r?MyExceptionr9rMr@rceZdZfdZdS)FClassPropertiesAndMethods.test_special_method_lookup.<locals>.ErrDescrcrr)r:rrrs   r?rczNClassPropertiesAndMethods.test_special_method_lookup.<locals>.ErrDescr.__get__<s	!!r@Nrrrrc)rsr?ErrDescrr;.
"
"
"
"
"
"
"r@r!ceZdZdS?ClassPropertiesAndMethods.test_special_method_lookup.<locals>.XNrKrr@r?rr%@rr@rceZdZdSr$rKrr@r?rz?ClassPropertiesAndMethods.test_special_method_lookup.<locals>.XHrr@rqceZdZdSr$rKrr@r?rz?ClassPropertiesAndMethods.test_special_method_lookup.<locals>.XPrr@r)rrreversedr6r	getsizeofrrmathfloortruncceildirroundr^	Exceptionr7rbrGr)r:rrrPrrrr)rrrrrrrspecialsrrr!r=runner	meth_implenvrrwrrrrs`                         @@@r?test_special_method_lookupz4ClassPropertiesAndMethods.test_special_method_lookups																			 	 	 					(	(	(	(	(	(	1	1	1	1	1						!  			%r2
Xy#%%<
dCEEd
3
3
5
3=$r:
 -ceeRH
O[

 
 "
&
 -

 
 "
&
+tSUUZ'4JK
gsuu{T6JK
G[#%%<
6;r:
$*dCEE26
$*dCEE26
D#%%4
Yr2
%suub1',	;	;	;	;	;	;	;	;f	;	;	;	5	5	5	5	5	5	56	5	5	5					)				"	"	"	"	"	"	"v	"	"	"19	8	8,D&)R




G


 YY[[
&
&	c4%%%%AtY'''F1133KKKF




G


 YY[[
&
&	c4%%%%At\\)44555F1133KKKVaS$///




G


 YY[[
&
&	c4%%%%AtXXZZ(((k611337777-	8	8r@c
Gddt}|}|}|||t|t|t	|t	|||||||k|||k|||k|t|	dd|t|t||d|tdD]}|
|||d|Gddt}|}|}|||t|t|t	|t	||||||||||k|||k|t|	d	d|t|t||d|tdD]}|
|||d|Gd
dt}|d}	|d}
|d}||	||
|t	|	t	d||	|	||	|
||	|	k||	|
||	|
k||	|
k||
|	k||
|	k|t|	d
|t|	d|td}|d|tdD]}|
|||d|dS)NceZdZdZdS)2ClassPropertiesAndMethods.test_specials.<locals>.Cc4d|cxkrdkrnn|StNrr
IndexErrorr*s  r?r[z>ClassPropertiesAndMethods.test_specials.<locals>.C.__getitem__]%;;;;B;;;;;q  r@Nr+rr@r?rr8\#
!
!
!
!
!r@rzC object at rrrceZdZdZdS)2ClassPropertiesAndMethods.test_specials.<locals>.Dc4d|cxkrdkrnn|Str:r;r*s  r?r[z>ClassPropertiesAndMethods.test_specials.<locals>.D.__getitem__tr=r@Nr+rr@r?rLr@sr>r@rLzD object at cVeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
S)6ClassPropertiesAndMethods.test_specials.<locals>.Proxyc||_dSrrrs  r?r4z?ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__init__rr@c|jSrrrs r?rz?ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__bool__s#v:~%r@c*t|jSr)hashrrs r?__hash__z?ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__hash__sDF||#r@c|j|kSrrrs  r?rCz=ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__eq__v&r@c|j|kSrrrs  r?__ne__z=ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__ne__rJr@c|j|kSrrrs  r?__ge__z=ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__ge__rJr@c|j|kSrrrs  r?__gt__z=ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__gt__v~%r@c|j|kSrrrs  r?__le__z=ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__le__rJr@c|j|kSrrrs  r?__lt__z=ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__lt__rQr@cd|jzS)NzProxy:%srrs r?rz>ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__str__s!DF**r@cd|jzS)Nz	Proxy(%r)rrs r?rz?ClassPropertiesAndMethods.test_specials.<locals>.Proxy.__repr__s"TV++r@c||jvSrrrs  r?rvzCClassPropertiesAndMethods.test_specials.<locals>.Proxy.__contains__s&r@N)rrrr4rrHrCrLrNrPrSrUrrrvrr@r?ProxyrCs



&
&
&
$
$
$
'
'
'
'
'
'
'
'
'
&
&
&
'
'
'
&
&
&
+
+
+
,
,
,
'
'
'
'
'r@rYrqzProxy:0zProxy(0))r^rridrGrGrassertGreaterEqualr@findrassertNotInrr)
r:rrc2rrLrrrYp0p1p_1p10s
             r?
test_specialsz'ClassPropertiesAndMethods.test_specialsWs 
	!	!	!	!	!	!	!	!QSS
QSSR   BrFFBrFF+++RRR   b!!!r"""r"""	
B^ < <a@@@R$r((+++R   r	!	!AMM!R    R   	!	!	!	!	!	!	!	!QSS
QSSR   BrFFBrFF+++RRR   B###r"""r"""	
B^ < <a@@@R$r((+++R   r	!	!AMM!R    R   	'	'	'	'	'F	'	'	'2U1XX
U1XXeBiiR   b477+++R   B###r"""R$$$R   b!!!R   b!!!R),,,b:...eE"IIS!!!r	"	"AMM!S!!!!S!!!!!r@cddl}Gddt}|}|j|}|||~t	j||d~Gddt}|}	|j||dn:#t$r-}|dt|Yd}~nd}~wwxYwGdd	t}|}	|j|	}|||	~	t	j||d~dS)
NrceZdZdS)2ClassPropertiesAndMethods.test_weakrefs.<locals>.CNrKrr@r?rrfrMr@rceZdZdgZdS)7ClassPropertiesAndMethods.test_weakrefs.<locals>.NoWeakrNrrr@r?NoWeakrhsIIIr@riz!weakref.ref(no) should be illegalzweak referenceceZdZddgZdS)5ClassPropertiesAndMethods.test_weakrefs.<locals>.WeakrrhNrrr@r?Weakrks
.IIIr@rl)
weakrefr^refrGrrXrrrr@)
r:rmrr^rrinorrlyess
          r?
test_weakrefsz'ClassPropertiesAndMethods.test_weakrefss								
ACCGKNNa   
d###
	 	 	 	 	 V	 	 	 
VXX	;GKOOO
II9::::	6	6	6MM*CHH55555555	6	/	/	/	/	/6	/	/	/dffGKc"""d###
AAs!C
C>#C99C>c
Gddt}|}||dd|_||jd||jd|`||d||d|j|d||j|d|j|||d|jd}|	|tt|}|d||d||d	||d
|||j
d||j|jd||j|jd
||j|jddD]}	t%||d|d|z-#t($rX}t+|ddkr(|d|dt+|Yd}~d}~wwxYwd|_
||j
dGddt}|}	|D]}	t+|		|ddS#t.$rYdSwxYw)Nc>eZdZdZdZdZeeeedZdS)4ClassPropertiesAndMethods.test_properties.<locals>.Cc|jSrr0rs r?getxz9ClassPropertiesAndMethods.test_properties.<locals>.C.getxrr@c||_dSrr0rs  r?setxz9ClassPropertiesAndMethods.test_properties.<locals>.C.setxrr@c
|`dSrr0rs r?delxz9ClassPropertiesAndMethods.test_properties.<locals>.C.delxr9r@I'm the x property.docN)rrrrwryr{rrrr@r?rrusT
 
 
 
!
!
!


tT/DEEEAAAr@rrrr1rrfgetfsetfdelr|rwryr{)rrrzIexpected AttributeError from trying to set readonly %r attr on a propertyreadonlyrzwhen setting readonly attr z2 on a property, got unexpected AttributeError msg c&eZdZedZdS)4ClassPropertiesAndMethods.test_properties.<locals>.DcddzSrr)r^s r?rz=ClassPropertiesAndMethods.test_properties.<locals>.D.<lambda>	s
QqSr@N)rrrrr[rr@r?rLr	s"(==11KKKr@rLz,expected ZeroDivisionError from bad property)r^rrrGr1rrcr-rKrrr.rrrrrrrbrrr@r\ZeroDivisionError)
r:rrDrawrrwrrLrOrs
          r?test_propertiesz)ClassPropertiesAndMethods.test_propertiess	F	F	F	F	F	F	F	F
ACCa%%%"%%%b!!!
Ca%%%a)))	AsQ---	qa%%%joc8,,,C

i'''

fe$$$

fe$$$

fe$$$&;<<<

ch
6 2333

ch
6 2333

ch
6 2333*		7		7D
7T2&&&		/1567777"
Y
Y
Ys88==,,q00IIIHLcRUhhhXYYY
Yb)))	2	2	2	2	2	2	2	2
ACC	F

A


IIDEEEEE!			DD	s+9I##
K-AKKL44
MMrrz)Docstrings are omitted with -O2 and abovec2Gfddt}dS)NceZdZdZdZeeZejdeeZ	e	jddS)?ClassPropertiesAndMethods.test_properties_doc_attrib.<locals>.EcdS)
getter methodrrrs r?getterzFClassPropertiesAndMethods.test_properties_doc_attrib.<locals>.E.getter	sqr@cdS)z
setter methodNr)rJrs  r?setterzFClassPropertiesAndMethods.test_properties_doc_attrib.<locals>.E.setter	r@r)rN)
rrrrrrproprGrprop2rsr?rr	s





8F##DT\?;;;H&)))EU]D11111r@rr^)r:rs` r?test_properties_doc_attribz4ClassPropertiesAndMethods.test_properties_doc_attrib	sA
	2
	2
	2
	2
	2
	2
	2
	2
	2
	2
	2
	2r@c^	ddlGfddt}dS#t$rYdSwxYw)Nrc0eZdZejZdS)>ClassPropertiesAndMethods.test_testcapi_no_segfault.<locals>.XN)rrrrtest_with_docstringp)	_testcapisr?rr.	s!HY:;;r@r)rr^ImportError)r:rrs  @r?test_testcapi_no_segfaultz3ClassPropertiesAndMethods.test_testcapi_no_segfault&	sv	<
<
<
<
<
<
<
<F
<
<
<
<
<			DD	s
,,c0Gddt}|jjd||dd|_||d||jd||jd|`||d||dGfdd	}|}d
|_||jd
|`|`Gddt}d|_||jd|`Gfd
d}|}d|_||jd|`dS)NceZdZedZejdZejdZejdZdS)9ClassPropertiesAndMethods.test_properties_plus.<locals>.CrPr}c|jSr_foors r?rz=ClassPropertiesAndMethods.test_properties_plus.<locals>.C.foo4	
y r@c.t||_dSrr+rrs  r?rz=ClassPropertiesAndMethods.test_properties_plus.<locals>.C.foo7	JJ			r@c
|`dSrrrs r?rz=ClassPropertiesAndMethods.test_properties_plus.<locals>.C.foo:	IIIr@N)rrrrrrrdeleterrr@r?rr2	sw(w'''C
Z
!
!Z
!
Z
'
'Z
'
[

[


r@rrPrirrc:eZdZjjdZdS)9ClassPropertiesAndMethods.test_properties_plus.<locals>.Dc.	|`dS#t$rYdSwxYwr)rrrs r?rz=ClassPropertiesAndMethods.test_properties_plus.<locals>.D.fooI	s2			%DDs
N)rrrrrrNsr?rLrH	s2
U]

]


r@rLrceZdZedZejdZejdZejddZdS)9ClassPropertiesAndMethods.test_properties_plus.<locals>.Ec|jSrrrs r?rz=ClassPropertiesAndMethods.test_properties_plus.<locals>.E.fooV	rr@ctr)RuntimeErrorrs  r?rz=ClassPropertiesAndMethods.test_properties_plus.<locals>.E.fooY	s""r@c.t||_dSrrrs  r?rz=ClassPropertiesAndMethods.test_properties_plus.<locals>.E.foo\	rr@Nc
|`dSrrrs  r?rz=ClassPropertiesAndMethods.test_properties_plus.<locals>.E.foo_	rr@r)rrrrrrrrr@r?rrU	s

!
!X
!
Z
#
#Z
#
Z
'
'Z
'
[


[


r@rcZeZdZjjdZejdZdS)9ClassPropertiesAndMethods.test_properties_plus.<locals>.Fc
|`dSrrrs r?rz=ClassPropertiesAndMethods.test_properties_plus.<locals>.F.fooi	rr@c0td||_dSr)maxrrs  r?rz=ClassPropertiesAndMethods.test_properties_plus.<locals>.F.fool	s5MM			r@N)rrrrrr)rsr?rrh	sM
U]

]

Z
*
*Z
*
*
*r@rr)r^rGrrrrr)	r:r^rLrOr;rrrrs	       @@r?test_properties_plusz.ClassPropertiesAndMethods.test_properties_plus1	s
	
	
	
	
	
	
	
	
ACC000a'''1f%%%$$$###
Ea(((a'''										
ACC###
E
E								
ACC###
E	*	*	*	*	*	*	*	*	*	*
ACC"""
EEEr@c	ft}||iti}||itddd}||ddd||tt|||tt	|tddd}||tdd||td#i|||tddid||tdgd	||td
dgfi|||td#i|ddd
ddgdfD]d}	t||d|z+#t$rY7t$r"|dkrn|d|zYawxYw|t5tiidddn#1swxYwYGdd}	t||dn#t$rYnwxYwd|_	d|_
t|}|||jGdd}t|dd|dd|dd|ddg}||dddtttdtdd}||tdtdDd gd!gfD]:}	t||d"|z+#t$rY7wxYwdS)$NrrrX)rqrDrq)onetwor)r)rrr)r)rr)rr/ry0rzno TypeError from dict(%r)ceZdZddddZdS)AClassPropertiesAndMethods.test_dict_constructors.<locals>.Mappingrrrwr)rqrtrDN)rrrrrr@r?Mappingr	s1"%%DDDr@rz*no TypeError from dict(incomplete mapping)cNt|jSr)r6rrrs r?rzBClassPropertiesAndMethods.test_dict_constructors.<locals>.<lambda>	sD)9)9$:$:r@c|j|Sr)rr*s  r?rzBClassPropertiesAndMethods.test_dict_constructors.<locals>.<lambda>	sdilr@ceZdZdZdZdS)JClassPropertiesAndMethods.test_dict_constructors.<locals>.AddressBookEntryc"||_||_dSr)firstlast)r:rrs   r?r4zSClassPropertiesAndMethods.test_dict_constructors.<locals>.AddressBookEntry.__init__	s"
 			r@c8t|j|jgSr)rrrrs r?rzSClassPropertiesAndMethods.test_dict_constructors.<locals>.AddressBookEntry.__iter__	sTZ3444r@N)rrrr4rrr@r?AddressBookEntryr	s2
!
!
!
5
5
5
5
5r@rTimWarsawBarryPeters)rrrwrcg|]	}||dzf
Srrr<rs  r?r=zDClassPropertiesAndMethods.test_dict_constructors.<locals>.<listcomp>	s !=!=!=q1ac(!=!=!=r@)tooshort)toolongzby 1zno ValueError from dict(%r)r)
rrGr6r7rrr
ValueErrorrrr[zipr)r:rObadargrrbads      r?test_dict_constructorsz0ClassPropertiesAndMethods.test_dict_constructorst	sFFBHHBQS!!"",,---Daggii11222Daggii11222##$$DQA...///DII1II&&&D%333444D*1555666D,!=CCCCDDDDII1II&&&BaS$.	A	AF

AV		6?@@@@



E
E
ES==II:VCDDD
E

y
)
)		RLLL																&	&	&	&	&	&	&	&	DOOO
IIBCCCC			D	
;:::OOGL)))	5	5	5	5	5	5	5	5
""5(33""7H55""5(33""7H557
8
8	
hx@@AAAU1XXuQ{{++,,D!=!=E!HH!=!=!=>>???"?%<$==	?	?C
?S					7#=>>>>



	?	?sN,H
I (I
I(JJ	J	K
KK9P!!
P.-P.cd}|tddg~dddddgddd	ddit|jfD]}t|d
}Gddt}d
dg}||t|||}||t||d|_d|_||t||ddgzGdd|}ddg|z}||t|||}	||t|	|d|	_d|	_||t|	|ddgzGddtt}
|
d}d|_
d|_gdfdt|D}||d d!gGd"d#|
}
|
d$}d|_
d|_||jd%|
t5t|dddn#1swxYwY|tt	ttGfd&d'tGfd(dt}t|dS))Nrjunkr:rry@g@22rrcd|DS)Nc<g|]}|d|S)rq)ra)r<r^s  r?r=zKClassPropertiesAndMethods.test_dir.<locals>.interesting.<locals>.<listcomp>	s)@@@!all3.?.?@A@@@r@r)stringss r?interestingz7ClassPropertiesAndMethods.test_dir.<locals>.interesting	s@@w@@@@r@ceZdZdZdZdS)-ClassPropertiesAndMethods.test_dir.<locals>.CrqcdSrrrs r?Cmethodz5ClassPropertiesAndMethods.test_dir.<locals>.C.Cmethod	rr@N)rrrCdatarrr@r?rr	E#####r@rrrcdSrrrs r?rz4ClassPropertiesAndMethods.test_dir.<locals>.<lambda>	r@cdatacmethodceZdZdZdZdS)-ClassPropertiesAndMethods.test_dir.<locals>.ArqcdSrrrs r?Amethodz5ClassPropertiesAndMethods.test_dir.<locals>.A.Amethod	rr@N)rrrAdatarrr@r?r{r	rr@r{rrrcdS)Nrtrrs r?rz4ClassPropertiesAndMethods.test_dir.<locals>.<lambda>	rr@adataamethodceZdZdS)-ClassPropertiesAndMethods.test_dir.<locals>.MNrKrr@r?Mr	rMr@rrQrq)rr__package__
__loader____spec__cg|]}|v|	Srr)r<rdefault_attributess  r?r=z6ClassPropertiesAndMethods.test_dir.<locals>.<listcomp>	s$JJJqa7I.I.I.I.I.Ir@rDrXc*eZdZdZeeZdS).ClassPropertiesAndMethods.test_dir.<locals>.M2cdS)NNot a dict!rrs r?getdictz6ClassPropertiesAndMethods.test_dir.<locals>.M2.getdict	s$}r@N)rrrrrrKrr@r?rgr	s,
%
%
%x((HHHr@rgm2rc6eZdZdZdZfdZdZfdZdS)3ClassPropertiesAndMethods.test_dir.<locals>.Wrapperc||_dSr
_Wrapper__objr,s  r?r4z<ClassPropertiesAndMethods.test_dir.<locals>.Wrapper.__init__

 


r@c0dt|jzS)NzWrapper(%s))rrrs r?rz<ClassPropertiesAndMethods.test_dir.<locals>.Wrapper.__repr__
s$tDJ'7'777r@c0|j|Srr)r:r
Wrappers  r?r[z?ClassPropertiesAndMethods.test_dir.<locals>.Wrapper.__getitem__
swtz#///r@c*t|jSr)rrrs r?rBz;ClassPropertiesAndMethods.test_dir.<locals>.Wrapper.__len__
s4:&r@c@t|j|Sr)rJr)r:r=rs  r?rz?ClassPropertiesAndMethods.test_dir.<locals>.Wrapper.__getattr__
swwtz488999r@N)rrrr4rr[rBrrsr?rr
st
!
!
!
8
8
8
0
0
0
0
0
'
'
'
:
:
:
:
:
:
:r@rc0eZdZfdZeeZdS)rc4t|Srr;)r:rs r?
__getclassz8ClassPropertiesAndMethods.test_dir.<locals>.C.__getclass
swtDzz***r@N)rrr_C__getclassrrrsr?rz-ClassPropertiesAndMethods.test_dir.<locals>.C
s7
+
+
+
+
+ ,,IIIr@)rGr.rItest_dirr^rrrrrrXrDrKrrEllipsis)r:rrrrcstuffr^r{astuffrDr	minstancenamesrg
m2instancerrs               @@r?rz"ClassPropertiesAndMethods.test_dir	s, 0111aS1#sD$1tT]R		CHHHH	A	A	A	$	$	$	$	$	$	$	$9%SVV,,f555
ACCSVV,,f555"N	SVV,,f7K.KLLL	$	$	$	$	$	$	$	$9%.SVV,,f555
ACCSVV,,f555"N	SVV,,f7K.KLLL					S					AcFF			888JJJJC	NNJJJc
+++	)	)	)	)	)	)	)	)
RXX


,m<<<


y
)
)		
OOO															
	
VXXH

666
	:
	:
	:
	:
	:
	:
	:f
	:
	:
	:	-	-	-	-	-	-	-	-	-	-
	AACCsJ11J58J5c	
Gddt}||ddGfdd||ddGd	d
|}t||_||ddG	fd
d|	|	ddGfddtG
fdd	
|
ddGdd
}||_||dd	t	d|dn#t$rYnwxYw	t	||dn#t$rYnwxYw	t	d|dn#t$rYnwxYw	t	||d n#t$rYnwxYwGd!d"t}Gd#d$|}|}||j	d%|t||j	dGd&d't}Gfd(d)||
|j|t5t|d*ddddS#1swxYwYdS)+NceZdZdZdS)0ClassPropertiesAndMethods.test_supers.<locals>.Acd|zS)NzA(%r)rr:rDs  r?rNz5ClassPropertiesAndMethods.test_supers.<locals>.A.meth#
s{"r@Nr}rr@r?r{r"
#
#
#
#
#
#r@r{rqzA(1)c(eZdZfdZdZxZS)0ClassPropertiesAndMethods.test_supers.<locals>.Bc2t||_dSr)rsr)r:rrs r?r4z9ClassPropertiesAndMethods.test_supers.<locals>.B.__init__)
s$Q~~r@cBd|z|j|zS)NzB(%r)rrs  r?rNz5ClassPropertiesAndMethods.test_supers.<locals>.B.meth+
!{T\%6%6q%9%999r@)rrrr4rNrv)rrs@r?rr"(
sM
.
.
.
.
.
.
:
:
:
:
:
:
:r@rrrzB(2)A(2)ceZdZdZdS)0ClassPropertiesAndMethods.test_supers.<locals>.CcBd|z|j|zS)NzC(%r)rrs  r?rNz5ClassPropertiesAndMethods.test_supers.<locals>.C.meth1
r%r@Nr}rr@r?rr'0
s#
:
:
:
:
:r@rrtzC(3)A(3)c"eZdZfdZxZS)0ClassPropertiesAndMethods.test_supers.<locals>.DcVd|zt||zS)NzD(%r))rsrN)r:rDrLrs  r?rNz5ClassPropertiesAndMethods.test_supers.<locals>.D.meth8
s({U1d^^%8%8%;%;;;r@)rrrrNrv)rrLs@r?rLr*7
>
<
<
<
<
<
<
<
<
<
<r@rLrwzD(4)C(4)B(4)A(4)c"eZdZfdZxZS)6ClassPropertiesAndMethods.test_supers.<locals>.mysuperc4t|j|Srr)r:r;rmysupers  r?r4z?ClassPropertiesAndMethods.test_supers.<locals>.mysuper.__init__@
s4uWd++4d;;r@)rrrr4rv)rr0s@r?r0r.?
r,r@r0ceZdZfdZdS)0ClassPropertiesAndMethods.test_supers.<locals>.EcNd|z||zS)NzE(%r))rN)r:rDrr0s  r?rNz5ClassPropertiesAndMethods.test_supers.<locals>.E.methD
s,{WWQ%5%5%:%:1%=%===r@Nr})rr0sr?rr2C
s3
>
>
>
>
>
>
>
>r@rrzE(5)D(5)C(5)B(5)A(5)ceZdZdZdS)0ClassPropertiesAndMethods.test_supers.<locals>.Fcb|j}d|d|jjd||zS)NzF(z)[])	_F__superrrrN)r:rDr^s   r?rNz5ClassPropertiesAndMethods.test_supers.<locals>.F.methJ
s4L&'aa)=)=)=>JJr@Nr}rr@r?rr5I
s(
K
K
K
K
Kr@rrz!F(6)[mysuper]E(6)D(6)C(6)B(6)A(6)rzshouldn't allow super(D, 42)zshouldn't allow super(D, C())rz$shouldn't allow super(D).__get__(12)z%shouldn't allow super(D).__get__(C())c*eZdZdZeeZdS)5ClassPropertiesAndMethods.test_supers.<locals>.DDbasecdSrjrrs r?rwz:ClassPropertiesAndMethods.test_supers.<locals>.DDbase.getxs
s22r@Nrrrrwrrrr@r?DDbaser:r
s$%%%AAAr@r=c*eZdZdZeeZdS)4ClassPropertiesAndMethods.test_supers.<locals>.DDsubcdSrrrs r?rwz9ClassPropertiesAndMethods.test_supers.<locals>.DDsub.getxw
s77r@Nr<rr@r?DDsubr?v
s$***AAAr@rArPc&eZdZedZdS)3ClassPropertiesAndMethods.test_supers.<locals>.BasecdSrrrs r?rz<ClassPropertiesAndMethods.test_supers.<locals>.Base.<lambda>
s%r@N)rrrraProprr@r?BaserC
s!H//00EEEr@rFc2eZdZefdZxZS)2ClassPropertiesAndMethods.test_supers.<locals>.Subc.t|jSr)rsrE)klassSubrs r?rz7ClassPropertiesAndMethods.test_supers.<locals>.Sub.test
sS''--r@)rrrrrrv)rrKs@r?rKrH
sH

.
.
.
.
.[
.
.
.
.
.r@rKr)
r^rGrNrsrr8rrrcrrrEr)r:r{rrr=rAddrFrrLrrKr0rs        @@@@@r?test_supersz%ClassPropertiesAndMethods.test_supers
ss	#	#	#	#	#	#	#	#	
!f---	:	:	:	:	:	:	:	:	:	:	
!j111	:	:	:	:	:	:	:	:Ahh!j111	<	<	<	<	<	<	<1	<	<	<	
!&8999	<	<	<	<	<	<	<e	<	<	<	>	>	>	>	>	>	>	>	>	>	>	
!&<===	K	K	K	K	K	K	K	Kgajj!&IJJJ	6!RLLL
II45555			D	
	7!QQSSMMM
II56666			D	
	>!HHR   
II<====			D	
	?!HHQQSS!!!
II=>>>>			D						V								F			UWWw'''ub))+R000
	1	1	1	1	16	1	1	1	.	.	.	.	.	.	.$	.	.	.
	
TZ000

y
)
)		$1																		sZG..
G;:G;?H--
H:9H:>"I66
JJ*K
KK0OOOc=Gfddt|tddzd|tddzdd}||d|t|d|t|jt|t|td||
jt||d	z	jt||d	zjt|d	d
zjt|d	d
z	jtGfddt|t
d
dzd|t
ddzdd}||d|t|d|t|td|t|jt||
jt||jt|d	jt||d	z	jt||d	zjt||d	z
jt||dzjt||dzjt||dzjt|d|zjt||d	zjt||d	zjt||dzjt|d	d
zjt|d	d
z	jt|td	jtGddt}|d}||d	zjt|d	|zjt|d}||ji|t|dGddt}|t|dd|d}||d|t|d|t|jt|t|td||
jtGddt}|dd}|t|dtdd}||jt||||t|||t|jt||}|t|d||||t|||t|jt|t|t|||
jt||d	zjt||d	z|||d	z
jt||d	z
|||dzjt||dz|||dzjt||dz|Gd d!t}|d"}||d"|||d#|||d"td$D]X}|t|}|}	|	}
||
|Y|d%}|t|d%|t|jt|t|td%||ddjt||dzjt||d	zjt||d&zjt|d&}|t|d&|t|jt|||zjt||d	zjt||dzjt||d'zjt||ddjtGd(d)t}|d*}||d*|||d+|||d*td,D]~}|d-tt t|}|}|}	||	||d.}|t
|d.|t
|jtd/}||}||||t
|||t
|jt|t|t|||di|d||di|d||d-zjt||d-z||d-|zjt|d-|z|||d	zjt||d	zd-||dzjt||dz|||d'zjt||d'z||z||ddjt||dd|||d	d	jt||d	d	d-||jt|||||jt|||||jt|||i}
|||
jt|||
|||d0d0jt||d0d0|||t/|jt||t/||||t/|jt||t/||||t/|jt||t/||||jt|||Gd1d2t}|d3}	||	d3||	|d4||	|d3d.}||}	|t
|	||t
|	jt|t|	t|||	di|d||di|	d||	jt||	|||	jt||	|||	jt||	|||	d0d0jt||	d0d0|||	d5d5jt||	d5d5|||	t/|	jt||	t/|	|||	t/|	jt||	t/|	|||	t/|	jt||	t/|	|||	jt||	|||	jt||	|||	jt||	|||	jt||	|||	d-zjt||	d-z||d-|	zjt|d-|	z|||	d	zjt||	d	zd-||	dzjt||	dz|||	d'zjt||	d'z||z||	ddjt||	dd|||	d	d	jt||	d	d	d-Gd6d7t<}|td}||t=td|d8||t=tdd8gzd|d<||t=td9| td9d:||t=td:g|d;d<||t=td<|d=d<=|t/|d=||t=td=|t=|t=td=||d	d	||dd||d>d	||dd||ddt=tddS)?Nc eZdZdZfdZdS)@ClassPropertiesAndMethods.test_basic_inheritance.<locals>.hexintc t|Sr)hexrs r?rzIClassPropertiesAndMethods.test_basic_inheritance.<locals>.hexint.__repr__
4yy r@cLt||Sr)r-rU)r:rhexints  r?rUzHClassPropertiesAndMethods.test_basic_inheritance.<locals>.hexint.__add__
s!vckk$66777r@N)rrrrrU)rUsr?rUrP
s=
!
!
!
8
8
8
8
8
8
8r@rU	0x10i0x3efi90rrc0eZdZgZdZfdZeZxZS)AClassPropertiesAndMethods.test_basic_inheritance.<locals>.octlongc t|Sr)octrs r?rzIClassPropertiesAndMethods.test_basic_inheritance.<locals>.octlong.__str__
rSr@cp|t||Sr)rrsrU)r:rroctlongs  r?rUzIClassPropertiesAndMethods.test_basic_inheritance.<locals>.octlong.__add__
s-~~eGT&:&:&B&B5&I&IJJJr@)rrrrrrUrrv)rr_s@r?r_r[
sQI
!
!
!
K
K
K
K
K
KHHHHHr@r_rtr0o10i0o5675rqrceZdZdS)CClassPropertiesAndMethods.test_basic_inheritance.<locals>.longcloneNrKrr@r?	longclonerc
rMr@rdc"eZdZdgZddZdZdS)CClassPropertiesAndMethods.test_basic_inheritance.<locals>.precfloatrrrc.t||_dSr)r-r)r:rrs   r?r4zLClassPropertiesAndMethods.test_basic_inheritance.<locals>.precfloat.__init__
sII			r@cd|j|fzS)Nrrrs r?rzLClassPropertiesAndMethods.test_basic_inheritance.<locals>.precfloat.__repr__
sD 111r@N)rr)rrrrr4rrr@r?	precfloatrf
s>I
&
&
&
&
2
2
2
2
2r@rig?z1.1g@ceZdZdZdS)DClassPropertiesAndMethods.test_basic_inheritance.<locals>.madcomplexc$d|j|jfzS)Nz%.17gj%+.17grrrs r?rzMClassPropertiesAndMethods.test_basic_inheritance.<locals>.madcomplex.__repr__
s%DI(>>>r@N)rrrrrr@r?
madcomplexrk
s#
?
?
?
?
?r@rnrwz4j-3ceZdZdZdZdS)BClassPropertiesAndMethods.test_basic_inheritance.<locals>.madtupleNc|j|jSt|}||||_|jSr)_revr6rrr:rs  r?revzFClassPropertiesAndMethods.test_basic_inheritance.<locals>.madtuple.rev
sE9(9$JJ		 NN1--	y r@rrrrsrurr@r?madtuplerq
(D
!
!
!
!
!r@rw)
rqrrrtrwrrrVrWr)
rrWryrVrrrwrtrrrqi)rqrrrtrwrrrrceZdZdZdZdS)CClassPropertiesAndMethods.test_basic_inheritance.<locals>.madstringNc|j|jSt|}||d||_|jSNrrsr6rrr2rts  r?ruzGClassPropertiesAndMethods.test_basic_inheritance.<locals>.madstring.rev!O9(9$JJ		 NN2771::66	y r@rvrr@r?	madstringr{rxr@rabcdefghijklmnopqrstuvwxyzzyxwvutsrqponmlkjihgfedcbar12345zrceZdZdZdZdS)DClassPropertiesAndMethods.test_basic_inheritance.<locals>.madunicodeNc|j|jSt|}||d||_|jSr}r~rts  r?ruzHClassPropertiesAndMethods.test_basic_inheritance.<locals>.madunicode.revarr@rvrr@r?
madunicoder_rxr@rABCDEFFEDCBAxyceZdZdS)AClassPropertiesAndMethods.test_basic_inheritance.<locals>.sublistNrKrr@r?sublistrrMr@rrPrrr)!r-rGrrrrGr@r+rKr.rrrurr2mapr-striprrstrip	translatereplaceljustrrjustcenterlowerupper
capitalizetitler6rr0)r:rDrdrirnbaserwrrPrrrr^identitytabrrrUr_s                @@r?test_basic_inheritancez0ClassPropertiesAndMethods.test_basic_inheritance
s	8	8	8	8	8	8	8S	8	8	8	
ffQii!m,,f555ffTllQ.//999F5MME"""Q'''

c!ff&,,,a$u++...

rnc***

qAv(#...

qAv(#...

vvayyB13777

vvayyB13777							c				
WWQZZ!^,,f555	
Q.//:::GENNE"""Q'''a$u++...

c!ff&,,,

rnc***

rnc***



{-s333

qAv(#...

qAv(#...

q1u'---

q1u'---

qAv(#...

qAv(#...

q1u'---

q1u'---

q1u'---

q2v(#...

wwqzzR'2C888

wwqzzR'2C888

c''!**oo/555								IaLL

q1u'---

q1u'---
IbMMR(((Q$$$	2	2	2	2	2	2	2	2	
iinn--u555IeG$$$q7+++

eAhh(%000a$w--000

rne,,,	?	?	?	?	?	?	?	?
Jr1a&)))r1~~111D!!!T***-w777JqMMa&)))D!!!T***-w777a$t**---1"111!a%*G444Q%%%!a%*G444Q%%%!a%*G444Q%%%!a%*G444Q%%%	!	!	!	!	!u	!	!	!
H*++1222((+@"A"ABBB1F(G(GHHHs	#	#Aq""AAAQ""""H[!!q;///

eAhh(%000a${"3"3444

adne,,,

q1u'///

q1u'///

q2v(%000HRLLq2&&&

eAhh(%000

q1u'///

q1u'///

q1u'///

q1u'///

adne,,,	!	!	!	!	!	!	!	!
I2338999)),H"I"IJJJ		2N(O(OPPPs	#	#A	"''#c588"4"45566AAAQ""""IgQ)))

c!ff&,,,IdOOD!!!Q&&&

c!ff&,,,a$t**---!Qq)))$1q)))

q2v(#...R&&&

rAv(#...a&&&

q1u'---Q###

q1u'---Q%%%

q1u'---Qt,,,

adnc***111t$$$

a!f&,,,1Q3$$$

aggii)3///D)))

ahhjj*C000T***

ahhjj*C000T***

akk+..8#>>>[114888

aiiS))3S9993,,d333

aggc!ffoo/555Q$///

aggc!ffoo/555Q$///

ahhs1vv&&0#666#a&&))4000

aggii)3///D)))	!	!	!	!	!	!	!	!
Jx  H%%%**X"6"6777

8(<(<===JtQ&&&

c!ff&,,,a$t**---!Qq)))$1q)))

aggii)3///D)))

ahhjj*C000T***

ahhjj*C000T***

aiiS))3S9993,,d333

aiid++5s;;;4..555

ahhs1vv&&0#666#a&&))4000

aggc!ffoo/555Q$///

aggc!ffoo/555Q$///

aggii)3///D)))

aggii)3///D)))

allnn.444...

aggii)3///D)))

q2v(#...R&&&

rAv(#...a&&&

q1u'---Q###

q1u'---Q%%%

q1u'---Qt,,,

adnc***111t$$$

a!f&,,,1Q3$$$					d			GE!HHDqNN+++	DqNNgY6777!DqNN+++	q"DrOO,,,"##DrOO,,,
beHQ$$$DrOO,,,a$uRyy//2221q!!!1q!!!3###2"""2A2U1XX/////r@c|td5tddddn#1swxYwY|td5tddddn#1swxYwY|td5t	ddddn#1swxYwY|t
ddt
dd|td	d
|tdd
d|td5ttddddn#1swxYwY|td5tddddn#1swxYwYttttttttfD]7}	|d|d|z(#t$rY4wxYwdS)Nzkeyword argumentrqrrrrirmir500abcstrict)r^errorsr&rt)sequencer,)bogus_keyword_argz4expected TypeError from bogus keyword argument to %r)r]rr-r.boolrGrr@rrr6r)r:constructors  r?
test_keywordsz'ClassPropertiesAndMethods.test_keywordssl

#
#I/A
B
B		!HHHH															

#
#I/A
B
B		AJJJJ															

#
#I/A
B
B		1IIII															bs333WS"5E5EFFFC%000F8<<<eDDD

#
#I/A
B
B	%	%588$$$$	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%

#
#I/A
B
B	%	%)$$$$	%	%	%	%	%	%	%	%	%	%	%	%	%	%	% Wc3!4)	+	+K
+a0000		P)*++++



		+	+sg9==A<<BB"B??CC!FFF1GGGH33
I?IcGfddt|dd|dd|tdddddd	d
di}||dd||dd	||d
d|d|||dddS)Nc*eZdZdZdZfdZdZdS)FClassPropertiesAndMethods.test_str_subclass_as_dict_key.<locals>.cistrzSubclass of str that computes __eq__ case-insensitively.

            Also computes a hash code of the string in canonical form.
            cj||_t|j|_dSr)r	canonicalrGhashcoders  r?r4zOClassPropertiesAndMethods.test_str_subclass_as_dict_key.<locals>.cistr.__init__s&!& $T^ 4 4


r@cZt|s|}|j|jkSr)r'r)r:rcistrs  r?rCzMClassPropertiesAndMethods.test_str_subclass_as_dict_key.<locals>.cistr.__eq__s1!%//)!E%LLE~88r@c|jSr)rrs r?rHzOClassPropertiesAndMethods.test_str_subclass_as_dict_key.<locals>.cistr.__hash__s
}$r@N)rrrrr4rCrH)rsr?rrsV



5
5
5
9
9
9
9
9

%
%
%
%
%r@rABCr&aBcrrqrrrtHreerttWoTHrEEONethrEE)r@rGrr)r:rOrs  @r?test_str_subclass_as_dict_keyz7ClassPropertiesAndMethods.test_str_subclass_as_dict_keysx	%	%	%	%	%	%	%C	%	%	%$	
uu---e---UU5\\**E222
U5\\1eeEllAuuW~~qA55<<!,,,55<<!,,,55>>*A...

eeEllA&&&uuW~~..22222r@cj
Gdd}|ttfD]}G
fdd|

d}
d}
d}||d|||d}dD]}dD]}d	D]}	|td
|	ztd|	zd||fz|td
|	ztd|	zd||fz|td|	ztd|	zd||fzdS)NceZdZdS)CClassPropertiesAndMethods.test_classic_comparisons.<locals>.classicNrKrr@r?classicrrMr@rcReZdZdZfdZfdZfdZfdZfdZfdZ	dS)	=ClassPropertiesAndMethods.test_classic_comparisons.<locals>.Cc.t||_dSrr-rrs  r?r4zFClassPropertiesAndMethods.test_classic_comparisons.<locals>.C.__init__!$UDJJJr@ct|r|j|jkSt|tst|tr|j|kStSrr'rr-rr:rrs  r?rCzDClassPropertiesAndMethods.test_classic_comparisons.<locals>.C.__eq__Z!%++9#zU[88!%--3E31G1G3#zU22))r@ct|r|j|jkSt|tst|tr|j|kStSrrrs  r?rLzDClassPropertiesAndMethods.test_classic_comparisons.<locals>.C.__ne__%rr@ct|r|j|jkSt|tst|tr|j|kStSrrrs  r?rUzDClassPropertiesAndMethods.test_classic_comparisons.<locals>.C.__lt__+Z!%++8#zEK77!%--2E31G1G2#zE11))r@ct|r|j|jkSt|tst|tr|j|kStSrrrs  r?rSzDClassPropertiesAndMethods.test_classic_comparisons.<locals>.C.__le__1rr@ct|r|j|jkSt|tst|tr|j|kStSrrrs  r?rPzDClassPropertiesAndMethods.test_classic_comparisons.<locals>.C.__gt__7rr@ct|r|j|jkSt|tst|tr|j|kStSrrrs  r?rNzDClassPropertiesAndMethods.test_classic_comparisons.<locals>.C.__ge__=rr@N)
rrrr4rCrLrUrSrPrNrNsr?rrs,,,********************************r@rrqrrrtrsr r"r$r%r&r'c[x] %s c[y]x %s y
x=%d, y=%d	c[x] %s y	x %s c[y])r-r^rGrH)r:rrrr^c3r^ryoprs          @r?test_classic_comparisonsz2ClassPropertiesAndMethods.test_classic_comparisonss								c6*9	<9	<D&
*&
*&
*&
*&
*&
*&
*D&
*&
*&
*P1B1B1BR###2"%%A
<
< 
<
<A>	<	<((nr.A)B)B%)(R-%8%8%1QF%:<<<((kB.>)?)?%)(R-%8%8%1QF%:<<<((kB.>)?)?%)(R-%8%8%1QF%:<<<<	<
<
<]9	<9	<r@cGddt}|d}|dd|Gddt}|d}|dd|Gdd	}|tttfD]}Gfd
d|d}d}d
}	|d|||	d}
dD]}dD]}dD]}
td|
ztd|
zd||fztd|
ztd|
zd||fztd|
ztd|
zd||fzdS)NceZdZdS):ClassPropertiesAndMethods.test_rich_comparisons.<locals>.ZNrKrr@r?rrXrMr@rrqy?ceZdZdZdS);ClassPropertiesAndMethods.test_rich_comparisons.<locals>.ZZcL	t||z
dkS#tcYSxYw)Ngư>)r+rrs  r?rCzBClassPropertiesAndMethods.test_rich_comparisons.<locals>.ZZ.__eq__^s3*te|,,44*))))s	#NrDrr@r?ZZr]s#
*
*
*
*
*r@rgׇP?ceZdZdS)@ClassPropertiesAndMethods.test_rich_comparisons.<locals>.classicNrKrr@r?rrgrMr@rc\eZdZdZfdZfdZfdZfdZfdZfdZ	fdZ
d	S)
:ClassPropertiesAndMethods.test_rich_comparisons.<locals>.Cc.t||_dSrrrs  r?r4zCClassPropertiesAndMethods.test_rich_comparisons.<locals>.C.__init__krr@c2ddS)Nzshouldn't call __cmp__)r)rJrr:s  r?__cmp__zBClassPropertiesAndMethods.test_rich_comparisons.<locals>.C.__cmp__msII677777r@ct|r|j|jkSt|tst|tr|j|kStSrrrs  r?rCzAClassPropertiesAndMethods.test_rich_comparisons.<locals>.C.__eq__orr@ct|r|j|jkSt|tst|tr|j|kStSrrrs  r?rLzAClassPropertiesAndMethods.test_rich_comparisons.<locals>.C.__ne__urr@ct|r|j|jkSt|tst|tr|j|kStSrrrs  r?rUzAClassPropertiesAndMethods.test_rich_comparisons.<locals>.C.__lt__{rr@ct|r|j|jkSt|tst|tr|j|kStSrrrs  r?rSzAClassPropertiesAndMethods.test_rich_comparisons.<locals>.C.__le__rr@ct|r|j|jkSt|tst|tr|j|kStSrrrs  r?rPzAClassPropertiesAndMethods.test_rich_comparisons.<locals>.C.__gt__rr@ct|r|j|jkSt|tst|tr|j|kStSrrrs  r?rNzAClassPropertiesAndMethods.test_rich_comparisons.<locals>.C.__ge__rr@N)rrrr4rrCrLrUrSrPrN)rr:sr?rrjs,,,88888********************************r@rrrrtrsrrrrrr)rrGr-r^r6rH)r:rrYrzzrrrr^rr^rrrrs`             @r?test_rich_comparisonsz/ClassPropertiesAndMethods.test_rich_comparisonsVs								
AaDDD!!!q!!!	*	*	*	*	*	*	*	*R	]]T"""r"""								c640:	@:	@D(
*(
*(
*(
*(
*(
*(
*(
*D(
*(
*(
*R1B1B1BR###2"%%A
@
@ 
@
@A>	@	@((nr.A)B)B)-hm)<)<)5A)>@@@((kB.>)?)?)-hm)<)<)5A)>@@@((kB.>)?)?)-hm)<)<)5A)>@@@@	@
@
@_:	@:	@r@clddlm}fd}||jd|tjddS)Nr)FileIOc>|j|dSr)rGr)descrwhatr:s  r?checkz6ClassPropertiesAndMethods.test_descrdoc.<locals>.checks!U]D11111r@zTrue if the file is closedz!the real part of a complex number)_iorclosedrr)r:rrs`  r?
test_descrdocz'ClassPropertiesAndMethods.test_descrdocs^	2	2	2	2	2
fm9:::
gl?@@@@@r@cnGddtGfdd}Gfddt}||jd||jd||jd	||jd
dS)NceZdZdZdS)?ClassPropertiesAndMethods.test_doc_descriptor.<locals>.DocDescrcF|r|jjdz}|r|j}d|d|S)Nz	 instancezobject=z; type=)rr)r:r^otypes   r?rczGClassPropertiesAndMethods.test_doc_descriptor.<locals>.DocDescr.__get__s<E#-6DF+!NE/5vvuu==r@Nr rr@r?DocDescrrs#
>
>
>
>
>r@rc$eZdZZdS)?ClassPropertiesAndMethods.test_doc_descriptor.<locals>.OldClassNrrsr?OldClassrhjjGGGr@rc$eZdZZdS)?ClassPropertiesAndMethods.test_doc_descriptor.<locals>.NewClassNrrsr?NewClassrrr@rzobject=None; type=OldClassz'object=OldClass instance; type=OldClasszobject=None; type=NewClassz'object=NewClass instance; type=NewClass)r^rGr)r:rrrs   @r?test_doc_descriptorz-ClassPropertiesAndMethods.test_doc_descriptors
	>	>	>	>	>v	>	>	>	!	!	!	!	!	!	!	!	!	!	!	!	!	!	!	!	!v	!	!	!)+GHHH+-VWWW)+GHHH+-VWWWWWr@cVGddt}Gddt}Gddt}Gdd||}||||fD]Y}||||fD]P}|}||_|j|||_|j|QZfd	}||t|t|||d
||t|tt|ttGddt}	|d
t|dt
t}
||
t
d
||
t
d~
Gddt}Gddt}Gddt}
Gddt}Gddt}Gdd|}Gdd|
}Gdd|}Gdd |}Gd!d"|}Gd#d$|}||f||
f|
|f||f||ffD]\}}|}d
|_||_|j|d%|d&|d'|jd
||_|j|d%|d&|d'|jd
||||||||t|	f
D]/}||||||||t|	f
D]}||ur|||0Gd(d)tGfd*d+tfd,td-D}~dS).NceZdZdS)3ClassPropertiesAndMethods.test_set_class.<locals>.CNrKrr@r?rr	rr@rceZdZdS)3ClassPropertiesAndMethods.test_set_class.<locals>.DNrKrr@r?rLrrr@rLceZdZdS)3ClassPropertiesAndMethods.test_set_class.<locals>.ENrKrr@r?rr
rr@rceZdZdS)3ClassPropertiesAndMethods.test_set_class.<locals>.FNrKrr@r?rrrr@rc	||_d|d|n#t$rYnwxYw	t|dd|zdS#ttf$rYdSwxYw)Nshouldn't allow z
.__class__ = rz shouldn't allow del %r.__class__)rrrr*r)rrr:s  r?cantz6ClassPropertiesAndMethods.test_set_class.<locals>.cants
H			AAFGGGG




B;'''		<q@AAAAA~.



s&
33A!!A65A6rqceZdZgZdS)5ClassPropertiesAndMethods.test_set_class.<locals>.IntNrrr@r?IntrsB			r@rTrrceZdZddgZdS)3ClassPropertiesAndMethods.test_set_class.<locals>.GrDrXNrrr@r?rxrr>r@rxceZdZddgZdS)3ClassPropertiesAndMethods.test_set_class.<locals>.HrXrDNrrr@r?rKrr>r@rKceZdZddgZdS)3ClassPropertiesAndMethods.test_set_class.<locals>.IrDrXNrrr@r?rrr>r@rceZdZddgZdS)3ClassPropertiesAndMethods.test_set_class.<locals>.Jr^rXNrrr@r?Jrr>r@rceZdZgdZdS)3ClassPropertiesAndMethods.test_set_class.<locals>.K)rDrXrONrrr@r?Kr rr@r!ceZdZdgZdS)3ClassPropertiesAndMethods.test_set_class.<locals>.Lr;Nrrr@r?rr#rr@rceZdZdgZdS)3ClassPropertiesAndMethods.test_set_class.<locals>.Mr;Nrrr@r?rr%rr@rceZdZdgZdS)3ClassPropertiesAndMethods.test_set_class.<locals>.NrhNrrr@r?rr'rlr@rceZdZdgZdS)3ClassPropertiesAndMethods.test_set_class.<locals>.PrKNrrr@r?Pr)rgr@r*ceZdZdS)3ClassPropertiesAndMethods.test_set_class.<locals>.QNrKrr@r?Qr,rMr@r-ceZdZddgZdS)3ClassPropertiesAndMethods.test_set_class.<locals>.RrKrhNrrr@r?Rr/s#]3IIIr@r0z
assigning z as __class__ for z silently failedceZdZdS)3ClassPropertiesAndMethods.test_set_class.<locals>.ONrKrr@r?Or2
rMr@r3ceZdZfdZdS)3ClassPropertiesAndMethods.test_set_class.<locals>.Ac|_dSrr)r:r3s r?r5z;ClassPropertiesAndMethods.test_set_class.<locals>.A.__del__
s!"r@Nrrrr5)r3sr?r{r5
s.
#
#
#
#
#
#
#r@r{c$g|]}
Srr)r<rr{s  r?r=z<ClassPropertiesAndMethods.test_set_class.<locals>.<listcomp>
s%%%QQQSS%%%r@r)
r^rrr6r-rrIrDrGr)r:rrLrrrcls2rrrorxrKrrr!rrrr*r-r0rr{r3s`                      @@r?test_set_classz(ClassPropertiesAndMethods.test_set_classs1aA:	0	0C1a

0
0CEE"

ak4000!

ak3////
0	B	B	B	B	B	
QQSS$TVVQQQSS!QQSS&VXXtTVVV&&&&&#&&&T3Q


HHQQQT


	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#	(	(	(	(	(	(	(	(																	(	(	(	(	(	(	(	(	%	%	%	%	%	%	%	%									4	4	4	4	4	4	4	4a&1a&1a&1a&1a&A
	%
	%ICAACAKMM!+ttIMqqqQ
S
S
SQS!$$$AKMM!+ssILaaaP
R
R
RQS!$$$$aAq!Q44	"	"C1aAq!Qc9
"
"$;;SSUUD!!!!
"									#	#	#	#	#	#	#	#	#	#
&%%%%**%%%
AAr@c2Gddt}|}ddi|_|jdfd|d|g|d|`Gddtfd}Gd	d
t}Gddt}Gd
dt|}Gddt|}|||fD]B}|||j}		d|	d<d|z3#t$rY?wxYwGddtj}
Gddtj}|
|fD]"}|d}
||
d|
jd<#d}Gddt}Gddt}t||fD]d}|}ddi|_|j
d|||tedS)NceZdZdS)2ClassPropertiesAndMethods.test_set_dict.<locals>.CNrKrr@r?rr>
rr@rrXrqc~	||_d|d|dS#ttf$rYdSwxYw)Nrz.__dict__ = )rKrrr)rrr:s  r?rz5ClassPropertiesAndMethods.test_set_dict.<locals>.cant
s`
J!
			44HIIIII#I.



s'<<ceZdZdS)5ClassPropertiesAndMethods.test_set_dict.<locals>.BaseNrKrr@r?rFrA+
rMr@rFc.|i	|`d|zn#ttf$rYnwxYwjd}	||id|zdS#ttf$rYdSwxYw)zR
            x has to be an instance of a class inheriting from Base.
            zshouldn't allow del %r.__dict__rKz&dict_descr allowed access to %r's dictN)rKrrrr)r
dict_descrrFrr:s  r?verify_dict_readonlyzEClassPropertiesAndMethods.test_set_dict.<locals>.verify_dict_readonly-
s
DBKKK
AJ		;a?@@@@#I.



z2J
H""1b)))		BQFGGGGG#I.



s*>>A??BBceZdZdS)6ClassPropertiesAndMethods.test_set_dict.<locals>.Meta1NrKrr@r?Meta1rFA
rMr@rGceZdZdS)6ClassPropertiesAndMethods.test_set_dict.<locals>.Meta2NrKrr@r?Meta2rIC
rMr@rJceZdZdS)2ClassPropertiesAndMethods.test_set_dict.<locals>.DNrKrr@r?rLrLE
rMr@rLr@ceZdZdS)2ClassPropertiesAndMethods.test_set_dict.<locals>.ENrKrr@r?rrNG
rMr@reggsrz%r's __dict__ can be modifiedceZdZdS)8ClassPropertiesAndMethods.test_set_dict.<locals>.Module1NrKrr@r?Module1rQT
rMr@rRceZdZdS)8ClassPropertiesAndMethods.test_set_dict.<locals>.Module2NrKrr@r?Module2rTV
rMr@rUc<	|`dS#ttf$rYdSwxYw)NTF)rKrr)r;s r?can_delete_dictz@ClassPropertiesAndMethods.test_set_dict.<locals>.can_delete_dicta
s<
Jt~.


uu
sceZdZdS);ClassPropertiesAndMethods.test_set_dict.<locals>.Exception1NrKrr@r?
Exception1rYh
rMr@rZceZdZdS);ClassPropertiesAndMethods.test_set_dict.<locals>.Exception2NrKrr@r?
Exception2r\j
rMr@r]rD)r^rKrGrXrIrrr>r?r0rDr)r:rrDrDrGrJrLrr
class_dictrRrUr?rrWrZr]
ExceptionTyper;rFrs`                  @@r?
test_set_dictz'ClassPropertiesAndMethods.test_set_dict
s
ACC1X
a   	J	J	J	J	J	
Q


QQ



J					6				H	H	H	H	H	H	H(					D$								D$								%									%				a7	A	AC  %%%J
A%+
6"		9C?@@@@



					e&								dE,			!7*	*	*J*V$$C  %%%#)CL  								D								y			&
J>	P	PM
AqAJQS!$$$__Q//1N1NOOOO		P	Ps6D
D! D!cJGfddt|tddzd|tddzd|tddzd|tddzd|tddzd|tddzd|ttddddGd	d
t}dS)Nc<eZdZdZfdZeZdfd	Zdfd	ZdS)BClassPropertiesAndMethods.test_binary_operator_override.<locals>.Ic&dt|zS)NzI(%r)r-rs r?rzKClassPropertiesAndMethods.test_binary_operator_override.<locals>.I.__repr__u
sT**r@cTt|t|zSrre)r:rrs  r?rUzJClassPropertiesAndMethods.test_binary_operator_override.<locals>.I.__add__w
s$qTSZZ/000r@Nc	|3tt|t|Stt|t|t|Srrr-r:rrrs   r?__pow__zJClassPropertiesAndMethods.test_binary_operator_override.<locals>.I.__pow__z
s\;1STCJJ778881STCJJCAABBBr@c	|4tt|t||Stt|t|t|Srrhris   r?__rpow__zKClassPropertiesAndMethods.test_binary_operator_override.<locals>.I.__rpow__
s^;1SUSYY<<===1SUSYYCAABBBr@r)rrrrrUrrjrl)rsr?rrct
s
+
+
+
1
1
1
1
1H
C
C
C
C
C
C

C
C
C
C
C
C
C
Cr@rrqrrzI(3)rtzI(8)rceZdZdZdS)BClassPropertiesAndMethods.test_binary_operator_override.<locals>.ScV||kSr)rrs  r?rCzIClassPropertiesAndMethods.test_binary_operator_override.<locals>.S.__eq__
szz||u{{}}44r@NrDrr@r?Srn
rr@rp)r-rGrrr@)r:rprs  @r?test_binary_operator_overridez7ClassPropertiesAndMethods.test_binary_operator_overrider
s	C	C	C	C	C	C	C	C	C	C"	
aaddQQqTTk**F333aaddQh000a!!A$$h000aaddaaddl++V444a11Q44i&111aaddai&111c!!A$$!aadd3344f===	5	5	5	5	5	5	5	5	5	5r@cGddt}Gdd|}Gdd|}Gdd||}|}t|}d	|_|t|d
d|_|t|dd
|_|t|dd|_|t|dd|_|t
t||`|t|dd|_|t
t||`|t|dd|_|t
t||`|t|d
d|_|t
t||`|t||d
|_d
|_||jd
||jd
d}||_||jd||jd
d}||_	||j
d||jd||jd
|`||jd
|`||jd||jd
|`		|j|dn#t$rYnwxYwGddt}Gdd|}~tjd|_dS)NceZdZdS>ClassPropertiesAndMethods.test_subclass_propagation.<locals>.ANrKrr@r?r{ru
rMr@r{ceZdZdS>ClassPropertiesAndMethods.test_subclass_propagation.<locals>.BNrKrr@r?rrx
rMr@rceZdZdS)>ClassPropertiesAndMethods.test_subclass_propagation.<locals>.CNrKrr@r?rrz
rMr@rceZdZdS)>ClassPropertiesAndMethods.test_subclass_propagation.<locals>.DNrKrr@r?rLr|
rMr@rLcdSrjrrs r?rzEClassPropertiesAndMethods.test_subclass_propagation.<locals>.<lambda>
s"r@rcdS)N:rrs r?rzEClassPropertiesAndMethods.test_subclass_propagation.<locals>.<lambda>
#r@rcdS)Nrrs r?rzEClassPropertiesAndMethods.test_subclass_propagation.<locals>.<lambda>
rr@rcdSr&rrs r?rzEClassPropertiesAndMethods.test_subclass_propagation.<locals>.<lambda>
rr@rcH|dkrdSt||S)Nrr)r^r$rs  r?r$zMClassPropertiesAndMethods.test_subclass_propagation.<locals>.__getattribute__
s&u}}r**4666r@rc,|dvrdSt|)N)rrrrPrrs  r?rzHClassPropertiesAndMethods.test_subclass_propagation.<locals>.__getattr__
s!---w &&&r@rPzd.foo should be undefined nowceZdZdSrtrKrr@r?r{z>ClassPropertiesAndMethods.test_subclass_propagation.<locals>.A
rMr@ceZdZdSrwrKrr@r?rz>ClassPropertiesAndMethods.test_subclass_propagation.<locals>.B
rMr@cdSrrrs r?rzEClassPropertiesAndMethods.test_subclass_propagation.<locals>.<lambda>
s4r@)r^rGrHrGrrrrr$rrrrrrXri)	r:r{rrrLrO	orig_hashr$rs	         r?test_subclass_propagationz3ClassPropertiesAndMethods.test_subclass_propagation
sQ																													1			
ACCGG	$_
a"%%%%%
a#&&&%%
a#&&&%%
a#&&&
)T1---
Ja#&&&
)T1---
Ja#&&&
)T1---
Ja"%%%
)T1---
Ja),,,######	7	7	7.######	'	'	'$
)))######
###
E(((###
M	7
EE
II56666			D																	
'


s/N
NNczddl}Gddt}d}||}|||||Gddt}|d}	|||ddS#t$rYdSwxYw)	NrceZdZdS)BClassPropertiesAndMethods.test_buffer_inheritance.<locals>.MyBytesNrKrr@r?rr
rMr@rrceZdZdS)@ClassPropertiesAndMethods.test_buffer_inheritance.<locals>.MyIntNrKrr@r?rr
rMr@rrz2subclass of int should not have a buffer interface)binasciirrGb2a_hexr-rr)r:rrrrQrs      r?test_buffer_inheritancez1ClassPropertiesAndMethods.test_buffer_inheritance
s						e			GDMM	
))!,,h.>.>t.D.DEEE					C			E"II	QIIJKKKKK			DD	s*B,,
B:9B:cddlddl}Gfddt}|d}|t	|||t	t|t|t	t|t|t
|d|t|d|t|d||d||ddS)Nrc eZdZfdZdZdS)GClassPropertiesAndMethods.test_str_of_str_subclass.<locals>.octetstringcz|ddS)Nascii)rencodedecode)r:rs r?rzOClassPropertiesAndMethods.test_str_of_str_subclass.<locals>.octetstring.__str__
s1''G(<(<==DDWMMMr@c|dzS)Nz reprrrs r?rzPClassPropertiesAndMethods.test_str_of_str_subclass.<locals>.octetstring.__repr__
sg~%r@N)rrrrr)rsr?octetstringr
sB
N
N
N
N
N
&
&
&
&
&r@rr{A41zA repr)	rior@rGrIrordrr)r:rrr:rs    @r?test_str_of_str_subclassz2ClassPropertiesAndMethods.test_str_of_str_subclass
sP				&	&	&	&	&	&	&#	&	&	&
Ka+...c!ffs+++d1gg,,,Q&&&Q&&&a(+++d+++x00000r@cGddt}Gdd}|d|_|t|t|t|tdS)NceZdZdS)LClassPropertiesAndMethods.test_repr_with_module_str_subclass.<locals>.StrSubNrKrr@r?StrSubrrMr@rceZdZdS)JClassPropertiesAndMethods.test_repr_with_module_str_subclass.<locals>.SomeNrKrr@r?Somer
rMr@rexample)r@rrr)r:rrs   r?"test_repr_with_module_str_subclassz<ClassPropertiesAndMethods.test_repr_with_module_str_subclass	s					S											 &++d4jj#...d4466llC00000r@cd}||ddt}t|ddd||ddS)	Nc|Srrrs r?rz;ClassPropertiesAndMethods.test_keyword_arguments.<locals>.fs(r@rruabc½€latin1r)encodingrsabc?)rGre	bytearrayr4)r:rbas   r?test_keyword_argumentsz0ClassPropertiesAndMethods.test_keyword_argumentss}b))2...
[[2$,Y		@	@	@[)))))r@cGddt}||_|t5|ddddS#1swxYwYdS)NceZdZdS)8ClassPropertiesAndMethods.test_recursive_call.<locals>.ANrKrr@r?r{rrMr@r{)r^rerRecursionErrorras  r?test_recursive_callz-ClassPropertiesAndMethods.test_recursive_calls								QSS



~
.
.		AACCEEE																		sAA!$A!cXgGfddt}|}|g~tj|dgGddt}|}|d=|ddS#t
$rYdSwxYw)NceZdZfdZdS)5ClassPropertiesAndMethods.test_delete_hook.<locals>.Cc2ddSrr)r:r&s r?r5z=ClassPropertiesAndMethods.test_delete_hook.<locals>.C.__del__)s

1




r@Nr7)r&sr?rr(s.






r@rrqceZdZdS)5ClassPropertiesAndMethods.test_delete_hook.<locals>.DNrKrr@r?rLr1rr@rLrz$invalid del() didn't raise TypeError)r^rGrrXrr)r:rr^rLrOr&s     @r?test_delete_hookz*ClassPropertiesAndMethods.test_delete_hook%s										
ACCb!!!
qc"""
ACC1ii>?????$$$sB
B)(B)cRGddt}|}	t||dn#t$rYnwxYwGddt}|}	t||ddS#t$rYdSwxYw)NceZdZdS)?ClassPropertiesAndMethods.test_hash_inheritance.<locals>.mydictNrKrr@r?mydictr:rMr@rz#hash() of dict subclass should failceZdZdS)?ClassPropertiesAndMethods.test_hash_inheritance.<locals>.mylistNrKrr@r?mylistrDrMr@rz#hash() of list subclass should fail)rrGrrr6)r:rrOrs    r?test_hash_inheritancez/ClassPropertiesAndMethods.test_hash_inheritance7s					T			FHH	=GGG
II;<<<<			D	
					T			FHH	=GGG
II;<<<<<			DD	s#A
AA2B
B&%B&cddz|dn#t$rYnwxYwdd|dn#t$rYnwxYwddg|dn#t$rYnwxYwdd|d	n#t$rYnwxYwd
dz|dn#t$rYnwxYwdiz|d
n#t$rYnwxYwddz|dn#t$rYnwxYwddz|dn#t$rYnwxYwddz|dn#t$rYnwxYwddz|dn#t$rYnwxYw|dd|dd|ddzd|ddzddS)NrDrz'' + 5 doesn't raise TypeErrorrz%''.split('') doesn't raise ValueErrorrz$''.join([0]) doesn't raise TypeError5z'''.rindex('5') doesn't raise ValueErrorz%(n)sz&'%(n)s' % None doesn't raise TypeErrorz%(nz&'%(n' % {} '' doesn't raise ValueErrorz%*sr&z''%*s' % ('abc') doesn't raise TypeErrorz%*.*s)r&rz,'%*.*s' % ('abc', 5) doesn't raise TypeErrorz%srqrrz%'%s' % (1, 2) doesn't raise TypeError%z#'%' % None doesn't raise ValueError534253rq534253xz%c)rrsplitrr2rindexrGisdigitrs r?test_str_operationsz-ClassPropertiesAndMethods.test_str_operationsNs
1WWii89999$$XXb\\\ii?@@@@44WWaS\\\ii>????$$YYs^^^iiABBBB44t^^ii@AAAA$$RZZii@AAAA44e__iiABBBB$$z
!
!iiFGGGG$$F]]ii?@@@@$$4ZZii=>>>>44	
))++Q///**,,a0006***S)))))s
))A
A$#A$'B
B B #C
CCC99
DD	D$$
D10D14E
EEE::
FF
F%%
F21F25G
GGcGdd}|}|}||_||_t|}dS)NceZdZdS)?ClassPropertiesAndMethods.test_deepcopy_recursive.<locals>.NodeNrKrr@r?rXr~rMr@rX)rXrDr)r:rXrDrXrYs     r?test_deepcopy_recursivez1ClassPropertiesAndMethods.test_deepcopy_recursive|s]								DFFDFFQKKr@cZddlm}||}t|||d||d||d||jd|_||jddidS)Nr)r?r__file__rrq)	r>r?rr@rrrKrrG)r:rrQs   r?test_uninitialized_modulesz4ClassPropertiesAndMethods.test_uninitialized_moduless))))))
IIaLLAa,,,a,,,a'''$$$eQZ00000r@cGfddt}Gdd|||dgd|dgdd}||jd|d}||||jdd}||||jdGddt}||dd	|dd	fGd
d||dd	dd	fGddt}||dd	||dd	fGdd||dd	dd	fdS)
NceZdZfdZdS)3ClassPropertiesAndMethods.test_funny_new.<locals>.Cct|trgdSt|trtSt|S)Nrs)r'r@r-r^r)rrrLs  r?rz;ClassPropertiesAndMethods.test_funny_new.<locals>.C.__new__sSc3''1			)9S))1&..2C2C+C#^^C000r@NrT)rLsr?rrs.
1
1
1
1
1
1
1r@rceZdZdZdS)3ClassPropertiesAndMethods.test_funny_new.<locals>.Dc||_dSrrFr:rs  r?r4z<ClassPropertiesAndMethods.test_funny_new.<locals>.D.__init__rWr@NrMrr@r?rLrrXr@rLrrsrqc$eZdZedZdS)rc|Srrrs r?rz;ClassPropertiesAndMethods.test_funny_new.<locals>.C.__new__r@N)rrrrfrrr@r?rz3ClassPropertiesAndMethods.test_funny_new.<locals>.Cs-


\


r@rrceZdZdSrNrKrr@r?rLz3ClassPropertiesAndMethods.test_funny_new.<locals>.DrMr@c$eZdZedZdS)rc|Srrrs r?rz;ClassPropertiesAndMethods.test_funny_new.<locals>.C.__new__rr@N)rrrrrrr@r?rz3ClassPropertiesAndMethods.test_funny_new.<locals>.Cs-


[


r@ceZdZdSrrKrr@r?rLz3ClassPropertiesAndMethods.test_funny_new.<locals>.DrMr@)r^rGrr)r:rrOrLs   @r?test_funny_newz(ClassPropertiesAndMethods.test_funny_news	1	1	1	1	1	1	1	1	1	1
									
3+++3+++
AdGG%%%
AaDDa###"""
AaDDa###"""									
1a1a),,,								1a1a),,,									
1a1aA,///								1a1aA,/////r@cGddt}|}|}|dz}|||df|}|dz}|||df|}|dz}|||df|}|dz}|||df|}|dz}|||df|}|dz}|||dfdS)NceZdZdZdS)2ClassPropertiesAndMethods.test_imul_bug.<locals>.Cc
||fSrrrs  r?r{z;ClassPropertiesAndMethods.test_imul_bug.<locals>.C.__imul__se}$r@N)rrrr{rr@r?rrrir@rrrrrtlrr^rG)r:rrrs    r?
test_imul_bugz'ClassPropertiesAndMethods.test_imul_bugs/	%	%	%	%	%	%	%	%
ACC
	SQH%%%
	QQF###
	QQF###
	VQK(((
	T	QI&&&
	U
QJ'''''r@c`ddl}Gfddt}|d}|d|jd|d||}|jd|d||}|jd|ddS)Nrc6eZdZddZddZdZdZfdZdS)7ClassPropertiesAndMethods.test_copy_setstate.<locals>.CNc"||_||_dSr)r_C__foorVs  r?r4z@ClassPropertiesAndMethods.test_copy_setstate.<locals>.C.__init__s 


r@c||_dSrrFrVs  r?setfooz>ClassPropertiesAndMethods.test_copy_setstate.<locals>.C.setfoorWr@c|jSr)rrs r?getfooz>ClassPropertiesAndMethods.test_copy_setstate.<locals>.C.getfoorr@c|jgSrrFrs r?__getstate__zDClassPropertiesAndMethods.test_copy_setstate.<locals>.C.__getstate__sz!r@cvt|d|dx|_|_dSr)rGrrr)rJlstr:s  r?__setstate__zDClassPropertiesAndMethods.test_copy_setstate.<locals>.C.__setstate__s5  S1---*-a&0eiiir@r)rrrr4rrrrrsr?rrst
!
!
!
!




"
"
"
"
"
"
1
1
1
1
1
1
1r@rrr)rr^rrGrrr)r:rrrDrXs`    r?test_copy_setstatez,ClassPropertiesAndMethods.test_copy_setstates&	1	1	1	1	1	1	1	1	1	1
AbEE	###R(((IIaLL###R(((MM!###R(((((r@c	|dddd|dtdd|tdtddGddt}||dddd||dtdd||dtdd|dddd|dtdd|tdtddGd	d
t}||dddd||dtdd||dtdd|gdddddg|gdtdddg|t
gdtdddgGdd
t
}||gdddddg||gdtdddg||gdtdddg|gd}ddg|tdd<||gdddg|tddd<||gd|tddddg||gd|tdddddg||gddS)NrPrwhellceZdZdZdS)0ClassPropertiesAndMethods.test_slices.<locals>.Sc8t||Sr)r@r[rs  r?r[z<ClassPropertiesAndMethods.test_slices.<locals>.S.__getitem__stQ///r@Nr+rr@r?rprs#
0
0
0
0
0r@rprsrrrceZdZdZdS)0ClassPropertiesAndMethods.test_slices.<locals>.Tc8t||Sr)rr[rs  r?r[z<ClassPropertiesAndMethods.test_slices.<locals>.T.__getitem__s((q111r@Nr+rr@r?rr#
2
2
2
2
2r@rrqceZdZdZdS)0ClassPropertiesAndMethods.test_slices.<locals>.Lc8t||Sr)r6r[rs  r?r[z<ClassPropertiesAndMethods.test_slices.<locals>.L.__getitem__
s''a000r@Nr+rr@r?rr	rr@rrt)rqrtrrr)rtrqrr)rtrrrq)rrrtrq)rGr_r@r[rr6ri)r:rprrrDs     r?test_slicesz%ClassPropertiesAndMethods.test_slicessh	
!f---q*F333%((;;VDDD	0	0	0	0	0	0	0	0	
7BQB0007E!HH-v6667//a996BBB!e,,,q*E222**7E!HH==uEEE	2	2	2	2	2	2	2	2	
7BQB///7E!HH-u5557//a995AAA!qe,,,q*QqE222))'''588<<qeDDD	1	1	1	1	1	1	1	1	
777BQB!A///777E!HH-!u555777//a99Aa5AAA
AgggJJA%1++GGG$$$qE%1a..GGG$$$	

eAqkkAa5)))GGG$$$	

eAq!nnqe,,,GGG$$$$$r@cGfddt}d|_~tj|tjd`dS)NceZdZgZfdZdS)>ClassPropertiesAndMethods.test_subtype_resurrection.<locals>.Cc<j|dSr)	containerrrs r?r5zFClassPropertiesAndMethods.test_subtype_resurrection.<locals>.C.__del__ s""4(((((r@N)rrrrr5rNsr?rrs3I
)
)
)
)
)
)
)r@rrrq)r^rwrrXrGrrr5)r:r^rs  @r?test_subtype_resurrectionz3ClassPropertiesAndMethods.test_subtype_resurrections	)	)	)	)	)	)	)	)	)	)
ACC

Q[))1---
IIIr@clGddt}d}tdD]
}||}~dS)NceZdZdgZdZdS)9ClassPropertiesAndMethods.test_slots_trash.<locals>.trashrc||_dSrrrs  r?r4zBClassPropertiesAndMethods.test_slots_trash.<locals>.trash.__init__8rr@N)rrrrr4rr@r?trashr6s*I




r@riP)r^r)r:rr:rs    r?test_slots_trashz*ClassPropertiesAndMethods.test_slots_trash3s^					F			
u		AaAA
AAr@cLGddt}Gddt}Gdd||}tjr ||j|j||d||dd	|_dS)
NceZdZdZdS)DClassPropertiesAndMethods.test_slots_multiple_inheritance.<locals>.ArNrrr@r?r{rAIIIr@r{ceZdZdS)DClassPropertiesAndMethods.test_slots_multiple_inheritance.<locals>.BNrKrr@r?rrCrMr@rceZdZdZdS)DClassPropertiesAndMethods.test_slots_multiple_inheritance.<locals>.CrNrrr@r?rrErr@rrKrhrr)r^rrrG
__basicsize__rr)r:r{rrs    r?test_slots_multiple_inheritancez9ClassPropertiesAndMethods.test_slots_multiple_inheritance?s																					!			$&&	?Q_ao>>>1j)))1m,,,r@cGddt}|}||dzd||dzd|d|zd|d|zddS)NceZdZdZdZdS).ClassPropertiesAndMethods.test_rmul.<locals>.CcdS)Nr
rrs  r?r}z6ClassPropertiesAndMethods.test_rmul.<locals>.C.__mul__Qur@cdS)Nrmulrrs  r?rz7ClassPropertiesAndMethods.test_rmul.<locals>.C.__rmul__Ssvr@N)rrrr}rrr@r?rr"Ps2







r@rrrr
g@r&rr1s   r?	test_rmulz#ClassPropertiesAndMethods.test_rmulMs								

ACC1e$$$3&&&1f%%%Q'''''r@cJGddt}|}|dz}dS)NceZdZdZdS).ClassPropertiesAndMethods.test_ipow.<locals>.CcdSrrrs  r?__ipow__z7ClassPropertiesAndMethods.test_ipow.<locals>.C.__ipow___r@Nrrrr,rr@r?rr*^#




r@rrrrr1s   r?	test_ipowz#ClassPropertiesAndMethods.test_ipow[sF								
ACC	ar@cGdd}Gdd|}Gdd|}|}|}|}||z}||d||z}||ddS)	NceZdZdZdS)FClassPropertiesAndMethods.test_ipow_returns_not_implemented.<locals>.ActSrrrs  r?r,zOClassPropertiesAndMethods.test_ipow_returns_not_implemented.<locals>.A.__ipow__frr@Nr.rr@r?r{r3err@r{ceZdZdZdS)FClassPropertiesAndMethods.test_ipow_returns_not_implemented.<locals>.BcdSrrrs  r?rlzOClassPropertiesAndMethods.test_ipow_returns_not_implemented.<locals>.B.__rpow__jqr@Nrrrrlrr@r?rr6i#




r@rceZdZdZdS)FClassPropertiesAndMethods.test_ipow_returns_not_implemented.<locals>.CcdSrErrs  r?rjzNClassPropertiesAndMethods.test_ipow_returns_not_implemented.<locals>.C.__pow__nr8r@Nrrrrjrr@r?rr<mr:r@rrqrrr)r:r{rrrDrXr^s       r?!test_ipow_returns_not_implementedz;ClassPropertiesAndMethods.test_ipow_returns_not_implementedds	&	&	&	&	&	&	&	&																
ACC
ACC
ACC	aA	aAr@cGdd}t}|}||z}||ddS)NceZdZdZdS)1ClassPropertiesAndMethods.test_no_ipow.<locals>.BcdSrrrs  r?rlz:ClassPropertiesAndMethods.test_no_ipow.<locals>.B.__rpow__|r8r@Nr9rr@r?rrB{r:r@rrqr)r:rrDrXs    r?test_no_ipowz&ClassPropertiesAndMethods.test_no_ipowzse								
HH
ACC	aAr@cd}|t5}|dz}dddn#1swxYwY|dt|j|t5}|dz}dddn#1swxYwY|dt|jdS)Nrrz#unsupported operand type(s) for **=z"unsupported operand type(s) for **)rrrr@r)r:rrrs    r?test_ipow_exception_textz2ClassPropertiesAndMethods.test_ipow_exception_texts)


y
)
)	R
!GA															

;S=N=NOOO


y
)
)	RQA															

:C<M<MNNNNNs/33<BBBclGddt}GfddtGdd|}Gdd|}|}|}|f|_f|_||d	||d	||jd
||jd
||g	|`|dn#ttf$rYnwxYw	d|_|d
n?#t$r2}t|dkr|dYd}~nd}~wwxYw	|f|_|dn#t$rYnwxYw	||f|_|dn#t$rYnwxYw	|f|_|ddS#t$rYdSwxYw)NceZdZdS)7ClassPropertiesAndMethods.test_mutable_bases.<locals>.CNrKrr@r?rrIrMr@rc(eZdZfdZdZxZS)8ClassPropertiesAndMethods.test_mutable_bases.<locals>.C2cZ|dkrdSt||S)NrDrr)rsr$)r:rwrrs  r?r$zIClassPropertiesAndMethods.test_mutable_bases.<locals>.C2.__getattribute__s-3;;1 T??;;DAAAr@cdSrrrs r?rNz=ClassPropertiesAndMethods.test_mutable_bases.<locals>.C2.methr8r@)rrrr$rNrv)rrs@r?rrKsS
B
B
B
B
B
B







r@rceZdZdS)7ClassPropertiesAndMethods.test_mutable_bases.<locals>.DNrKrr@r?rLrOrMr@rLceZdZdS)7ClassPropertiesAndMethods.test_mutable_bases.<locals>.ENrKrr@r?rrQrMr@rrqrrz&shouldn't be able to delete .__bases__rz)shouldn't be able to set .__bases__ to ()z/a new-style class can't have only classic basesz'wrong error message for .__bases__ = ()z.shouldn't be able to create inheritance cyclesz#didn't detect repeated base classes)
r^rLrGrNrDrArrrr@)r:rrLrrOr;rrs       @r?test_mutable_basesz,ClassPropertiesAndMethods.test_mutable_basess																																		
ACC
ACCde1%%%1%%%a   a   **,,qc222	@
II>????>*			D	
	CAK

IIABBBB		E	E	E3xxLLL		CDDD	E	H$AK

IIFGGGG				D		=a&AK
II;<<<<			D	
	H$AK
IIFGGGGG			DD	s`D22EE
E''
F#1(FF#'G
GG	G55
HHH%%
H32H3cdtjD}|D]]}t|d|tur7|t
urd}nd}|t|j||^Gddt}Gddt}Gd	d
|}	tf|_|dn#t$rYnwxYw	tft_|dn#t$rYnwxYw	|tf|_|d
dS#t$rYdSwxYw)Nc<g|]}t|t|Sr)r'rI)r<tps  r?r=z@ClassPropertiesAndMethods.test_builtin_bases.<locals>.<listcomp>s6222&r4002222r@rLrrrqceZdZdS)7ClassPropertiesAndMethods.test_builtin_bases.<locals>.LNrKrr@r?rrWrMr@rceZdZdS)7ClassPropertiesAndMethods.test_builtin_bases.<locals>.CNrKrr@r?rrYrMr@rceZdZdS)7ClassPropertiesAndMethods.test_builtin_bases.<locals>.DNrKrr@r?rLr[rMr@rLz/shouldn't turn list subclass into dict subclassz-shouldn't be able to assign to list.__bases__z#best_base calculation found wanting)
builtinsrKvaluesr^r$ExceptionGrouprGrrLr6rrr)r:
builtin_typesrU	num_basesrrrLs       r?test_builtin_basesz,ClassPropertiesAndMethods.test_builtin_basess22h&7&>&>&@&@222
	C	CB##B444'' !II !I  R\!2!2IrBBB																									I'AK
IIGHHHH			D	
	G"WDN
IIEFFFF			D	
	=d)AK
II;<<<<<			DD	s6>
C!!
C.-C.2D
D'&D'+E
EEc	T|t5Gddtd}dddn#1swxYwY|t5Gddttd}dddn#1swxYwY|t5Gddtdt}dddn#1swxYwYGddt}|t5Gdd|td}dddn#1swxYwY|t5Gddtd|}dddn#1swxYwYGd	dt}|t5tdf|_dddn#1swxYwY|t5ttdf|_dddn#1swxYwY|t5tdtf|_dddn#1swxYwY|t5|tdf|_dddn#1swxYwY|t5td|f|_ddddS#1swxYwYdS)
NceZdZdS>ClassPropertiesAndMethods.test_unsubclassable_types.<locals>.XNrKrr@r?rrerr@rceZdZdSrdrKrr@r?rz>ClassPropertiesAndMethods.test_unsubclassable_types.<locals>.Xrr@ceZdZdSrdrKrr@r?rz>ClassPropertiesAndMethods.test_unsubclassable_types.<locals>.Xrr@ceZdZdS)>ClassPropertiesAndMethods.test_unsubclassable_types.<locals>.ONrKrr@r?r3rirMr@r3ceZdZdSrdrKrr@r?rz>ClassPropertiesAndMethods.test_unsubclassable_types.<locals>.Xrr@ceZdZdSrdrKrr@r?rz>ClassPropertiesAndMethods.test_unsubclassable_types.<locals>.Xrr@ceZdZdSrdrKrr@r?rz>ClassPropertiesAndMethods.test_unsubclassable_types.<locals>.XrMr@)rrrIr^rL)r:rr3s   r?test_unsubclassable_typesz3ClassPropertiesAndMethods.test_unsubclassable_typess


y
)
)		




DJJ


															

y
)
)		




FDJJ


															

y
)
)		




DJJ


																							


y
)
)		




AtDzz


															

y
)
)		




DJJ


																							


y
)
)	&	&t**+AK	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&


y
)
)	-	- $t**,AK	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-


y
)
)	-	-t**f,AK	-	-	-	-	-	-	-	-	-	-	-	-	-	-	-


y
)
)	(	(T$ZZ-AK	(	(	(	(	(	(	(	(	(	(	(	(	(	(	(


y
)
)	(	(t**a-AK	(	(	(	(	(	(	(	(	(	(	(	(	(	(	(	(	(	(sAA
A("BBB;"C))C-0C-!E

EE/FFFG22G69G6H??II$JJJ1KKK9LL!$L!c
G
fddt
Gddt}Gddt}Gddt}Gd	d
|}Gdd|}Gd
d|
}Gdd||}|j}|j}		|f|_|ddS#t
$r:||j|||j|	YdSwxYw)Nc(eZdZfdZdZxZS)OClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.WorkOncec^d|_t||||Sr)flagrsr)r:r=rSrWorkOncers    r?rzWClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.WorkOnce.__new__s.	Xt,,44XtUBOOOr@c|jdkrtd|xjdz
c_t|S)Nrbozorq)rrrrIrrs r?rzSClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.WorkOnce.mro!s:9q==&v...IINII88D>>)r@)rrrrrrv)rrss@r?rsrpsS
P
P
P
P
P
P
*
*
*
*
*
*
*r@rsceZdZdZdS)QClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.WorkAlwaysc6t|Sr)rIrrs r?rzUClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.WorkAlways.mro)s
xx~~%r@Nrrr@r?
WorkAlwaysrw(s#
&
&
&
&
&r@ryceZdZdS)HClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.CNrKrr@r?rr{0rMr@rceZdZdS)IClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.C2NrKrr@r?rr}3rMr@rceZdZdS)HClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.DNrKrr@r?rLr6rMr@rLceZdZdS)HClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.ENrKrr@r?rr9rMr@rceZdZdS)HClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.FNrKrr@r?rr<rMr@rr@ceZdZdS)HClassPropertiesAndMethods.test_mutable_bases_with_failing_mro.<locals>.GNrKrr@r?rxr?rMr@rxzexception not propagated)rIr^r`rLrrrG)r:ryrrrLrrrxE_mro_beforeD_mro_beforerss          @r?#test_mutable_bases_with_failing_mroz=ClassPropertiesAndMethods.test_mutable_bases_with_failing_mros		*		*		*		*		*		*		*t		*		*		*	&	&	&	&	&	&	&	&																																					X									Z				yy	2%AK

II011111		6	6	6QY555QY555555	6sB::AC>=C>cGddt}Gddt}Gdd||}Gdd||}Gd	d
||}	||f|_|ddS#t$rYdSwxYw)NceZdZdS)JClassPropertiesAndMethods.test_mutable_bases_catch_mro_conflict.<locals>.ANrKrr@r?r{rSrMr@r{ceZdZdS)JClassPropertiesAndMethods.test_mutable_bases_catch_mro_conflict.<locals>.BNrKrr@r?rrVrMr@rceZdZdS)JClassPropertiesAndMethods.test_mutable_bases_catch_mro_conflict.<locals>.CNrKrr@r?rrYrMr@rceZdZdS)JClassPropertiesAndMethods.test_mutable_bases_catch_mro_conflict.<locals>.DNrKrr@r?rLr\rMr@rLceZdZdS)JClassPropertiesAndMethods.test_mutable_bases_catch_mro_conflict.<locals>.ENrKrr@r?rr_rMr@rzdidn't catch MRO conflict)r^rLrr)r:r{rrrLrs      r?%test_mutable_bases_catch_mro_conflictz?ClassPropertiesAndMethods.test_mutable_bases_catch_mro_conflictQs)																					1								1								1				3a&AK
II122222			DD	s	A55
BBcGddt}|j}d|_||j|jf|dfd|_||j|jf|dfdS)NceZdZdS)7ClassPropertiesAndMethods.test_mutable_names.<locals>.CNrKrr@r?rrkrMr@rrLzD.E)r^rrrG)r:rrs   r?test_mutable_namesz,ClassPropertiesAndMethods.test_mutable_namesis								l
!,
3c3Z@@@
!,
3c5\BBBBBr@czGfddt}Gdd|d_d_dS)NceZdZfdZdS)<ClassPropertiesAndMethods.test_evil_type_name.<locals>.Nastycd_dS)Nr)rrs r?r5zDClassPropertiesAndMethods.test_evil_type_name.<locals>.Nasty.__del__|s$


r@Nr7rNsr?Nastyr{s.
%
%
%
%
%
%
%r@rceZdZdS)8ClassPropertiesAndMethods.test_evil_type_name.<locals>.CNrKrr@r?rrrMr@rr&normal)r@r)r:rrs  @r?test_evil_type_namez-ClassPropertiesAndMethods.test_evil_type_namews{	%	%	%	%	%	%	%C	%	%	%								U5\\



r@cGddt}||ddzd|d|dzdGddt}||dzd|d|zd	Gd
d|}|||zd|||zd
Gdd|}||j|j||dzd|d|zd	|||zd|||zddS)NceZdZdZdZdS);ClassPropertiesAndMethods.test_subclass_right_op.<locals>.BcdS)NB.__floordiv__rrs  r?__floordiv__zHClassPropertiesAndMethods.test_subclass_right_op.<locals>.B.__floordiv__''r@cdS)NB.__rfloordiv__rrs  r?
__rfloordiv__zIClassPropertiesAndMethods.test_subclass_right_op.<locals>.B.__rfloordiv__((r@Nrrrrrrr@r?rr2
(
(
(
)
)
)
)
)r@rrqrrceZdZdZdZdS);ClassPropertiesAndMethods.test_subclass_right_op.<locals>.CcdS)NC.__floordiv__rrs  r?rzHClassPropertiesAndMethods.test_subclass_right_op.<locals>.C.__floordiv__rr@cdS)NC.__rfloordiv__rrs  r?rzIClassPropertiesAndMethods.test_subclass_right_op.<locals>.C.__rfloordiv__rr@Nrrr@r?rrrr@rrrceZdZdZdZdS);ClassPropertiesAndMethods.test_subclass_right_op.<locals>.DcdS)ND.__floordiv__rrs  r?rzHClassPropertiesAndMethods.test_subclass_right_op.<locals>.D.__floordiv__rr@cdS)ND.__rfloordiv__rrs  r?rzIClassPropertiesAndMethods.test_subclass_right_op.<locals>.D.__rfloordiv__rr@Nrrr@r?rLrrr@rLrrceZdZdS);ClassPropertiesAndMethods.test_subclass_right_op.<locals>.ENrKrr@r?rrrMr@r)r-rGr^r)r:rrrLrs     r?test_subclass_right_opz0ClassPropertiesAndMethods.test_subclass_right_ops8	)	)	)	)	)	)	)	)	
1$4555aadd$5666	)	)	)	)	)	)	)	)	
#3444aacc#4555	)	)	)	)	)	)	)	)	
%5666%6777									
!/:::#3444aacc#4555%5666%566666r@z)testing an internal kind of method objectcgd}dddd}|t|||i||tjd}||dt||||i||	|dd|dn#t$rYnwxYw	|d|dn#t$rYnwxYw	|dd|dn#t$rYnwxYw	|dt|ddS#t$rYdSwxYw)Nrsfromkeysz0shouldn't have allowed descr.__get__(None, None)rz(shouldn't have allowed descr.__get__(42)z.shouldn't have allowed descr.__get__(None, 42)z/shouldn't have allowed descr.__get__(None, int))rGrrrKrcrrr-)r:rrMrs    r?test_meth_class_getz-ClassPropertiesAndMethods.test_meth_class_getsii4D))s++S111S))3///
j)	
2tT22377===*r**3//555	JMM$%%%
IIHIIII			D		BMM"
II@AAAA			D		HMM$###
IIFGGGG			D		IMM$$$$
IIGHHHHH			DD	sHD
DDE
EEF
FFG
GGcGddt}Gdd}|}||}||||||Gdd|}|}||}||||||Gddt}|}||}||||||Gdd|}|}||}||||||dS)	NceZdZdZdZdS)<ClassPropertiesAndMethods.test_isinst_isclass.<locals>.Proxyc||_dSr_Proxy__objr,s  r?r4zEClassPropertiesAndMethods.test_isinst_isclass.<locals>.Proxy.__init__r	r@c|drt||St|j|SN_Proxy__rar^r$rJrrs  r?r$zMClassPropertiesAndMethods.test_isinst_isclass.<locals>.Proxy.__getattribute__>??:..5!224>>>"4:t444r@Nrrrr4r$rr@r?rYr2
!
!
!
5
5
5
5
5r@rYceZdZdS8ClassPropertiesAndMethods.test_isinst_isclass.<locals>.CNrKrr@r?rrrMr@rceZdZdS8ClassPropertiesAndMethods.test_isinst_isclass.<locals>.DNrKrr@r?rLrrMr@rLceZdZdSrrKrr@r?rz8ClassPropertiesAndMethods.test_isinst_isclass.<locals>.CrMr@ceZdZdSrrKrr@r?rLz8ClassPropertiesAndMethods.test_isinst_isclass.<locals>.DrMr@)r^r)r:rYrrDparLs      r?test_isinst_isclassz-ClassPropertiesAndMethods.test_isinst_isclasss	5	5	5	5	5F	5	5	5								
ACC
U1XXa###b!$$$								
ACC
U1XXa###b!$$$								
ACC
U1XXa###b!$$$								
ACC
U1XXa###b!$$$$$r@cGddt}Gddt}Gfdd|}||}|jd|ddS)	NceZdZdZdZdS)9ClassPropertiesAndMethods.test_proxy_super.<locals>.Proxyc||_dSrrr,s  r?r4zBClassPropertiesAndMethods.test_proxy_super.<locals>.Proxy.__init__r	r@c|drt||St|j|Srrrs  r?r$zJClassPropertiesAndMethods.test_proxy_super.<locals>.Proxy.__getattribute__rr@Nrrr@r?rYr
rr@rYceZdZdZdS)5ClassPropertiesAndMethods.test_proxy_super.<locals>.BcdS)NzB.frrs r?rz7ClassPropertiesAndMethods.test_proxy_super.<locals>.B.fr$r@Nrxrr@r?rrs#




r@rc"eZdZfdZxZS)5ClassPropertiesAndMethods.test_proxy_super.<locals>.CcNt|dzS)Nz->C.f)rsr)r:rrs r?rz7ClassPropertiesAndMethods.test_proxy_super.<locals>.C.fs"Q~~''))G33r@)rrrrrv)rrs@r?rrs>
4
4
4
4
4
4
4
4
4
4r@rrzB.f->C.f)r^rGrK)r:rYrrrrs     @r?test_proxy_superz*ClassPropertiesAndMethods.test_proxy_supers	5	5	5	5	5F	5	5	5									4	4	4	4	4	4	4	4	4	4accE#JJC++Z88888r@c$	ttdd|dn#t$rYnwxYw	ttd|ddS#t$rYdSwxYw)Nrrz"Carlo Verre __setattr__ succeeded!rz"Carlo Verre __delattr__ succeeded!)r^r(r@rrr+rs r?test_carloverrez)ClassPropertiesAndMethods.test_carloverre"s	<sE2...
II:;;;;			D		<sG,,,
II:;;;;;			DD	s!!9
AA
 B
BBcGddt}Gdd}Gdd||}|dtfi}	d|_dS#t$r|d	YdSwxYw)
NceZdZdZdS)HClassPropertiesAndMethods.test_carloverre_multi_inherit_valid.<locals>.Ac>t|||dSr)rIr(rr
rs   r?r(zTClassPropertiesAndMethods.test_carloverre_multi_inherit_valid.<locals>.A.__setattr__3s   c511111r@Nrrrr(rr@r?r{r2rr@r{ceZdZdS)HClassPropertiesAndMethods.test_carloverre_multi_inherit_valid.<locals>.BNrKrr@r?rr6rMr@rceZdZdS)HClassPropertiesAndMethods.test_carloverre_multi_inherit_valid.<locals>.CNrKrr@r?rr9rMr@rrLTz1setattr through direct base types should be legal)rIr^rrrr:r{rrrs     r?#test_carloverre_multi_inherit_validz=ClassPropertiesAndMethods.test_carloverre_multi_inherit_valid1s	2	2	2	2	2	2	2	2													1			afY##	KCHHH	K	K	KIIIJJJJJJ	KsA

A0/A0cGddt}Gdd}Gdd||}|dtfi}	d|_|d	dS#t$rYdSwxYw)
NceZdZdZdS)JClassPropertiesAndMethods.test_carloverre_multi_inherit_invalid.<locals>.Ac>t|||dSr)r^r(rs   r?r(zVClassPropertiesAndMethods.test_carloverre_multi_inherit_invalid.<locals>.A.__setattr__Ds ""3U33333r@Nrrr@r?r{rCs#
4
4
4
4
4r@r{ceZdZdS)JClassPropertiesAndMethods.test_carloverre_multi_inherit_invalid.<locals>.BNrKrr@r?rrGrMr@rceZdZdS)JClassPropertiesAndMethods.test_carloverre_multi_inherit_invalid.<locals>.CNrKrr@r?rrJrMr@rrLTz6setattr through indirect base types should be rejected)rIr^rrrrs     r?%test_carloverre_multi_inherit_invalidz?ClassPropertiesAndMethods.test_carloverre_multi_inherit_invalidBs	4	4	4	4	4	4	4	4													1			afY##	PCH
IINOOOOO			DD	sA""
A0/A0cddlGfdd}Gddt}|}|||_~dS)Nrc eZdZfdZdZdS)AClassPropertiesAndMethods.test_weakref_segfault.<locals>.Provokerc2j||_dSrrn)r:	referrentrms  r?r4zJClassPropertiesAndMethods.test_weakref_segfault.<locals>.Provoker.__init__[s&7;y11r@c.|}dSrrrs  r?r5zIClassPropertiesAndMethods.test_weakref_segfault.<locals>.Provoker.__del__^sHHJJr@N)rrrr4r5)rmsr?ProvokerrZs=
2
2
2
2
2




r@r	ceZdZdS)=ClassPropertiesAndMethods.test_weakref_segfault.<locals>.OopsNrKrr@r?Oopsr	arMr@r	)rmr^whatever)r:r	r	r:rms    @r?test_weakref_segfaultz/ClassPropertiesAndMethods.test_weakref_segfaultUs																6			
DFFXa[[

AAr@cpucBd}tdD]	}|j}
d}dS)NcdSrrrr@r?rzAClassPropertiesAndMethods.test_wrapper_segfault.<locals>.<lambda>ks4r@i@B)rre)r:rrs   r?test_wrapper_segfaultz/ClassPropertiesAndMethods.test_wrapper_segfaulths2
Kw		A
AAr@cGdd}t|5|t5tddddn#1swxYwYddddS#1swxYwYdS)NceZdZdZdS)>ClassPropertiesAndMethods.test_file_fault.<locals>.StdoutGuardcRtjt_td|)NzPremature access to sys.stdout.)r
__stdout__stdoutrrs  r?rzJClassPropertiesAndMethods.test_file_fault.<locals>.StdoutGuard.__getattr__ss" ^
"#KT#K#KLLLr@Nrrr@r?StdoutGuardr	rs(
M
M
M
M
Mr@r	zOops!)rrrprint)r:r	s  r?test_file_faultz)ClassPropertiesAndMethods.test_file_faultps 	M	M	M	M	M	M	M	M
[[]]
+
+		""<00

g














																		s5A4AA4A 	 A4#A 	$A44A8;A8cDGfddt}GddtGfddt}d|j|<||jdt	j||d	dS)
Nc eZdZdZfdZdS)HClassPropertiesAndMethods.test_vicious_descriptor_nonsense.<locals>.Evilc tdS)NrwrGrs r?rHzQClassPropertiesAndMethods.test_vicious_descriptor_nonsense.<locals>.Evil.__hash__sF||#r@c0	`n#t$rYnwxYwdSr)rwrrs  r?rCzOClassPropertiesAndMethods.test_vicious_descriptor_nonsense.<locals>.Evil.__eq__s6%Dqs
NrrrrHrCrNsr?Evilr	s=
$
$
$






r@r	ceZdZddZdS)IClassPropertiesAndMethods.test_vicious_descriptor_nonsense.<locals>.DescrNcdSrr)r:obrIs   r?rczQClassPropertiesAndMethods.test_vicious_descriptor_nonsense.<locals>.Descr.__get__r8r@rr rr@r?Descrr	s(





r@r!	c$eZdZZdS)EClassPropertiesAndMethods.test_vicious_descriptor_nonsense.<locals>.CN)rrrrwr!	sr?rr#	s577DDDr@rrrqrw)r^rKrGrwrrXr)r:r	r^rr!	s   @@r? test_vicious_descriptor_nonsensez:ClassPropertiesAndMethods.test_vicious_descriptor_nonsense{s														6											F													
ACC
4466###a(((((r@cGddt}	||ddS#t$rYdSwxYw)NceZdZdZdS)0ClassPropertiesAndMethods.test_init.<locals>.FoocdS)Nrrrs r?r4z9ClassPropertiesAndMethods.test_init.<locals>.Foo.__init__rkr@NrMrr@r?Foor(	rmr@r*	z'did not test __init__() for None return)r^rr)r:r*	s  r?	test_initz#ClassPropertiesAndMethods.test_inits|					&				ACEEE
II?@@@@@			DD	s
6
AAc|t5||kdddn#1swxYwY|t5||kdddn#1swxYwY|t5||kdddn#1swxYwY|t5||kddddS#1swxYwYdSrrrr:rDrXs   r?assertNotOrderablez,ClassPropertiesAndMethods.assertNotOrderables


y
)
)		
EE															


y
)
)		
EE															


y
)
)		
FF															


y
)
)		
FF																		sB.22A&&A*-A*BB"%B"CCCc>g}||j|jk||j|jk||jgjk||jgjk||j|jk||j|jk||j|j||jjd||jj|||jj	t||jjtjjt|jdS)NrU)
rrUrr}r/	rGrrr__objclass__r6rrGr:rs  r?test_method_wrapperz-ClassPropertiesAndMethods.test_method_wrappersI
	QY.///ai/000bj0111	RZ/000ai/000	QY.///	19555+Y777

ai(!,,,

ai,d333*DL,@AAAQYr@cg}||j|jk||j|jk||jgjk||jgjk||j|jk||j|jk||j|j||jjd||jj|||jj	tjj	t|jdS)Nr)rrrpopr/	rGrrrrr6rGr2	s  r?test_builtin_function_or_methodz9ClassPropertiesAndMethods.test_builtin_function_or_methods0
AH,---QX-...RY.///BI-...QU*+++AE)***!(333*H555

ah'+++)4;+>???QXr@c|tjtjk|tjtjk|tjtjk|tjtjk|tjtj|tjjd|tjj	t|tj
tj
k|tj
tj
k|tj
tjk|tj
tjk|tj
tj
|tj
jd|tj
j	tdS)NrUr)rr6rUrr}r/	rGrrr1	rr5	rs r?!test_special_unbound_method_typesz;ClassPropertiesAndMethods.test_special_unbound_method_typess4555566656664555dl;;;.	:::

dl/666	
t{233334440111tx/000T[999-x888

dk.55555r@cddld}fd}tjdz}tj}dD]\}}}d|ddz}tdd	||i}	|	}
|||
|
|||
||||
||rx|||
|
|||
||||
|d
|ddz}tdd	||i}|}
|||
|
|||
||||
|dS)NrctSrrrs  r?
specialmethodzEClassPropertiesAndMethods.test_not_implemented.<locals>.specialmethods!!r@c	t|||dd|dS#t$rYdSwxYw)N)rroperatorzno TypeError from )rerr)r>rrr=	r:s   r?rz=ClassPropertiesAndMethods.test_not_implemented.<locals>.checksg
<TAABBB			DD:;;;;;



s1
??rq))rUzx + yzx += y)__sub__zx - yzx -= y)r}zx * yzx *= y)
__matmul__zx @ yzx @= y)__truediv__zx / yzx /= y)rzx // yzx //= y)__mod__zx % yzx %= y)
__divmod__zdivmod(x, y)N)rjzx ** yzx **= y)
__lshift__zx << yzx <<= y)
__rshift__zx >> yzx >>= y)__and__zx & yzx &= y)__or__zx | yzx |= y)__xor__zx ^ yzx ^= y__rrrr{r__ir)r=	rrrI)r:r;	rN1N2r=r>iexprrnamer{rDinamerr^r=	s`             @r?test_not_implementedz.ClassPropertiesAndMethods.test_not_implementeds		"	"	"	<	<	<	<	<	<[1_
["G	$	$D$DH$ES"t]344AAE$1E$2E$2	
$eQ"""eQ###eQ###QRR(b5-"899ACCeQ"""eQ###eQ###=	$	$r@cGddt}|}d|dd<||jddS)NceZdZdZdS)6ClassPropertiesAndMethods.test_assign_slice.<locals>.Cc||_dSrr)r:idxrs   r?rizBClassPropertiesAndMethods.test_assign_slice.<locals>.C.__setitem__$rr@N)rrrrirr@r?rrR	#r r@rrtrqrr)r^rGr)r:rr^s   r?test_assign_slicez+ClassPropertiesAndMethods.test_assign_slicesd
	#	#	#	#	#	#	#	#
ACC!A#!$$$$$r@cGddt}|dGfddt}|}||jd|_||jdGddt}Gd	d|
}d|_|d|_||jddS)NceZdZdZdZdS)<ClassPropertiesAndMethods.test_set_and_no_get.<locals>.Descrc||_dSr)r=rs  r?r4zEClassPropertiesAndMethods.test_set_and_no_get.<locals>.Descr.__init__0rr@c$||j|j<dSr)rKr=r*s   r?rzDClassPropertiesAndMethods.test_set_and_no_get.<locals>.Descr.__set__3s*/TY'''r@N)rrrr4rrr@r?r!	rY	.s2
!
!
!
0
0
0
0
0r@r!	rDceZdZZdS8ClassPropertiesAndMethods.test_set_and_no_get.<locals>.XNrrsr?rr^	7sAAAr@rrceZdZdS);ClassPropertiesAndMethods.test_set_and_no_get.<locals>.MetaNrKrr@r?ryra	@rMr@ryceZdZdSr]	rKrr@r?rz8ClassPropertiesAndMethods.test_set_and_no_get.<locals>.XBrMr@r@)r^rrDrGrI)r:r!	rrryrs     @r?test_set_and_no_getz-ClassPropertiesAndMethods.test_set_and_no_get+s?	0	0	0	0	0F	0	0	0c

										
ACC

ac5!!!b!!!					4								$				sb!!!!!r@cGddt}|Gfddt}Gfddt}Gfddt}|tt|d	|jd
|tt|d	|jd|tt|d	|jdGfd
dt|ttd	dS)NceZdZdZddZdS)@ClassPropertiesAndMethods.test_getattr_hooks.<locals>.DescriptorrNcfd}|S)NcBxjdz
c_t|r)rr)r=r:s r?rzXClassPropertiesAndMethods.test_getattr_hooks.<locals>.Descriptor.__get__.<locals>.getterNs!LLA%LL(...r@r)r:robjtypers`   r?rczHClassPropertiesAndMethods.test_getattr_hooks.<locals>.Descriptor.__get__Ms#/////
r@r)rrrrrcrr@r?
Descriptorrf	Ks-G





r@rj	ceZdZZdS)7ClassPropertiesAndMethods.test_getattr_hooks.<locals>.AN)rrrr$r_	sr?r{rl	Ts$r@r{ceZdZZdS)7ClassPropertiesAndMethods.test_getattr_hooks.<locals>.BNrr_	sr?rrn	VsKKKr@rceZdZZZdS)7ClassPropertiesAndMethods.test_getattr_hooks.<locals>.CN)rrrr$rr_	sr?rrp	Xs$KKKr@rrwrqrrrwc eZdZdZfdZdS)FClassPropertiesAndMethods.test_getattr_hooks.<locals>.EvilGetattributec t|rrrs  r?rzRClassPropertiesAndMethods.test_getattr_hooks.<locals>.EvilGetattribute.__getattr__es$T***r@cp`tdD]}tjt	|Nr)rrrZcollectr)r:r=rEvilGetattributes   r?r$zWClassPropertiesAndMethods.test_getattr_hooks.<locals>.EvilGetattribute.__getattribute__gs9$0q!!AJLLLL$T***r@Nr)rw	sr?rw	rr	cs=
+
+
+
+
+
+
+
+
+
+r@rw	)r^rrrJrGr)r:rj	r{rrrw	rs     @@r?test_getattr_hooksz,ClassPropertiesAndMethods.test_getattr_hooksHs								
	%	%	%	%	%	%	%	%	%	%	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	
.'1133???***.'1133???***.'1133???***	+	+	+	+	+	+	+v	+	+	+	
.'3C3C3E3EvNNNNNr@ch|ttjttdSr)rrrIr$r6rs r?test_type___getattribute__z4ClassPropertiesAndMethods.test_type___getattribute__os%)T%:D$GGGGGr@cN|tttdGddt}|tt|dGddt}|t5|`ddddS#1swxYwYdS)N__abstractmethods__ceZdZdS)<ClassPropertiesAndMethods.test_abstractmethods.<locals>.metaNrKrr@r?metar~	urMr@r	ceZdZdS)9ClassPropertiesAndMethods.test_abstractmethods.<locals>.XNrKrr@r?rr	xrMr@r)rrrJrIr^r|	)r:r	rs   r?test_abstractmethodsz.ClassPropertiesAndMethods.test_abstractmethodsrs
.'49NOOO					4			.'49NOOO								


~
.
.	&	&%	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&	&s
BB!BcGdd}|}||t|t5t|dddn#1swxYwY|t5t|dddddS#1swxYwYdS)NceZdZeZdS):ClassPropertiesAndMethods.test_proxy_call.<locals>.FakeStrN)rrrr@rrr@r?FakeStrr	~rPr@r	r&)rr@rrrrU)r:r	fake_strs   r?test_proxy_callz)ClassPropertiesAndMethods.test_proxy_call}sX								799h,,,

y
)
)	 	 IIh	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 

y
)
)	)	)KK%(((	)	)	)	)	)	)	)	)	)	)	)	)	)	)	)	)	)	)s$
A44A8;A8CC	CcGdd}|}tdD]N}|t5t|dddn#1swxYwYOtdD]N}|t5t
|dddn#1swxYwYOtdD]N}|t5t
|dddn#1swxYwYOtdD]N}|t5t
|dddn#1swxYwYOddl	m
}tdD]J}|t5|||dddn#1swxYwYKdS)NceZdZdS)RClassPropertiesAndMethods.test_specialized_method_calls_check_types.<locals>.ThingNrKrr@r?Thingr	rMr@r	rr)deque)rrrr6sortr@rrrcollectionsr	r)r:r	rrr	s     r?)test_specialized_method_calls_check_typeszCClassPropertiesAndMethods.test_specialized_method_calls_check_typess0								r	!	!A""9--
!
!		%   
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!r	!	!A""9--
!
!		%   
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!r	!	!A""9--
!
!		%   
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!r	!	!A""9--
!
!		%   
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!	&%%%%%r	+	+A""9--
+
+UE***
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+	+	+sZA**A.	1A.	!CC	C	?D&&D*	-D*	FF	F	G$$G(	+G(	cGdd}|j|_|}|tt||tt
|dS)NceZdZdS)7ClassPropertiesAndMethods.test_repr_as_str.<locals>.FooNrKrr@r?r*	r	rMr@r*	)rrrrr@r)r:r*	rs   r?test_repr_as_strz*ClassPropertiesAndMethods.test_repr_as_strst								{cee.#s333.$44444r@cGddt}|}d|_||dd|||dS)Nc*eZdZejZejZdS)>ClassPropertiesAndMethods.test_mixing_slot_wrappers.<locals>.XN)rrrrrir(r__neg__rr@r?rr	s*KiGGGr@rrr)rrrG)r:rrs   r?test_mixing_slot_wrappersz3ClassPropertiesAndMethods.test_mixing_slot_wrapperssx	 	 	 	 	 	 	 	 
ACC3$$$QBr@c Gddt}|}|t5||kdddn#1swxYwY|t5||zddddS#1swxYwYdS)Nc*eZdZejZejZdS)BClassPropertiesAndMethods.test_wrong_class_slot_wrapper.<locals>.AN)rrrr@rCrUrr@r?r{r	sZFkGGGr@r{)r-rr)r:r{rDs   r?test_wrong_class_slot_wrapperz7ClassPropertiesAndMethods.test_wrong_class_slot_wrappers,	"	"	"	"	"	"	"	"
ACC


y
)
)		
FF															


y
)
)		
EE																		s#AAA0BB
Bc|t5}Gdd}dddn#1swxYwYt|j}|d|dS)NceZdZdgZdZdS)EClassPropertiesAndMethods.test_slot_shadows_class_variable.<locals>.XrN)rrrrrrr@r?rr	s"G	r@rz0'foo' in __slots__ conflicts with class variable)rrr@rrG)r:rrrQs    r? test_slot_shadows_class_variablez:ClassPropertiesAndMethods.test_slot_shadows_class_variables


z
*
*	b







															
KQOOOOOs599cGdd}d|_||jd|t5}t	t
jdt
ddddn#1swxYwY|dt|j
|t5}t	|jd|dddn#1swxYwY|dt|j
||jddS)NceZdZdZdS)1ClassPropertiesAndMethods.test_set_doc.<locals>.XelephantNrrr@r?rr	sJJJr@rbananarblahz7cannot set '__doc__' attribute of immutable type 'list'z7cannot delete '__doc__' attribute of immutable type 'X')rrGrrrIr6rKrrr@rr-)r:rrs   r?test_set_docz&ClassPropertiesAndMethods.test_set_docs									H---


y
)
)	ARJJ	*224@@@	A	A	A	A	A	A	A	A	A	A	A	A	A	A	A

OQTUWUaQbQbccc


y
)
)	6RGGY'221555	6	6	6	6	6	6	6	6	6	6	6	6	6	6	6

OQTUWUaQbQbcccH-----s$
9BBB.DDDctjtjtjt
jg}gd}t||D]0\}}|t|j
|dz1|D]4}|jjdz|j
z}||j|5|tjjd|tjjd|tjjd|t
jjdGdd	}|
t5|`dddn#1swxYwY|
ttjd
jtdGdd
a|t"jd
|t"jjddS)N)rmembergetsetwrapper_descriptor.z	str.lowerzcomplex.realz
float.realzint.__add__ceZdZdS)2ClassPropertiesAndMethods.test_qualname.<locals>.XNrKrr@r?rr	rMr@rrOinkc(eZdZGddZdS)rceZdZdS)Y.InsideNrKrr@r?Insider	rr@r	N)rrrr	rr@r?rrs<









r@rr	)r@rrrr.r-rUrrGrIrr1	rrrrKrrr	)r:descriptorsr>rOrqualnamers       r?
test_qualnamez'ClassPropertiesAndMethods.test_qualnames=y',
CKH999U++	B	BDAqT!WW-q=/@AAAA	7	7A~2S81:EHQ^X6666/===2NCCC0,???1=AAA								


y
)
)																		
)T]>%B%Jv	'	'	'									
---.
;;;;;s&E55E9<E9cddi}tdd|}||jd|d|j||ddiddi}|ttdd|dS)Nrz	some.namer*	rrq)rIrGrr]rKrr)r:rrUs   r?test_qualname_dictz,ClassPropertiesAndMethods.test_qualname_dictsk
*
%R
 
 +666555nk:;;;a
 )T5"b99999r@cJGddt}|}d|_tj|}~t	j||tjD]%}|	t||&dS)NceZdZdZdS)<ClassPropertiesAndMethods.test_cycle_through_dict.<locals>.XcHt|||_dSr)rr4rKrs r?r4zEClassPropertiesAndMethods.test_cycle_through_dict.<locals>.X.__init__s

d### $


r@NrMrr@r?rr	
s#
%
%
%
%
%r@rr)rrwrmrnrrXassertIsNonerZr?assertIsNotrI)r:rrwrr:s     r?test_cycle_through_dictz1ClassPropertiesAndMethods.test_cycle_through_dicts	%	%	%	%	%	%	%	%
ACC
[^^
""$$!!	)	)AT!WWa((((	)	)r@cGdd}|t|d|t|dGdd}Gdd}Gd	d
||}|||fD]W}|d|dd|t|ddd|t|ddd
XdS)NceZdZdS)[ClassPropertiesAndMethods.test_object_new_and_init_with_parameters.<locals>.OverrideNeitherNrKrr@r?OverrideNeitherr	rMr@r	rqrceZdZddZdS)WClassPropertiesAndMethods.test_object_new_and_init_with_parameters.<locals>.OverrideNewrc,tj|g|Ri|Srr[)rrr
r;rs     r?rz_ClassPropertiesAndMethods.test_object_new_and_init_with_parameters.<locals>.OverrideNew.__new__s"~c9D999D999r@NrrTrr@r?OverrideNewr	s(
:
:
:
:
:
:r@r	ceZdZddZdS)XClassPropertiesAndMethods.test_object_new_and_init_with_parameters.<locals>.OverrideInitrc,tj|g|Ri|Sr)r^r4)r:rr
r;r<s     r?r4zaClassPropertiesAndMethods.test_object_new_and_init_with_parameters.<locals>.OverrideInit.__init__!s"t=d===f===r@NrrMrr@r?OverrideInitr	 s(
>
>
>
>
>
>r@r	ceZdZdS)XClassPropertiesAndMethods.test_object_new_and_init_with_parameters.<locals>.OverrideBothNrKrr@r?OverrideBothr	#rMr@r	rrrtrFr-	)r:r	r	r	r	cases      r?(test_object_new_and_init_with_parameterszBClassPropertiesAndMethods.test_object_new_and_init_with_parameterssU								)_a888)_;;;	:	:	:	:	:	:	:	:	>	>	>	>	>	>	>	>					;			|;	<	<DDGGGDqMMMMiq!Q777iq!;;;;		<	<r@cGdd}Gdd|}|d|j|d|jdS)NceZdZdS)\ClassPropertiesAndMethods.test_subclassing_does_not_duplicate_dict_descriptors.<locals>.BaseNrKrr@r?rFr	,rMr@rFceZdZdS)[ClassPropertiesAndMethods.test_subclassing_does_not_duplicate_dict_descriptors.<locals>.SubNrKrr@r?rKr	.rMr@rKrK)rrKr])r:rFrKs   r?4test_subclassing_does_not_duplicate_dict_descriptorszNClassPropertiesAndMethods.test_subclassing_does_not_duplicate_dict_descriptors+s													$			

j$-000S\22222r@cGdd}|t|jdGdd}Gdd|}Gdd	|}|}|}|}t||}|t|jd
|t|jd|t|jd|t|jd
Gdd}|}	|t|	jd|t|jdGdd}
|
}t	}tj||}
|t|
dd|_|t|
dd|_|t|
ddS)NceZdZdZdS)=ClassPropertiesAndMethods.test_bound_method_repr.<locals>.FoocdSrrrs r?rzDClassPropertiesAndMethods.test_bound_method_repr.<locals>.Foo.method5r-r@Nrrrrrr@r?r*	r	4r/r@r*	z4<bound method .*Foo\.method of <.*Foo object at .*>>ceZdZdZdS)>ClassPropertiesAndMethods.test_bound_method_repr.<locals>.BasecdSrrrs r?rzEClassPropertiesAndMethods.test_bound_method_repr.<locals>.Base.method<r-r@Nr	rr@r?rFr	;r/r@rFceZdZdS)BClassPropertiesAndMethods.test_bound_method_repr.<locals>.Derived1NrKrr@r?Derived1r	>rMr@r	ceZdZdZdS)BClassPropertiesAndMethods.test_bound_method_repr.<locals>.Derived2cdSrrrs r?rzIClassPropertiesAndMethods.test_bound_method_repr.<locals>.Derived2.methodAr-r@Nr	rr@r?Derived2r	@r/r@r	z6<bound method .*Base\.method of <.*Base object at .*>>z:<bound method .*Base\.method of <.*Derived1 object at .*>>z><bound method .*Derived2\.method of <.*Derived2 object at .*>>z:<bound method .*Base\.method of <.*Derived2 object at .*>>c$eZdZedZdS)r	cdSrrrEs r?rzDClassPropertiesAndMethods.test_bound_method_repr.<locals>.Foo.methodQrr@N)rrrrrrr@r?r*	z=ClassPropertiesAndMethods.test_bound_method_repr.<locals>.FooPs-


[


r@z/<bound method .*Foo\.method of <class '.*Foo'>>ceZdZdZdS)DClassPropertiesAndMethods.test_bound_method_repr.<locals>.MyCallablecdSrrrs  r?rezMClassPropertiesAndMethods.test_bound_method_repr.<locals>.MyCallable.__call__\r-r@N)rrrrerr@r?
MyCallabler	[r/r@r	z*<bound method \? of <object object at .*>>r=z,<bound method name of <object object at .*>>r	z0<bound method qualname of <object object at .*>>)	assertRegexrrrsr^r>
MethodTyperr)r:r*	rFr	r	rderived1derived2super_d2rr	rinstancerrs              r?test_bound_method_reprz0ClassPropertiesAndMethods.test_bound_method_repr3s									
cceel++C	E	E	E													t								t			tvv8::8::8,,dk**E	G	G	Gho..I	K	K	Kho..M	O	O	Oho..I	K	K	K								ceecj))>	@	@	@cj))>	@	@	@								z||88!$11f9	;	;	;
f;	=	=	=&f?	A	A	A	A	Ar@Nzneed the _testcapi modulecNGddGfdd}|jdS)NceZdZejZdS)6ClassPropertiesAndMethods.test_bpo25750.<locals>.DescrN)rrrrbad_getrcrr@r?r!	r	os'GGGr@r!	c*eZdZZdZdS)2ClassPropertiesAndMethods.test_bpo25750.<locals>.XcPd|_dtdD|_dS)Ncg|]}d|zSrrrs  r?r=zNClassPropertiesAndMethods.test_bpo25750.<locals>.X.__new__.<locals>.<listcomp>ws666A1a4666r@i')rrrrEs r?rz:ClassPropertiesAndMethods.test_bpo25750.<locals>.X.__new__ts( 	66u666r@N)rrrrrr$	sr?rr	rs/EGGE
7
7
7
7
7r@rr_	)r:rr!	s  @r?
test_bpo25750z'ClassPropertiesAndMethods.test_bpo25750jsj
	(	(	(	(	(	(	(	(	7	7	7	7	7	7	7	7	7	7	
r@cVGdd}||gGdd|}|||g~tj||gdS)NceZdZdS)>ClassPropertiesAndMethods.test_remove_subclass.<locals>.ParentNrKrr@r?Parentr
rMr@r
ceZdZdS)=ClassPropertiesAndMethods.test_remove_subclass.<locals>.ChildNrKrr@r?Childr
rMr@r
)rGrArZrv	)r:r
r
s   r?test_remove_subclassz.ClassPropertiesAndMethods.test_remove_subclasszs
								..00"555					F			..005':::

..00"55555r@cGdd}|td5|jddddS#1swxYwYdS)Nc*eZdZdZedZdS)EClassPropertiesAndMethods.test_attr_raise_through_property.<locals>.Ac td)NFOO)rrs  r?rzQClassPropertiesAndMethods.test_attr_raise_through_property.<locals>.A.__getattr__s '''r@c,|dS)Nasdf)rrs r?rzIClassPropertiesAndMethods.test_attr_raise_through_property.<locals>.A.foos''///r@N)rrrrrrrr@r?r{r	
s>
(
(
(
0
0X
0
0
0r@r{r
)r]rrras  r? test_attr_raise_through_propertyz:ClassPropertiesAndMethods.test_attr_raise_through_propertys	0	0	0	0	0	0	0	0
#
#J
6
6		
ACCGG																		sAA

A
)rrrrrr!r2rrCraryrrrrrrrcrqrrrrrr
refcount_testrrrrrrrr>rJr2expectedFailurerPrbrrrrrrrr5rcrrrskipIfrflagsoptimizercpython_onlyrrrrrMrrrrrrrr;r`rqrrrrrrrrrrrrrrr	rrrr'r0r?rDrFrRrarmrrrrrrrrrrrr	requires_resourcer	r	r%	r+	r/	r3	r6	r8	rO	rV	rc	rx	rz	r	r	r	r	r	r	r	r	r	r	r	r	r	r	rr	r
r
rvrs@r?rrsn	@@@III2/2/2/h000TTTl
(9(9(9T'*'*'*R"="="=J@@@BBB*777#;#;#;J1110;0;0;0zWWWr$2$2$2L&-&-&-P<<<"A/A/A/F:O:O:Ox8'8'8'8'8't
NNNW=>>/=/=?>/=b'''0
NNNW=>>  ?> OOO* & & &D)))$
(
(
( ? ? ?D))).E>E>E>N/4/4/4bHHHPPP*WDEE@@FE@,f8f8f8P`"`"`"D>=F=F=F~X_SY'1,@BB22BB2
<<<AAAFM?M?M?^ZZZxnnnnn`_0_0_0X
+++6333@><><><@M@M@M@^AAAXXX&WWWrWPWPWPr555<K(K(K(Z.111*111***@@@$===.,*,*,*\
1
1
1%0%0%0N(((4)))6*%*%*%X2


(((,OOO?H?H?HB*=*=*=X(((@424242l3330CCC171717fWDEE)I)IFE)IV%%%%%%N999.
<
<
<KKK"PPP&&Wu%%&%			)))B
A
A
A$&666&2$2$2$h%%%""":%O%O%ONHHH	&	&	&))) +++6555   


PPP
.
.
.<<<@:::
)
)
)<<<(3335A5A5A5A5AnX_Y$&(CDD

ED
666"r@rcReZdZdZejeedoejddZ	ejeedoejddZ
ejeedoejddZdZdZ
d	S)
DictProxyTestsc:Gddt}||_dS)NceZdZdZdS)DictProxyTests.setUp.<locals>.CcdSrrrs r?rNz$DictProxyTests.setUp.<locals>.C.methr-r@Nr}rr@r?rr
r/r@r)r^rrs  r?setUpzDictProxyTests.setUps9								r@gettracez#trace function introduces __local__c|jj}||tt	|}|||gddS)NrKrrrhrN)rrKrassertNotIsInstancer6r	rGr:rdrs   r?test_iter_keyszDictProxyTests.test_iter_keysszV_
!
!
#
#  T***Bxx		 7 7 7	8	8	8	8	8r@c|jj}||tt	|}|t
|ddSru	)rrKr]r 
r6rGr)r:rdr]s   r?test_iter_valueszDictProxyTests.test_iter_valuess\V_
#
#
%
%  T***bVa(((((r@c|jj}||td|D}|||gddS)Ncg|]
}|dSrr)r<items  r?r=z2DictProxyTests.test_iter_items.<locals>.<listcomp>s'''DQ'''r@r
)rrKr7r 
r6r	rGr!
s   r?test_iter_itemszDictProxyTests.test_iter_itemssV_
"
"
$
$  T***''B'''		 7 7 7	8	8	8	8	8r@cGddt}Gddt}Gdd|}|t|jt|jdS)NceZdZdS)7DictProxyTests.test_dict_type_with_metaclass.<locals>.BNrKrr@r?rr+
rMr@rceZdZdS)7DictProxyTests.test_dict_type_with_metaclass.<locals>.MNrKrr@r?rr-
rMr@rceZdZdS)7DictProxyTests.test_dict_type_with_metaclass.<locals>.CNrKrr@r?rr/
rr@rr@)r^rIrGrK)r:rrrs    r?test_dict_type_with_metaclassz,DictProxyTests.test_dict_type_with_metaclasss																					!					
aj))4
+;+;<<<<<r@cxt|jj}||d|||d||jjD]/\}}|d|||0dS)Nz
mappingproxy()z
{!r}: {!r})	rrrKrraendswithr7rr)r:rorrs    r?	test_reprzDictProxyTests.test_reprs
!!_55q999

3+++FO))++	8	8DAqMM,--a33Q7777	8	8r@N)rrrr
r2r
rrr
r"
r$
r(
r0
r4
rr@r?r
r
sX_WWS*--@,#,..=??88??8X_WWS*--@,#,..=??))??)X_WWS*--@,#,..=??88??8	=	=	=88888r@r
ceZdZdZdS)AAAPTypesLongInitTestcGddt}	td|dn#YnxYwttdS)NceZdZdZdS)>AAAPTypesLongInitTest.test_pytype_long_ready.<locals>.UserLongcdSrrr:r;s  r?rjzFAAAPTypesLongInitTest.test_pytype_long_ready.<locals>.UserLong.__pow__r-r@Nr>rr@r?UserLongr9
r/r@r<
r)r^rrIrr)r:r<
s  r?test_pytype_long_readyz,AAAPTypesLongInitTest.test_pytype_long_readyso					v				88::q!!!!	D	
s/3N)rrrr=
rr@r?r6
r6
s#
r@r6
ceZdZdZdS)	MiscTestsc&Gfddt}Gddt}Gddttd|f|di|jd	|jd
dS)Nc"eZdZdZfdZdS)7MiscTests.test_type_lookup_mro_reference.<locals>.MyKeyc tdS)Nmykeyr	rs r?rHz@MiscTests.test_type_lookup_mro_reference.<locals>.MyKey.__hash__sG}}$r@cf_dSrr)r:rBase2rs  r?rCz>MiscTests.test_type_lookup_mro_reference.<locals>.MyKey.__eq__s$hr@Nr	)rF
rsr?MyKeyrB
sB
%
%
%
'
'
'
'
'
'
'
'r@rG
ceZdZdZdZdS)6MiscTests.test_type_lookup_mro_reference.<locals>.Base	from BaseNrrrrD
mykey2rr@r?rFrI
sE FFFr@rFceZdZdZdZdS)7MiscTests.test_type_lookup_mro_reference.<locals>.Base2
from Base2NrK
rr@r?rF
rN
s E!FFFr@rF
rrrJ
rO
)r^rIrGrD
rL
)r:rG
rFrF
rs   @@r?test_type_lookup_mro_referencez(MiscTests.test_type_lookup_mro_references	'	'	'	'	'	'	'	'F	'	'	'	!	!	!	!	!6	!	!	!	"	"	"	"	"F	"	"	"
tg|,,+...<00000r@N)rrrrP
rr@r?r?
r?
s#11111r@r?
cbeZdZdidddfdZdZdZddZedZdZ	d	Z
d
ZdZdS)

PicklingTestsrNc&|dkrj||}|rS||dtj||dt	|||fnS||dtj||dt	|f|z||d||*|t|d|n||d|+|	t|d|dS||ddSt	|j}	tjt	||	|	turdn
|	|ff}|||fz
}|||||||dS)Nrrrrqrtrw)
__reduce_ex__rGcopyreg
__newobj_ex__rI
__newobj__assertListEqualr6r	assertDictEqualr__base___reconstructorr^
__reduce__)
r:protorr;r<r	listitems	dictitemsreduce_value	base_types
          r?
_check_reducezPicklingTests._check_reducesA::,,U33L
G  a'2GHHH  a499dF2KLLLL  a'2DEEE  a499,2EFFF\!_e444$$$T,q/%:%:IFFFF!!,q/222$$$T,q/%:%:IFFFFF!!,q/22222S		*I#2!#YY&%.&%8%8TTiinnNOL (S..u55|DDDS^^--|<<<<<r@c
ttjdz}ddddddiGfdd	}|}|D]}|||D]\}}t||||D]}|||
Gdd}|}|D]O}|d
krG|t5||dddn#1swxYwYPGfdd}|}|D] }|d
kr|||!Gfdd}	Gfdd}
Gdd}Gdd}|D]i}|	|
||fD]`}
|
}|d
krN|ttf5||dddn#1swxYwYajGfdd}|}|D]}|||Gdd}|}|D]O}|d
krG|t5||dddn#1swxYwYPGfdd}|}|D]}|||
Gdd}|}|D]}|||d 
Gd!d"}|}|D]}|t5||dddn#1swxYwY|d
krF|t5|dddn#1swxYwYGfd#d$}|}|D]}|d
kr|||df
#|t5||dddn#1swxYwY|t5|dddn#1swxYwYGd%d&t}|d'd(i}|D]'}|||t|)(Gd*d+t}|d,g}|D]'}|||t|-(dS).Nrq)iri7i)baconfishcheeseioceZdZfdZdS)%PicklingTests.test_reduce.<locals>.C1cSrrr;
s r?__getnewargs__z4PicklingTests.test_reduce.<locals>.C1.__getnewargs__0sr@Nrrrrj
rsr?rrh
/s.






r@rrceZdZdZdS)%PicklingTests.test_reduce.<locals>.C2cdSNzbad argsrrs r?rj
z4PicklingTests.test_reduce.<locals>.C2.__getnewargs__<!zr@Nrk
rr@r?rrm
;#
"
"
"
"
"r@rrrceZdZfdZdS)%PicklingTests.test_reduce.<locals>.C3cfSrr)r:r;r<s r?__getnewargs_ex__z7PicklingTests.test_reduce.<locals>.C3.__getnewargs_ex__Es
f~%r@Nrrrru
rsr?r
rs
Ds3
&
&
&
&
&
&
&
&r@r
ceZdZfdZdS)%PicklingTests.test_reduce.<locals>.C4cdfS)Nzbad dictrr;
s r?ru
z7PicklingTests.test_reduce.<locals>.C4.__getnewargs_ex__Msj))r@Nrv
rsr?rrx
Ls.
*
*
*
*
*
*
*r@rceZdZfdZdS)%PicklingTests.test_reduce.<locals>.C5cdfS)Nz	bad tupler)r:r<s r?ru
z7PicklingTests.test_reduce.<locals>.C5.__getnewargs_ex__Ps#V,,r@Nrv
)r<sr?C5r{
Os.
-
-
-
-
-
-
-r@r}
ceZdZdZdS)%PicklingTests.test_reduce.<locals>.C6cdS)Nrrrs r?ru
z7PicklingTests.test_reduce.<locals>.C6.__getnewargs_ex__Srkr@Nrv
rr@r?C6r
Rrmr@r
ceZdZdZdS)%PicklingTests.test_reduce.<locals>.C7cdSro
rrs r?ru
z7PicklingTests.test_reduce.<locals>.C7.__getnewargs_ex__Vrp
r@Nrv
rr@r?C7r
Urq
r@r
ceZdZfdZdS)%PicklingTests.test_reduce.<locals>.C9cifSrrr;
s r?ru
z7PicklingTests.test_reduce.<locals>.C9.__getnewargs_ex__`s
bz!r@Nrv
rsr?C9r
_r"r@r
ceZdZdZdS)&PicklingTests.test_reduce.<locals>.C10ctrr;rs r?ru
z8PicklingTests.test_reduce.<locals>.C10.__getnewargs_ex__g  r@Nrv
rr@r?C10r
f#
!
!
!
!
!r@r
ceZdZfdZdS)&PicklingTests.test_reduce.<locals>.C11cSrrrs r?rz3PicklingTests.test_reduce.<locals>.C11.__getstate__psr@Nrrrrrsr?C11r
os.






r@r
ceZdZdZdS)&PicklingTests.test_reduce.<locals>.C12cdS)Nnot dictrrs r?rz3PicklingTests.test_reduce.<locals>.C12.__getstate__wrp
r@Nr
rr@r?C12r
vrq
r@r
r
ceZdZdZdS)&PicklingTests.test_reduce.<locals>.C13ctrr;rs r?rz3PicklingTests.test_reduce.<locals>.C13.__getstate__~r
r@Nr
rr@r?C13r
}r
r@r
c0eZdZeZfdZdS)&PicklingTests.test_reduce.<locals>.C14c^D]\}}t|||dSrr7rb)r:r=rrs   r?r4z/PicklingTests.test_reduce.<locals>.C14.__init__s=#(;;==//KD%D$....//r@N)rrrrrr4rsr?C14r
s;eI
/
/
/
/
/
/
/r@r
ceZdZdS)&PicklingTests.test_reduce.<locals>.C15NrKrr@r?C15r
rMr@r
quebeci)r_
ceZdZdS)&PicklingTests.test_reduce.<locals>.C16NrKrr@r?C16r
rMr@r
yukon)r^
)rpickleHIGHEST_PROTOCOLrb
r7rbrrrT
rr<r\
rr6)r:	protocolsrrr]
r=rrr
rr}
r
r
rr
r
r
r
r
r
r
r
r;r<rs                      @@@r?test_reducezPicklingTests.test_reduce)s[	&1A566	..4 										bdd	1	1Euc40000 ;;==	&	&KD%Cu%%%%	>	>Euc4u====	"	"	"	"	"	"	"	"bdd	-	-Ezz&&y11--%%e,,,---------------	&	&	&	&	&	&	&	&	&	&	&bdd	=	=Ezz""5#tV<<<	*	*	*	*	*	*	*	*	*	*	-	-	-	-	-	-	-	-	-	-									"	"	"	"	"	"	"	"	1	1E2r2~
1
1ceeA::**Iz+BCC11))%000111111111111111
1	"	"	"	"	"	"	"	"	"	"bdd	1	1Euc40000	!	!	!	!	!	!	!	!cee	-	-Ezz&&z22--%%e,,,---------------										cee	8	8Euc7777	"	"	"	"	"	"	"	"cee	=	=Euc<<<<	!	!	!	!	!	!	!	!cee	%	%E"":..
)
)!!%(((
)
)
)
)
)
)
)
)
)
)
)
)
)
)
)qyy&&z22%%NN$$$%%%%%%%%%%%%%%%	/	/	/	/	/	/	/	/	/	/cee	%	%Ezz""5#dE]"CCCC&&y11--%%e,,,---------------&&y11%%NN$$$%%%%%%%%%%%%%%%					$			c8T"##	@	@EucT#YY????					$			c7)nn	@	@EucT#YY????	@	@s~$DD
	
D
	G&&G*-G*#JJ		J		0MM	M	=NN"	%N"	P$$P(	+P(		Q**Q.	1Q.	cttjdz}Gdd}|D],}|dkrind}||||-dS)NrqceZdZdZdZdS)7PicklingTests.test_special_method_lookup.<locals>.PickyciSrrrs r?rzDPicklingTests.test_special_method_lookup.<locals>.Picky.__getstate__s	r@c,|dvrt|dS)N)rj
ru
rgrs  r?rzCPicklingTests.test_special_method_lookup.<locals>.Picky.__getattr__s!BBB(...tr@N)rrrrrrr@r?Pickyr
s2







r@r
rrr)rr
r
rb
)r:r
r
protocolrs     r?r5z(PicklingTests.test_special_method_lookups&1A566									"	?	?H"a--BBTEx>>>>	?	?r@c	|d||}t|jtjurt	d|||||t|t||t|drD||j	|j	|||j	|j	|t|dr|
|j|j||jD]l}|t||t||||t||dt||d|m|t|t||dS)zKUtility method to verify if two objects are copies of each others.
        Nz{!r} is not a copy of {!r}zCobject passed to _assert_is_copy must override the __repr__ method.)rrKr)rrIrr^rr	rrrY
rKrX
rrGrJr)r:robjcopyrslots     r?_assert_is_copyzPicklingTests._assert_is_copys;.55c7CCC9900
=>>
>g3///

d3iigC
8883
##	F  w/?S IIIS\7+;EEE3$$	H  0As KKK

H
H  C&&(>(>C!III  dD!9!9!($!=!=3!HHHHcDMMs;;;;;r@cGddfdtjttjdztjtjhtjtjhDS)zLUtility method to generate the many possible pickle configurations.
        c$eZdZdZdZdZdZdS)<PicklingTests._generate_pickle_copiers.<locals>.PickleCopierz&This class copies object using pickle.c0||_||_||_dSr)r]
dumpsloads)r:r]
r
r
s    r?r4zEPicklingTests._generate_pickle_copiers.<locals>.PickleCopier.__init__s"
"
"


r@c^||||jSr)r
r
r]
r,s  r?rzAPicklingTests._generate_pickle_copiers.<locals>.PickleCopier.copys$zz$**S$*"="=>>>r@cd|j|jj|jj|jj|jjS)Nz0PickleCopier(proto={}, dumps={}.{}, loads={}.{}))rr]
r
rrr
rs r?rzEPicklingTests._generate_pickle_copiers.<locals>.PickleCopier.__repr__sAK
 $
 5tz7N $
 5tz7NPPQr@N)rrrrr4rrrr@r?PickleCopierr
sL44
#
#
#
?
?
?
Q
Q
Q
Q
Qr@r
c3"K|]	}|V
dSrr)r<r;r
s  r?rz9PicklingTests._generate_pickle_copiers.<locals>.<genexpr>sBEEd#EEEEEEr@rq)		itertoolsproductrr
r
r
_dumpsr
_loads)r
s@r?_generate_pickle_copiersz&PicklingTests._generate_pickle_copierss	Q	Q	Q	Q	Q	Q	Q	Q EEEE$U6+BQ+F%G%G&,lFM%B&,lFM%BDDEEE	Er@cxGdda|t5tjtddddn#1swxYwYGddta|t5tjtddddn#1swxYwYGddaGddtaGdd	ta|D]*}||
5t}|	|}|
||d|_|	|}|
||t}d|_d|_|	|}|
||t
}d|_d
|_|	|}|
||dddn#1swxYwY,dS)NceZdZdgZdS)rrDNrrr@r?rrrr@rrceZdZdS)rLNrKrr@r?rLrLrMr@rLc*eZdZdZdgZdZdZdZdS)rz7A class with __getstate__ and __setstate__ implemented.rDct|di}t|jD]D}|jddD]&}	t||||<#t$rY#wxYwE|S)NrKrr)rJrrIr`rKrr)r:rrr
s    r?rzC.__getstate__sj"55::<<::-!!C # 0 0b A A!!!*1$*=*=E$KK-!!! D!!
sA,,
A98A9c\|D]\}}t|||dSrr
)r:rrrs    r?rzC.__setstate__s<!KKMM((DAqD!Q''''((r@cZt|jd|dS)Nz()<r&)rIrrrs r?rz
C.__repr__s.%)$ZZ%8%8%8$:K:K:M:M:M:MNNr@N)rrrrrrrrrr@r?rrsSEEI



(
(
(
O
O
O
O
Or@ceZdZdZdS)rLz!A subclass of a class with slots.Nrrr@r?rLrLs//Dr@ceZdZdZdgZdS)rzA subclass with an extra slot.rXN)rrrrrrr@r?rr
s,,IIIr@r)
pickle_copierrrr)
rrrr
r
rLrr
subTestrr
rDrX)r:r
rrs    r?test_pickle_slotszPicklingTests.test_pickle_slotssI								


y
)
)	!	!La   	!	!	!	!	!	!	!	!	!	!	!	!	!	!	!								


y
)
)	!	!La   	!	!	!	!	!	!	!	!	!	!	!	!	!	!	!	O	O	O	O	O	O	O	O$								
								
"::<<	+	+MM::
+
+CC!&&q))$$Q***!&&q))$$Q***CC!&&q))$$Q***CC!&&q))$$Q***'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+	+	+s6"AAA"B<<CC'C:H--H1	4H1	clGddaGddtaGddtaGddtaGd	d
tatttt
tf}|}tj	||D]\}}|
||5t|di}||ji|}|j
}||}||||d
krK|jsD|j||}	|||	dddn#1swxYwY|D]}|
|5t|di}||ji|}t'|}||||js>|jt'|}	|||	dddn#1swxYwYdS)Nc0eZdZdZdZdZfdZdZxZS)rz:The state of this class is copyable via its instance dict.rTcdt||_||_dSr)rsr4rDrX)r:rDrXrs   r?r4zC1.__init__/s+  """r@c(d|jd|jdS)NzC1(rr2
rWrs r?rzC1.__repr__3s'+vvvtvvv66r@)	rrrrARGSNEED_DICT_COPYINGr4rrvrs@r?rr+sXHHD $





7
7
7
7
7
7
7r@rcPeZdZdZdZdZfdZfdZedZ	dZ
xZS)rz,A list subclass copyable via __getnewargs__.rFcft|}||_||_|SrrsrrDrX)rrDrXr:rs    r?rz
C2.__new__;s+wws++r@crt|ddSNrf
)rsr4r)r:r;rs  r?r4zC2.__init__@s3  """H%%%%%r@c|jSrr
rEs r?rj
zC2.__getnewargs__E	xr@cHd|jd|jdt|dS)NzC2(r)<r&rDrXr6rs r?rzC2.__repr__H'+/66646664::::FFr@)rrrrr
r
rr4rrj
rrvrs@r?rr7s::D %






&
&
&
&
&

 
 [
 
G
G
G
G
G
G
Gr@rcBeZdZdZdZdZdZedZdZ	dZ
dS)	r
z*A list subclass copyable via __getstate__.rFcL||_||_|ddSr
)rDrXrr.	s   r?r4zC3.__init__Ps*H%%%%%r@c|jSrr
rEs r?rzC3.__getstate__Vr
r@c,|\}}||_||_dSrrW)r:rrDrXs    r?rzC3.__setstate__Ys1r@cHd|jd|jdt|dS)NzC3(rr
r&r
rs r?rzC3.__repr__]r
r@N)rrrrr
r
r4rrrrrr@r?r
r
Lsr88D %
&
&
&
 
 [
 



G
G
G
G
Gr@r
cFeZdZdZdZdZfdZedZdZ	xZ
S)rz,An int subclass copyable via __getnewargs__.)rPrOrqFcht||}||_||_|Srr
rrDrXrr:rs     r?rz
C4.__new__e-wwsE22r@c|jSrr
rEs r?rj
zC4.__getnewargs__jr
r@cHd|jd|jdt|dS)NzC4(rr
r&rDrXr-rs r?rzC4.__repr__m'+/66646663t9999EEr@)rrrrr
r
rrrj
rrvrs@r?rrasz::(D %






 
 [
 
F
F
F
F
F
F
Fr@rcTeZdZdZdZddiZdZddfd
Zed	Z	d
Z
xZS)r}
z/An int subclass copyable via __getnewargs_ex__.rrrtFrrT	cht||}||_||_|Srr
r
s     r?rz
C5.__new__vr
r@c|j|jfSr)r
KWARGSrEs r?ru
zC5.__getnewargs_ex__{s#*--r@cHd|jd|jdt|dS)NzC5(rr
r&r
rs r?rzC5.__repr__~r
r@)rrrrr
r
r
rrru
rrvrs@r?r}
r}
qs==Dq\F %,-








.
.[
.
F
F
F
F
F
F
Fr@r}
)rr
r
rrrE)rr6rr
r-rr}
r
r
r
r
rJr
r]
rr
r
rKrr)
r:test_classespickle_copiersrr
r<rr]
r
objcopy2s
          r?test_reduce_copyingz!PicklingTests.test_reduce_copying(s\		7		7		7		7		7		7		7		7	G	G	G	G	G	G	G	G*	G	G	G	G	G	G	G	G*
	F
	F
	F
	F
	F
	F
	F
	F 	F	F	F	F	F	F	F	F BB+6688"+"3L."Q"Q	8	8C#]CC

8

8 h33c38.v..%+',,S11$$S'222
A::c&;:$**,,,,11'::H((h777

8

8

8

8

8

8

8

8

8

8

8

8

8

8

8  
	8
	8C#&&
8
8 h33c38.v.."3--$$S'222
,8$**,,,'00H((h777
8
8
8
8
8
8
8
8
8
8
8
8
8
8
8
	8
	8s&?B"E--E1	4E1	B	H((H,	/H,	cGddtGfddddl}|jfdddifddf}|d|dS)	NceZdZdS)(PicklingTests.test_issue24097.<locals>.SNrKrr@r?rpr
rMr@rpc4eZdZdgZfdZdS)(PicklingTests.test_issue24097.<locals>.ArcN|dkrdgjdd<dSt)Nrr)
__slotnames__r)r:rwr{rps  r?rz4PicklingTests.test_issue24097.<locals>.A.__getattr__s16>>*+!F))AOAAA&2((r@N)rrrrr)r{rpsr?r{rsBQvYYKM
)
)
)
)
)
)
)
)r@r{rrrrr)r@rU
rW
rGrT
)r:rU
rr{rps   @@r?test_issue24097zPicklingTests.test_issue24097s									)	)	)	)	)	)	)	)	)	)	)	&tfb\.BD$O**1--x88888r@czt|t5tddddn#1swxYwYtd|t5tdddn#1swxYwY|t5tdddddS#1swxYwYdSr)r^r\
rrrT
rs r?test_object_reducez PicklingTests.test_object_reduces	


y
)
)	#	#HH"""	#	#	#	#	#	#	#	#	#	#	#	#	#	#	#	q!!!


y
)
)	%	%HH""$$$	%	%	%	%	%	%	%	%	%	%	%	%	%	%	%


y
)
)	)	)HH""4(((	)	)	)	)	)	)	)	)	)	)	)	)	)	)	)	)	)	)s5"A))A-0A-/!CC #C "D00D47D4r)
rrrrb
r
r5r
rfr
r
r
rrrr@r?rR
rR
	s-/$ $====<y@y@y@v???<<<<4EE\E0A+A+A+Fz8z8z8x999")))))r@rR
c.eZdZejdZdS)SharedKeyTestscGddGddfdtdD}}|tjt	|tjt	||tjt	|tjdditd	\|_|_|_|_	|_
|_|tjt	|tjt	|}|
tjt	|tjt	||tjt	|tjddi|tjt	|tjddidS)
NceZdZdS))SharedKeyTests.test_subclasses.<locals>.ANrKrr@r?r{rrMr@r{ceZdZdS))SharedKeyTests.test_subclasses.<locals>.BNrKrr@r?rr
rMr@rc8g|]}fSrr)r<rqr{rs  r?r=z2SharedKeyTests.test_subclasses.<locals>.<listcomp>s)'''!!##qqss'''r@rrDrqr)rrGrr)vars
assertLessrrrYwrrr
assertGreater)r:rDrXrr{rs    @@r?test_subclasseszSharedKeyTests.test_subclassess																	(''''U2YY''''qssAACC1tAww//tAww1G1GHHH
d1gg..
s1g0F0FGGG(-Qxx$QS!#qsACCM$q''22CM$q''4J4JKKK
QSS3=a113=b3J3JKKK
d2hh//Aw1G1GHHH
d1gg..
s1g0F0FGGGGGr@N)rrrrr
rrr@r?rrs6HHHHHr@rceZdZdZdZdZdS)DebugHelperMetaz<
    Sets default __doc__ and simplifies repr() output.
    cp|d||d<t||||S)Nr)rrIr)rr=rSrs    r?rzDebugHelperMeta.__new__s699Y'#E)||D$u555r@c*t|jSr)rrrEs r?rzDebugHelperMeta.__repr__sCL!!!r@N)rrrrrrrr@r?rrs<666"""""r@rcTeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
S)MroTestz
    Regressions for some bugs revealed through
    mcsl.mro() customization (typeobject.c: mro_internal()) and
    cls.__bases__ assignment (typeobject.c: type_set_bases()).
    c"d|_d|_dS)NrF)stepreadyrs r?r
z
MroTest.setUps	


r@c@|j|k}|r|xjdz
c_|Sr)r)r:limitrets   r?
step_untilzMroTest.step_untils*y5 	IINII
r@cPGfddt}Gdd|}dS)zM
        type_set_bases must be aware that type->tp_mro can be NULL.
        ceZdZfdZdS)4MroTest.test_incomplete_set_bases_on_self.<locals>.Mcdr|xjdz
c_t|S)Nrqr)r rLrIrrCs r?rz8MroTest.test_incomplete_set_bases_on_self.<locals>.M.mros7??1%%(MMR'MMxx}}$r@Nrrsr?rr#s.
%
%
%
%
%
%
%r@rceZdZdS)4MroTest.test_incomplete_set_bases_on_self.<locals>.ANrKrr@r?r{r&rMr@r{r@Nrr:rr{s`  r?!test_incomplete_set_bases_on_selfz)MroTest.test_incomplete_set_bases_on_selfsp	%	%	%	%	%	%	%	%	%	%					!						r@cGfddt}Gdd|Gdd}|xjdz
c_d	S)
z?
        Deep reentrancy must not over-decref old_mro.
        ceZdZfdZdS)/MroTest.test_reent_set_bases_on_base.<locals>.Mc|j0|jdkr%drxjdz
c_t|S)Nrrr)r`rr rLrIr)rr{r:s r?rz3MroTest.test_reent_set_bases_on_base.<locals>.M.mrosK;*s|s/B/Br***r)xx}}$r@Nr)r{r:sr?rr,
s3
%
%
%
%
%
%
%
%r@rceZdZdS)/MroTest.test_reent_set_bases_on_base.<locals>.ANrKrr@r?r{r/rMr@r{r@ceZdZdS)/MroTest.test_reent_set_bases_on_base.<locals>.BNrKrr@r?rr1rMr@rrN)rrL)r:rrr{s`  @r?test_reent_set_bases_on_basez$MroTest.test_reent_set_bases_on_base	s	%	%	%	%	%	%	%	%	%	%	%					!													rr@cGfddt}Gdd|}Gdd|}Gdd	|}d
S)zU
        Similar to test_reent_set_bases_on_base, but may crash differently.
        ceZdZfdZdS)6MroTest.test_reent_set_bases_on_direct_base.<locals>.Mc|jd}|tur%dr|xjdz
c_t|S)Nrrr)rLr^r rIr)rrr:s  r?rz:MroTest.test_reent_set_bases_on_direct_base.<locals>.M.mro!sN}Q'v%%q))-",xx}}$r@Nrrsr?rr5 .
%
%
%
%
%
%
%r@rceZdZdS)6MroTest.test_reent_set_bases_on_direct_base.<locals>.ANrKrr@r?r{r9)rMr@r{r@ceZdZdS)6MroTest.test_reent_set_bases_on_direct_base.<locals>.BNrKrr@r?rr;+rMr@rceZdZdS)6MroTest.test_reent_set_bases_on_direct_base.<locals>.CNrKrr@r?rr=-rMr@rNr')r:rr{rrs`    r?#test_reent_set_bases_on_direct_basez+MroTest.test_reent_set_bases_on_direct_bases	%	%	%	%	%	%	%	%	%	%					!																						r@c$Gfddt}Gdd|}Gdd|Gdd	|d
_t5xjdz
c_ddddS#1swxYwYdS)
aM
        type_set_bases must check for an inheritance cycle not only through
        MRO of the type, which may be not yet updated in case of reentrance,
        but also through tp_base chain, which is assigned before diving into
        inner calls to mro().

        Otherwise, the following snippet can loop forever:
            do {
                // ...
                type = type->tp_base;
            } while (type != NULL);

        Functions that rely on tp_base (like solid_base and PyType_IsSubtype)
        would not be happy in that case, causing a stack overflow.
        ceZdZfdZdS)5MroTest.test_reent_set_bases_tp_base_cycle.<locals>.Mcjr&|jdkrf_|jdkrf_t|S)NB1B2rrrLrIr)rrCrDr:s r?rz9MroTest.test_reent_set_bases_tp_base_cycle.<locals>.M.mroAsI:-|t++(*u|t++(*uxx}}$r@Nr)rCrDr:sr?rrA@s8
%
%
%
%
%
%
%
%
%r@rceZdZdS)5MroTest.test_reent_set_bases_tp_base_cycle.<locals>.ANrKrr@r?r{rGIrMr@r{r@ceZdZdS)6MroTest.test_reent_set_bases_tp_base_cycle.<locals>.B1NrKrr@r?rCrIKrMr@rCceZdZdS)6MroTest.test_reent_set_bases_tp_base_cycle.<locals>.B2NrKrr@r?rDrKMrMr@rDTrN)rrrrrL)r:rr{rCrDs`  @@r?"test_reent_set_bases_tp_base_cyclez*MroTest.test_reent_set_bases_tp_base_cycle0sW 	%	%	%	%	%	%	%	%	%	%	%	%					!																				



y
)
)		LLBLL																		s'BB	B	c>Gfddt}Gdd|}Gdd|}Gdd	|Gd
d|d_|f_f|_jfg|g|jf|gd
S)a
        type_set_bases must check for reentrancy upon finishing its job
        by updating tp_subclasses of old/new bases of the type.
        Otherwise, an implicit inheritance cycle through tp_subclasses
        can break functions that recurse on elements of that field
        (like recurse_down_subclasses and mro_hierarchy) eventually
        leading to a stack overflow.
        ceZdZfdZdS);MroTest.test_tp_subclasses_cycle_in_update_slots.<locals>.Mczjr|jdkrd_f_t|SNrFrE)rrDrr:s r?rz?MroTest.test_tp_subclasses_cycle_in_update_slots.<locals>.M.mro^s9:(#,#"5"5!&DJ#%%AKxx}}$r@Nr)rDrr:sr?rrO]s8
%
%
%
%
%
%
%
%
%r@rceZdZdS);MroTest.test_tp_subclasses_cycle_in_update_slots.<locals>.ANrKrr@r?r{rSdrMr@r{r@ceZdZdS)<MroTest.test_tp_subclasses_cycle_in_update_slots.<locals>.B1NrKrr@r?rCrUfrMr@rCceZdZdS)<MroTest.test_tp_subclasses_cycle_in_update_slots.<locals>.B2NrKrr@r?rDrWhrMr@rDceZdZdS);MroTest.test_tp_subclasses_cycle_in_update_slots.<locals>.CNrKrr@r?rrYjrMr@rTN)rrrLrGrA)r:rr{rCrDrs`   @@r?(test_tp_subclasses_cycle_in_update_slotsz0MroTest.test_tp_subclasses_cycle_in_update_slotsTs	%	%	%	%	%	%	%	%	%	%	%	%					!																												
etre,,,**,,qc222**,,b111t,,,))++bT22222r@cGddtGfddt}Gdd|}Gdd	|}Gd
d|Gdd
|d_5|f_dddn#1swxYwYf|_jfjtt	dS)z
        The same as test_tp_subclasses_cycle_in_update_slots, but tests
        a code path executed on error (goto bail).
        ceZdZdS)=MroTest.test_tp_subclasses_cycle_error_return_path.<locals>.ENrKrr@r?rr]}rMr@rc eZdZfdZdS)=MroTest.test_tp_subclasses_cycle_error_return_path.<locals>.Mcjr)|jdkrjfkrd_n
f_t|SrQrE)rrDrrr:s r?rzAMroTest.test_tp_subclasses_cycle_error_return_path.<locals>.M.mrosO: #,#"5"5{re++%*

')exx}}$r@Nr)rDrrr:sr?rr_s=
%
%
%
%
%
%
%
%
%
%r@rceZdZdS)=MroTest.test_tp_subclasses_cycle_error_return_path.<locals>.ANrKrr@r?r{rbrMr@r{r@ceZdZdS)>MroTest.test_tp_subclasses_cycle_error_return_path.<locals>.B1NrKrr@r?rCrdrMr@rCceZdZdS)>MroTest.test_tp_subclasses_cycle_error_return_path.<locals>.B2NrKrr@r?rDrfrMr@rDceZdZdS)=MroTest.test_tp_subclasses_cycle_error_return_path.<locals>.CNrKrr@r?rrhrMr@rTN)
r0rrrrLrGr`rrIr)r:rr{rCrDrrs`   @@@r?*test_tp_subclasses_cycle_error_return_pathz2MroTest.test_tp_subclasses_cycle_error_return_pathxs
										%	%	%	%	%	%	%	%	%	%	%	%	%					!																												



q
!
!	 	 %AK	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 tre,,,E$((1++$6$677777s	BB!BcPGfddt}Gdd|}dS)z
        Extending an uninitialized type with type->tp_mro == NULL must
        throw a reasonable TypeError exception, instead of failing
        with PyErr_BadInternalCall.
        ceZdZfdZdS))MroTest.test_incomplete_extend.<locals>.Mc|jK|jdkr@t5Gdd|}dddn#1swxYwYt|S)NrceZdZdS)8MroTest.test_incomplete_extend.<locals>.M.mro.<locals>.XNrKrr@r?rros Dr@)r`rrrrIr)rrr:s  r?rz-MroTest.test_incomplete_extend.<locals>.M.mros;&3<3+>+>**955!!!!!!!!!!!!!!!!!!!!!!!!!xx}}$sA		A
A
Nrrsr?rrlr7r@rceZdZdS))MroTest.test_incomplete_extend.<locals>.ANrKrr@r?r{rqrMr@r{r@Nr'r(s`  r?test_incomplete_extendzMroTest.test_incomplete_extendsp	%	%	%	%	%	%	%	%	%	%					!						r@cPGfddt}Gdd|}dS)z
        Attribute lookup on a super object must be aware that
        its target type can be uninitialized (type->tp_mro == NULL).
        c"eZdZfdZxZS)(MroTest.test_incomplete_super.<locals>.Mc|jGt5t||jdddn#1swxYwYt
|Sr)r`rrrsxxxrIr)rrr:s r?rz,MroTest.test_incomplete_super.<locals>.M.mros;&**>::,,c3++,,,,,,,,,,,,,,,xx}}$sAA	A	)rrrrrvrxs@r?rrus>
%
%
%
%
%
%
%
%
%
%r@rceZdZdS)(MroTest.test_incomplete_super.<locals>.ANrKrr@r?r{ryrMr@r{r@Nr'r(s`  r?test_incomplete_superzMroTest.test_incomplete_supersp
	%	%	%	%	%	%	%	%	%	%					!						r@cGddGfddt|t5Gdd}ddddS#1swxYwYdS)	z
        gh-92112: A custom mro() returning a result conflicting with
        __bases__ and deleting itself caused a double free.
        ceZdZdS)/MroTest.test_disappearing_custom_mro.<locals>.BNrKrr@r?rr}rMr@rceZdZfdZdS)/MroTest.test_disappearing_custom_mro.<locals>.Mc`fSr)r)rrrs r?rz3MroTest.test_disappearing_custom_mro.<locals>.M.mrosEtr@Nr)rrsr?rrs3







r@rceZdZdS)/MroTest.test_disappearing_custom_mro.<locals>.ANrKrr@r?r{rrr@r{r@N)rrr)r:r{rrs  @@r?test_disappearing_custom_mroz$MroTest.test_disappearing_custom_mros
																			


y
)
)		




a



																		sAA!$A!N)rrrrr
r r)r2r>rLrZrirrrzrrr@r?rrs


&("""H"3"3"3H 8 8 8D$ r@r__main__)"r\rU
rZr
r*r
r3r5rr>r2rnrmrr
contextlibrrrrrr3rrr
r6
r?
rR
rrIrrrmainrr@r?<module>rs				















&&&&&&IIIsDsDsDsDsDH%sDsDsDlGHGHGHGHGH 1GHGHGHTP9898989898X&989898xH-211111!1116w)w)w)w)w)H%w)w)w)t
HHHHHX&HHH4	"	"	"	"	"d	"	"	"bbbbbhbbbJzHMOOOOOsA

AA