python (3.12.0)

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

͑ejdZddlZddlZddlZddlZddlmZmZmZm	Z	m
Z
mZddlZddl
mZeeee	fZe
efZeezZGddej$ZdZedk(rej,yy)	zUnit tests for the copy module.N)leltgegteqne)supportceZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!d Z"d!Z#d"Z$d#Z%d$Z&d%Z'd&Z(d'Z)d(Z*d)Z+d*Z,d+Z-d,Z.d-Z/d.Z0d/Z1d0Z2d1Z3d2Z4d3Z5d4Z6d5Z7d6Z8d7Z9d8Z:d9Z;d:Z<d;Z=d<Z>d=Z?d>Z@d?ZAd@ZBdAZCdBZDdCZEdDZFdEZGdFZHdGZIdHZJdIZKdJZLdKZMdLZNdMZOdNZPyO)PTestCopyc|jtjtj|j	ttjtyN)assertIscopyErrorerror
assertTrue
issubclass	Exceptionselfs B/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/test/test_copy.pytest_exceptionszTestCopy.test_exceptionss/

djj$**-
4::y9:cVd}tj|}|j||yN*)rassertEqualrxys   rtest_copy_basiczTestCopy.test_copy_basics$IIaLArcGfddtd}tj|}|j|j|j|j|j|jy)NceZdZdZfdZy)"TestCopy.test_copy_copy.<locals>.Cc||_yr
foorr's  r__init__z+TestCopy.test_copy_copy.<locals>.C.__init__!	rc(|jSr
r&rCs r__copy__z+TestCopy.test_copy_copy.<locals>.C.__copy__#{"rN)__name__
__module____qualname__r)r.r-srr-r$ s


#rr-r)objectrr	__class__r'rrr r-s   @rtest_copy_copyzTestCopy.test_copy_copysW	#	#

bEIIaLakk2&rcGddtfd}d}|jttj|t	j
|tj|}|j
|||jt||j|j|jy)NceZdZdZy)&TestCopy.test_copy_registry.<locals>.Cc>tj|}||_|Sr
r4__new__r'clsr'objs   rr=z.TestCopy.test_copy_registry.<locals>.C.__new__,nnS)
rNr0r1r2r=rrr-r:+
rr-c"|jffSr
r&r@r-s rpickle_Cz-TestCopy.test_copy_registry.<locals>.pickle_C0z?"rr)
r4assertRaises	TypeErrorrcopyregpickleassertIsNotrtyper'rrGrr r-s    @rtest_copy_registryzTestCopy.test_copy_registry*s		
	#
bE)TYY2q(A&IIaLAa!$&rcGfddt}g|}tj|}|j|||jdgy)NceZdZfdZdZy)'TestCopy.test_copy_reduce_ex.<locals>.Cc(jdyNappendrprotocs  r
__reduce_ex__z5TestCopy.test_copy_reduce_ex.<locals>.C.__reduce_ex__<rc&|jdyNzshouldn't call thisfailrs r
__reduce__z2TestCopy.test_copy_reduce_ex.<locals>.C.__reduce__?		/0rNr0r1r2r]rcr\srr-rS;


1rr-rVr4rrrrr-rr r\s    @rtest_copy_reduce_exzTestCopy.test_copy_reduce_ex:sJ	1	1

CIIaL

aQC rcGfddt}g|}tj|}|j|||jdgy)NceZdZfdZy)$TestCopy.test_copy_reduce.<locals>.Cc(jdyrUrXrr\s rrcz/TestCopy.test_copy_reduce.<locals>.C.__reduce__Ir^rNr0r1r2rcrfsrr-rmH
rr-rVrhris    @rtest_copy_reducezTestCopy.test_copy_reduceGsJ		

CIIaL

aQC rcGddt}|}|jtjtj|y)NceZdZdZy)"TestCopy.test_copy_cant.<locals>.Ccf|jdrt|tj||SN__reduce
startswithAttributeErrorr4__getattribute__rnames  rr|z3TestCopy.test_copy_cant.<locals>.C.__getattribute__T,??:.(....tT::rNr0r1r2r|rCrrr-ruS
;rr-)r4rIrrrr-rs   rtest_copy_cantzTestCopy.test_copy_cantRs1	;	;

C$**dii3rc\Gdd}d}Gddtj}ddtdd	d
zddd
ddd|jdt	tdtdt
ddd	|t|tg}|D]'}|jtj||)y)NceZdZy)+TestCopy.test_copy_atomic.<locals>.NewStyleNr0r1r2rCrrNewStyler^rrcyr
rCrCrrfz$TestCopy.test_copy_atomic.<locals>.f`rceZdZy)0TestCopy.test_copy_atomic.<locals>.WithMetaclassNrrCrr
WithMetaclassrbrrr	metaclass.rdQ	@TF?hellohelloሴsworld
rV)abcABCMetaNotImplemented__code__bytesrangeslicemaxpropertyrr)rrrrtestsrs      rtest_copy_atomiczTestCopy.test_copy_atomic]s				ckk	sNQVT4-5s,eBiq"a3
xz	;
	+AMM$))A,*	+rcgd}tj|}|j|||j||g}tj|}|j|||j||y)NrVrrrrMrs   rtest_copy_listzTestCopy.test_copy_listlsfIIaLAAIIaLAArcd}|jtj||d}|jtj||dddgf}|jtj||y)NrrCrVrr)rrrrs  rtest_copy_tuplezTestCopy.test_copy_tuplevs[

diilA&

diilA&
1bM

diilA&rcddd}tj|}|j|||j||i}tj|}|j|||j||y)NrVrr'barrrs   rtest_copy_dictzTestCopy.test_copy_dict~ska IIaLAAIIaLAArchd}tj|}|j|||j||t}tj|}|j|||j||yN>rVrr)rrrMsetrs   r
test_copy_setzTestCopy.test_copy_setshIIaLAAEIIaLAArcthd}|jtj||t}|jtj||yr)	frozensetrrrs  rtest_copy_frozensetzTestCopy.test_copy_frozensets?i 

diilA&K

diilA&rctd}tj|}|j|||j||t}tj|}|j|||j||y)Nsabc)	bytearrayrrrMrs   rtest_copy_bytearrayzTestCopy.test_copy_bytearraysmfIIaLAAKIIaLAArcrGdd}|d}|jtj||y)NceZdZdZdZy)*TestCopy.test_copy_inst_vanilla.<locals>.Cc||_yr
r&r(s  rr)z3TestCopy.test_copy_inst_vanilla.<locals>.C.__init__r*rc4|j|jk(Sr
r&rothers  r__eq__z1TestCopy.test_copy_inst_vanilla.<locals>.C.__eq__xx599,,rNr0r1r2r)rrCrrr-r

-rr-rrrrs   rtest_copy_inst_vanillazTestCopy.test_copy_inst_vanillas/	-	-

bE1q)rcxGfddd}|jtj||y)Nc$eZdZdZfdZdZy)'TestCopy.test_copy_inst_copy.<locals>.Cc||_yr
r&r(s  rr)z0TestCopy.test_copy_inst_copy.<locals>.C.__init__r*rc(|jSr
r&r,s rr.z0TestCopy.test_copy_inst_copy.<locals>.C.__copy__r/rc4|j|jk(Sr
r&rs  rrz.TestCopy.test_copy_inst_copy.<locals>.C.__eq__rrN)r0r1r2r)r.rr3srr-rs

#
-rr-rrrrr-s  @rtest_copy_inst_copyzTestCopy.test_copy_inst_copys0	-	-
bE1q)rcrGdd}|d}|jtj||y)NceZdZdZdZdZy).TestCopy.test_copy_inst_getinitargs.<locals>.Cc||_yr
r&r(s  rr)z7TestCopy.test_copy_inst_getinitargs.<locals>.C.__init__r*rc|jfSr
r&rs r__getinitargs__z>TestCopy.test_copy_inst_getinitargs.<locals>.C.__getinitargs__{"rc4|j|jk(Sr
r&rs  rrz5TestCopy.test_copy_inst_getinitargs.<locals>.C.__eq__rrNr0r1r2r)rrrCrrr-r

#
-rr-rrrs   rtest_copy_inst_getinitargsz#TestCopy.test_copy_inst_getinitargs/	-	-
bE1q)rcGddt}|d}tj|}|j|||j|||j	|||j|j
|j
y)NceZdZdZdZdZy)-TestCopy.test_copy_inst_getnewargs.<locals>.Cc>tj|}||_|Sr
intr=r'r?r'rs   rr=z5TestCopy.test_copy_inst_getnewargs.<locals>.C.__new__{{3'rc|jfSr
r&rs r__getnewargs__z<TestCopy.test_copy_inst_getnewargs.<locals>.C.__getnewargs__xxy rc4|j|jk(Sr
r&rs  rrz4TestCopy.test_copy_inst_getnewargs.<locals>.C.__eq__rrNr0r1r2r=rrrCrrr-r

!
-rr-rrrassertIsInstancerrMr'rr-rr s    rtest_copy_inst_getnewargsz"TestCopy.test_copy_inst_getnewargssn	-	-
bEIIaLa#AA&rcGddt}|d}tj|}|j|||j|||j	|||j|j
|j
y)NceZdZdZdZdZy)0TestCopy.test_copy_inst_getnewargs_ex.<locals>.Cc>tj|}||_|Sr
rrs   rr=z8TestCopy.test_copy_inst_getnewargs_ex.<locals>.C.__new__rrc"dd|jifSNrCr'r&rs r__getnewargs_ex__zBTestCopy.test_copy_inst_getnewargs_ex.<locals>.C.__getnewargs_ex__E488,,,rc4|j|jk(Sr
r&rs  rrz7TestCopy.test_copy_inst_getnewargs_ex.<locals>.C.__eq__rrNr0r1r2r=rrrCrrr-r

-
-rr-rr&rrs    rtest_copy_inst_getnewargs_exz%TestCopy.test_copy_inst_getnewargs_exsn	-	-
"IIIaLa#AA&rcrGdd}|d}|jtj||y)NceZdZdZdZdZy)+TestCopy.test_copy_inst_getstate.<locals>.Cc||_yr
r&r(s  rr)z4TestCopy.test_copy_inst_getstate.<locals>.C.__init__r*rcd|jiSNr'r&rs r__getstate__z8TestCopy.test_copy_inst_getstate.<locals>.C.__getstate__txx((rc4|j|jk(Sr
r&rs  rrz2TestCopy.test_copy_inst_getstate.<locals>.C.__eq__rrNr0r1r2r)rrrCrrr-r

)
-rr-rrrs   rtest_copy_inst_getstatez TestCopy.test_copy_inst_getstaterrcrGdd}|d}|jtj||y)NceZdZdZdZdZy)+TestCopy.test_copy_inst_setstate.<locals>.Cc||_yr
r&r(s  rr)z4TestCopy.test_copy_inst_setstate.<locals>.C.__init__r*rc|d|_yrr&rstates  r__setstate__z8TestCopy.test_copy_inst_setstate.<locals>.C.__setstate__
 <rc4|j|jk(Sr
r&rs  rrz2TestCopy.test_copy_inst_setstate.<locals>.C.__eq__rrNr0r1r2r)r
rrCrrr-r

(
-rr-rrrs   rtest_copy_inst_setstatez TestCopy.test_copy_inst_setstaterrcGdd}|d}|jtj|||d}|jtj||y)Nc$eZdZdZdZdZdZy)4TestCopy.test_copy_inst_getstate_setstate.<locals>.Cc||_yr
r&r(s  rr)z=TestCopy.test_copy_inst_getstate_setstate.<locals>.C.__init__r*rc|jSr
r&rs rrzATestCopy.test_copy_inst_getstate_setstate.<locals>.C.__getstate__xxrc||_yr
r&rs  rr
zATestCopy.test_copy_inst_getstate_setstate.<locals>.C.__setstate__	 rc4|j|jk(Sr
r&rs  rrz;TestCopy.test_copy_inst_getstate_setstate.<locals>.C.__eq__rrNr0r1r2r)rr
rrCrrr-r

 
!
-rr-rgrrs   r test_copy_inst_getstate_setstatez)TestCopy.test_copy_inst_getstate_setstatesP	-	-
bE1q)
cF1q)rcVd}tj|}|j||yr)rdeepcopyrrs   rtest_deepcopy_basiczTestCopy.test_deepcopy_basics%MM!Arcg}||g}tj|}|j|||j|||j|d|d|j	|d|dyNrrV)rr rrMrrs   rtest_deepcopy_memozTestCopy.test_deepcopy_memosn

FMM!AA1qt$

adAaD!rcGddt}Gdd|}|jtj||y)NceZdZy)/TestCopy.test_deepcopy_issubclass.<locals>.MetaNrrCrrMetar' rrr(ceZdZy),TestCopy.test_deepcopy_issubclass.<locals>.CNrrCrrr-r*"rrr-r)rNrrr )rr(r-s   rtest_deepcopy_issubclassz!TestCopy.test_deepcopy_issubclasss3
	4		$	q)1-rcGfddtd}tj|}|j|j|j|j|j
|j
y)Nc eZdZdZdfd	Zy)*TestCopy.test_deepcopy_deepcopy.<locals>.Cc||_yr
r&r(s  rr)z3TestCopy.test_deepcopy_deepcopy.<locals>.C.__init__(r*rNc(|jSr
r&rmemor-s  r__deepcopy__z7TestCopy.test_deepcopy_deepcopy.<locals>.C.__deepcopy__*r/rr
)r0r1r2r)r3r3srr-r.'s


#rr-r)r4rr rr5r'r6s   @rtest_deepcopy_deepcopyzTestCopy.test_deepcopy_deepcopy&sX	#	#

bEMM!akk2&rcGddtfd}d}|jttj|tj|tj|}|j|||jt||j|j|jy)NceZdZdZy)*TestCopy.test_deepcopy_registry.<locals>.Cc>tj|}||_|Sr
r<r>s   rr=z2TestCopy.test_deepcopy_registry.<locals>.C.__new__3rArNrBrCrrr-r72rDrr-c"|jffSr
r&rFs rrGz1TestCopy.test_deepcopy_registry.<locals>.pickle_C7rHrr)r4rIrJrr rKrLrMrrNr'rOs    @rtest_deepcopy_registryzTestCopy.test_deepcopy_registry1s		
	#
bE)T]]A6q(A&MM!Aa!$&rcGfddt}g|}tj|}|j|||j	dgy)NceZdZfdZdZy)+TestCopy.test_deepcopy_reduce_ex.<locals>.Cc(jdyrUrXrZs  rr]z9TestCopy.test_deepcopy_reduce_ex.<locals>.C.__reduce_ex__Cr^rc&|jdyr`rars rrcz6TestCopy.test_deepcopy_reduce_ex.<locals>.C.__reduce__FrdrNrerfsrr-r=Brgrr-rVr4rr rrris    @rtest_deepcopy_reduce_exz TestCopy.test_deepcopy_reduce_exAsK	1	1

CMM!

aQC rcGfddt}g|}tj|}|j|||j	dgy)NceZdZfdZy)(TestCopy.test_deepcopy_reduce.<locals>.Cc(jdyrUrXros rrcz3TestCopy.test_deepcopy_reduce.<locals>.C.__reduce__Pr^rNrprfsrr-rDOrqrr-rVr@ris    @rtest_deepcopy_reducezTestCopy.test_deepcopy_reduceNsK		

CMM!

aQC rcGddt}|}|jtjtj|y)NceZdZdZy)&TestCopy.test_deepcopy_cant.<locals>.Ccf|jdrt|tj||Srwryr}s  rr|z7TestCopy.test_deepcopy_cant.<locals>.C.__getattribute__[rrNrrCrrr-rIZrrr-)r4rIrrr rs   rtest_deepcopy_cantzTestCopy.test_deepcopy_cantYs1	;	;

C$**dmmQ7rcGdd}d}ddtdddzdd	d
ddd
d|j|tdtt	g}|D]'}|jt
j||)y)NceZdZy)/TestCopy.test_deepcopy_atomic.<locals>.NewStyleNrrCrrrrNerrrcyr
rCrCrrrz(TestCopy.test_deepcopy_atomic.<locals>.fgrr.rrrrTFrsbytesrrr)rrrrrrrr )rrrrrs     rtest_deepcopy_atomiczTestCopy.test_deepcopy_atomicdss			sNB3dE27M1::59c8:7	/AMM$--*A.	/rcddgdg}tj|}|j|||j|||j|d|dyNrVrrrrr rrMrs   rtest_deepcopy_listzTestCopy.test_deepcopy_listoUVQKMM!AA1qt$rcg}|j|tj|}tD]}|j	t
||||j
|||j|d||jt|dyr#)
rYrr comparisonsrIRecursionErrorrMrrlenrrr ops    rtest_deepcopy_reflexive_listz%TestCopy.test_deepcopy_reflexive_listvsy	MM!	8Bnb!Q7	8A

adAQ#rcVd}tj|}|j||yNrCrr rrs   rtest_deepcopy_empty_tuplez"TestCopy.test_deepcopy_empty_tuples#MM!

arcddgdf}tj|}|j|||j|||j|d|dyrRrSrs   rtest_deepcopy_tuplezTestCopy.test_deepcopy_tuplerUrcVd}tj|}|j||y)N)rVrrr_rs   r!test_deepcopy_tuple_of_immutablesz*TestCopy.test_deepcopy_tuple_of_immutabless#MM!

arc&gf}|dj|tj|}tD]}|j	t
||||j
|||j
|d|d|j|dd|yNr)rYrr rWrIrXrMrrZs    rtest_deepcopy_reflexive_tuplez&TestCopy.test_deepcopy_reflexive_tuples
E	!AMM!	8Bnb!Q7	8A1qt$

ad1gq!rcddgdd}tj|}|j|||j|||j|d|dy)NrVrrrr'rSrs   rtest_deepcopy_dictzTestCopy.test_deepcopy_dictsVF1%MM!AA51U8,rcLi}||d<tj|}tD]}|jt|||t
D]}|jt||||j|||j|d||jt|dy)Nr'rV)rr order_comparisonsrIrJequality_comparisonsrXrMrrrYrZs    rtest_deepcopy_reflexive_dictz%TestCopy.test_deepcopy_reflexive_dicts%MM!#	3BiQ2	3&	8Bnb!Q7	8A

ah"Q#rczi}g}tj||}|j|t|d|yrg)rr ridrr2rr s    rtest_deepcopy_keepalivez TestCopy.test_deepcopy_keepalives7MM!T"

d2d8nQ'+rc&i}gd}tj||}|j|||jt|di}dg}tj||}|j|||jt|dy)N)rVrrrrd)rr rrYrqs    r!test_deepcopy_dont_memo_immutablez*TestCopy.test_deepcopy_dont_memo_immutablesMM!T"ATA&
HMM!T"ATA&rcGdd}|dg}tj|}|j|||j|j|jy)NceZdZdZdZy).TestCopy.test_deepcopy_inst_vanilla.<locals>.Cc||_yr
r&r(s  rr)z7TestCopy.test_deepcopy_inst_vanilla.<locals>.C.__init__r*rc4|j|jk(Sr
r&rs  rrz5TestCopy.test_deepcopy_inst_vanilla.<locals>.C.__eq__rrNrrCrrr-rxrrr-rrr rrMr'rs    rtest_deepcopy_inst_vanillaz#TestCopy.test_deepcopy_inst_vanillasO	-	-

rdGMM!A&rcGfdddg}tj|}|j|||j|||j|j|jy)Nc$eZdZdZfdZdZy)/TestCopy.test_deepcopy_inst_deepcopy.<locals>.Cc||_yr
r&r(s  rr)z8TestCopy.test_deepcopy_inst_deepcopy.<locals>.C.__init__r*rcPtj|j|Sr
)rr r'r1s  rr3z<TestCopy.test_deepcopy_inst_deepcopy.<locals>.C.__deepcopy__stxx677rc4|j|jk(Sr
r&rs  rrz6TestCopy.test_deepcopy_inst_deepcopy.<locals>.C.__eq__rrN)r0r1r2r)r3rr3srr-rs

8
-rr-rr{r6s   @rtest_deepcopy_inst_deepcopyz$TestCopy.test_deepcopy_inst_deepcopys`	-	-
rdGMM!AA&rcGdd}|dg}tj|}|j|||j|||j|j|jy)NceZdZdZdZdZy)2TestCopy.test_deepcopy_inst_getinitargs.<locals>.Cc||_yr
r&r(s  rr)z;TestCopy.test_deepcopy_inst_getinitargs.<locals>.C.__init__r*rc|jfSr
r&rs rrzBTestCopy.test_deepcopy_inst_getinitargs.<locals>.C.__getinitargs__rrc4|j|jk(Sr
r&rs  rrz9TestCopy.test_deepcopy_inst_getinitargs.<locals>.C.__eq__rrNrrCrrr-rrrr-rr{rs    rtest_deepcopy_inst_getinitargsz'TestCopy.test_deepcopy_inst_getinitargs_	-	-
rdGMM!AA&rcbGddt}|dg}tj|}|j|||j	|||j|||j	|j|j|j|j|jy)NceZdZdZdZdZy)1TestCopy.test_deepcopy_inst_getnewargs.<locals>.Cc>tj|}||_|Sr
rrs   rr=z9TestCopy.test_deepcopy_inst_getnewargs.<locals>.C.__new__rrc|jfSr
r&rs rrz@TestCopy.test_deepcopy_inst_getnewargs.<locals>.C.__getnewargs__rrc4|j|jk(Sr
r&rs  rrz8TestCopy.test_deepcopy_inst_getnewargs.<locals>.C.__eq__rrNrrCrrr-rrrr-rrrr rrrMr'rs    rtest_deepcopy_inst_getnewargsz&TestCopy.test_deepcopy_inst_getnewargss	-	-
rdGMM!a#AA&&rcdGddt}|dg}tj|}|j|||j	|||j|||j	|j|j|j|j|jy)NceZdZdZdZdZy)4TestCopy.test_deepcopy_inst_getnewargs_ex.<locals>.Cc>tj|}||_|Sr
rrs   rr=z<TestCopy.test_deepcopy_inst_getnewargs_ex.<locals>.C.__new__rrc"dd|jifSrr&rs rrzFTestCopy.test_deepcopy_inst_getnewargs_ex.<locals>.C.__getnewargs_ex__rrc4|j|jk(Sr
r&rs  rrz;TestCopy.test_deepcopy_inst_getnewargs_ex.<locals>.C.__eq__rrNrrCrrr-rrrr-rr&rrs    r test_deepcopy_inst_getnewargs_exz)TestCopy.test_deepcopy_inst_getnewargs_exs	-	-
2$KMM!a#AA&&rcGdd}|dg}tj|}|j|||j|||j|j|jy)NceZdZdZdZdZy)/TestCopy.test_deepcopy_inst_getstate.<locals>.Cc||_yr
r&r(s  rr)z8TestCopy.test_deepcopy_inst_getstate.<locals>.C.__init__r*rcd|jiSrr&rs rrz<TestCopy.test_deepcopy_inst_getstate.<locals>.C.__getstate__rrc4|j|jk(Sr
r&rs  rrz6TestCopy.test_deepcopy_inst_getstate.<locals>.C.__eq__rrNrrCrrr-rrrr-rr{rs    rtest_deepcopy_inst_getstatez$TestCopy.test_deepcopy_inst_getstaterrcGdd}|dg}tj|}|j|||j|||j|j|jy)NceZdZdZdZdZy)/TestCopy.test_deepcopy_inst_setstate.<locals>.Cc||_yr
r&r(s  rr)z8TestCopy.test_deepcopy_inst_setstate.<locals>.C.__init__r*rc|d|_yrr&rs  rr
z<TestCopy.test_deepcopy_inst_setstate.<locals>.C.__setstate__ rrc4|j|jk(Sr
r&rs  rrz6TestCopy.test_deepcopy_inst_setstate.<locals>.C.__eq__"rrNrrCrrr-rrrr-rr{rs    rtest_deepcopy_inst_setstatez$TestCopy.test_deepcopy_inst_setstaterrcGdd}|dg}tj|}|j|||j|||j|j|j|g}tj|}|j|||j|||j|j|jy)Nc$eZdZdZdZdZdZy)8TestCopy.test_deepcopy_inst_getstate_setstate.<locals>.Cc||_yr
r&r(s  rr)zATestCopy.test_deepcopy_inst_getstate_setstate.<locals>.C.__init__,r*rc|jSr
r&rs rrzETestCopy.test_deepcopy_inst_getstate_setstate.<locals>.C.__getstate__.rrc||_yr
r&rs  rr
zETestCopy.test_deepcopy_inst_getstate_setstate.<locals>.C.__setstate__0rrc4|j|jk(Sr
r&rs  rrz?TestCopy.test_deepcopy_inst_getstate_setstate.<locals>.C.__eq__2rrNrrCrrr-r+rrr-rr{rs    r$test_deepcopy_inst_getstate_setstatez-TestCopy.test_deepcopy_inst_getstate_setstate*s	-	-
rdGMM!AA&
bEMM!AA&rcGdd}|}||_tj|}|j|||j	|j|y)NceZdZy)0TestCopy.test_deepcopy_reflexive_inst.<locals>.CNrrCrrr-rArrr-)r'rr rMrrs    rtest_deepcopy_reflexive_instz%TestCopy.test_deepcopy_reflexive_inst@sJ		
CMM!A

aeeQrcGddt}|}tj|}|j||tj|}|j||y)NceZdZdZy)+TestCopy.test_reconstruct_string.<locals>.Ccy)NrWrCrs rrcz6TestCopy.test_reconstruct_string.<locals>.C.__reduce__MsrNrprCrrr-rLs
rr-)r4rrr rs    rtest_reconstruct_stringz TestCopy.test_reconstruct_stringKsN		
CIIaL

aMM!

arc0Gfddt}d|_tj|}|j|j|jtj
|}|j|j|jy)NceZdZfdZy),TestCopy.test_reconstruct_nostate.<locals>.CcdfSr^rCr,s rrcz7TestCopy.test_reconstruct_nostate.<locals>.C.__reduce__Ws2wrNrpr3srr-rVs
rr-r)r4r'rrr5r r6s   @rtest_reconstruct_nostatez!TestCopy.test_reconstruct_nostateUsf		
CIIaL

akk1;;/MM!

akk1;;/rc.Gfddt}dg|_tj|}|j||tj|}|j|||j|j|jy)NceZdZfdZdZy)*TestCopy.test_reconstruct_state.<locals>.Cc"d|jfSr^__dict__r,s rrcz5TestCopy.test_reconstruct_state.<locals>.C.__reduce__b2t}}--rc4|j|jk(Sr
rrs  rrz1TestCopy.test_reconstruct_state.<locals>.C.__eq__d}}66rNr0r1r2rcrr3srr-ras

.
7rr-rr4r'rrr rMr6s   @rtest_reconstruct_statezTestCopy.test_reconstruct_state`st	7	7

CIIaLAMM!A&rc.Gfddt}dg|_tj|}|j||tj|}|j|||j|j|jy)Nc$eZdZfdZdZdZy)3TestCopy.test_reconstruct_state_setstate.<locals>.Cc"d|jfSr^rr,s rrcz>TestCopy.test_reconstruct_state_setstate.<locals>.C.__reduce__prrc:|jj|yr
)rupdaters  rr
z@TestCopy.test_reconstruct_state_setstate.<locals>.C.__setstate__rs

$$U+rc4|j|jk(Sr
rrs  rrz:TestCopy.test_reconstruct_state_setstate.<locals>.C.__eq__trrN)r0r1r2rcr
rr3srr-ros
.
,
7rr-rrr6s   @rtest_reconstruct_state_setstatez(TestCopy.test_reconstruct_state_setstatenst	7	7
CIIaLAMM!A&rcGddt}|}||_tj|}|j	|||j|j|y)NceZdZy).TestCopy.test_reconstruct_reflexive.<locals>.CNrrCrrr-rrrr-)r4r'rr rMrrs    rtest_reconstruct_reflexivez#TestCopy.test_reconstruct_reflexive~sL		
CMM!A

aeeQrcGfddtddgdg}tj|}|j|||j|||j	|d|dtj
|}|j|||j|||j|d|dy)NceZdZfdZdZy)&TestCopy.test_reduce_4tuple.<locals>.Cc6d|jt|fSr^)riterr,s rrcz1TestCopy.test_reduce_4tuple.<locals>.C.__reduce__s2t}}d4j99rcft|t|k(xr|j|jk(Sr
)listrrs  rrz-TestCopy.test_reduce_4tuple.<locals>.C.__eq__,T
d5k18

79rNrr3srr-rs

:
9rr-rVrrr)rrrrMrr r6s   @rtest_reduce_4tuplezTestCopy.test_reduce_4tuples	9	9
1vqkNIIaLAA

adAaD!MM!AA1qt$rcGfddtdddgfdg}tj|}|j|||j|||j	|d|dtj
|}|j|||j|||j|d|dy)NceZdZfdZdZy)&TestCopy.test_reduce_5tuple.<locals>.CcBd|jd|jfSr^)ritemsr,s rrcz1TestCopy.test_reduce_5tuple.<locals>.C.__reduce__s2t}}dDJJLAArcft|t|k(xr|j|jk(Sr
)dictrrs  rrz-TestCopy.test_reduce_5tuple.<locals>.C.__eq__rrNrr3srr-rs
B
9rr-r'rVr)rr)rrrrMrr r6s   @rtest_reduce_5tuplezTestCopy.test_reduce_5tuples	9	9
1v
+,IIaLAA

ah%)MM!AA51U8,rc8fdGfdd}jt5tj|dddjt5tj|dddy#1swY=xYw#1swYyxYw)Nc(jdyr`ra)argskwargsrs  rstate_setterz1TestCopy.test_reduce_6tuple.<locals>.state_settersII+,rceZdZfdZy)&TestCopy.test_reduce_6tuple.<locals>.Cc(d|jddfSr^r)rr-rs rrcz1TestCopy.test_reduce_6tuple.<locals>.C.__reduce__s"dmmT4EErNrp)r-rsrr-rs	
Frr-rIrJrr )rrr-rs` @@rtest_reduce_6tuplezTestCopy.test_reduce_6tuples	-	F	F
C


y
)	IIaL	


y
)	MM!						sB%BB
Bc(Gfdd}|jt5tj|ddd|jt5tj|dddy#1swY=xYw#1swYyxYw)NceZdZfdZy)+TestCopy.test_reduce_6tuple_none.<locals>.Cc(d|jdddfSr^rr,s rrcz6TestCopy.test_reduce_6tuple_none.<locals>.C.__reduce__s"dmmT4==rNrpr3srr-rs
>rr-rrs  @rtest_reduce_6tuple_nonez TestCopy.test_reduce_6tuple_nonesx	>	>
C


y
)	IIaL	


y
)	MM!						sA<B<BBcGddt}|}dg|_tj|}|j|j|jy)NceZdZdgZy)#TestCopy.test_copy_slots.<locals>.Cr'Nr0r1r2	__slots__rCrrr-r	Irr-r)r4r'rrrs    rtest_copy_slotszTestCopy.test_copy_slotssA	 	 
CIIaL

aeeQUU#rcGddt}|}dg|_tj|}|j	|j|j|j|j|jy)NceZdZdgZy)'TestCopy.test_deepcopy_slots.<locals>.Cr'NrrCrrr-rrrr-r)r4r'rr rrMrs    rtest_deepcopy_slotszTestCopy.test_deepcopy_slotss\	 	 
CMM!&&rcpGddt}|ddi}tj|}|j|||j|j|j|j||d|d<|j
|||j
|j|jy)Nc*eZdZdfd	ZfdZxZS)/TestCopy.test_deepcopy_dict_subclass.<locals>.Cch|si}t|j|_t||yr
)rkeys_keyssuperr))rdr5s  rr)z8TestCopy.test_deepcopy_dict_subclass.<locals>.C.__init__s)A!!&&(^
 #rczt|||||jvr|jj|yyr
)r__setitem__rrY)rkeyitemr5s   rrz;TestCopy.test_deepcopy_dict_subclass.<locals>.C.__setitem__s5#C.djj(JJ%%c*)rr
)r0r1r2r)r
__classcell__)r5s@rr-rs
$

+
+rr-r'r)r	rVr)rrr rrrMassertNotEqualrs    rtest_deepcopy_dict_subclassz$TestCopy.test_deepcopy_dict_subclasss		+		+
q	NMM!A!''*A%Aq!AGGQWW-rcGddt}|ddgdg}ddg|_tj|}|jt|t||j|j|j|j	|d|d|j	|j|jy)	NceZdZy)+TestCopy.test_copy_list_subclass.<locals>.CNrrCrrr-rrrr-rVrrrtr)rr'rrrrs    rtest_copy_list_subclassz TestCopy.test_copy_list_subclasss		
1vqkNAIIaLa$q'*&

adAaD!

aeeQUU#rcGddt}|ddgdg}ddg|_tj|}|j	t|t||j	|j|j|j|d|d|j|j|jy)	NceZdZy)/TestCopy.test_deepcopy_list_subclass.<locals>.CNrrCrrr-rrrr-rVrrrtrr)rr'rr rrMrs    rtest_deepcopy_list_subclassz$TestCopy.test_deepcopy_list_subclasss		
1vqkNAMM!a$q'*&1qt$&rcGddt}|gd}|jt|dtj|}|jt|dy)NceZdZy),TestCopy.test_copy_tuple_subclass.<locals>.CNrrCrrr-rrrr-r)tuplerrrs    rtest_copy_tuple_subclassz!TestCopy.test_copy_tuple_subclasssL		
iLq9-IIaLq9-rc4Gddt}|ddgdg}|jt|ddgdftj|}|jt|ddgdf|j	|||j	|d|dy)NceZdZy)0TestCopy.test_deepcopy_tuple_subclass.<locals>.CNrrCrrr-r!rrr-rVrrr)rrrr rMrs    rtest_deepcopy_tuple_subclassz%TestCopy.test_deepcopy_tuple_subclasss		
1vqkNqQFA;/MM!qQFA;/A1qt$rcvGddt}|jttj|y)NceZdZdZy)-TestCopy.test_getstate_exc.<locals>.EvilStatectd)Nzain't got no stickin' state)
ValueErrorrs rrz:TestCopy.test_getstate_exc.<locals>.EvilState.__getstate__s !>??rN)r0r1r2rrCrr	EvilStater%s
@rr()r4rIr'r)rr(s  rtest_getstate_exczTestCopy.test_getstate_excs*	@	@	
*dii=rc|jtjttd}|jtj||d}|jtj||y)Nc||zSr
rCrr s  rr'z(TestCopy.test_copy_function.<locals>.foo
aczrcyr
rCrCrr<lambda>z-TestCopy.test_copy_function.<locals>.<lambda>r)rr
global_foorr'rs   rtest_copy_functionzTestCopy.test_copy_functionsS:.
;!3-3-rc|jtjttd}|jtj||d}|jtj||y)Nc||zSr
rCr,s  rr'z,TestCopy.test_deepcopy_function.<locals>.foor-rcyr
rCrCrrr/z1TestCopy.test_deepcopy_function.<locals>.<lambda>r0r)rrr r1r2s   rtest_deepcopy_functionzTestCopy.test_deepcopy_functionsUz2J?!s+S1s+S1rcGddt}|}tj|}||}|j||~||}|j||y)NceZdZy)"TestCopy._check_weakref.<locals>.CNrrCrrr-r:#rrr-)r4weakrefrefr)r_copyr-r@rr s      r_check_weakrefzTestCopy._check_weakref"sT		cKK!H

a!H

arcB|jtjyr
)r>rrs rtest_copy_weakrefzTestCopy.test_copy_weakref-sDII&rcB|jtjyr
)r>rr rs rtest_deepcopy_weakrefzTestCopy.test_deepcopy_weakref0sDMM*rc<Gddt}tdDcgc]	}|c}\}}}}|}|||<|||<tj|}	|j|	||j	|	||j	|	|||j	|	|||j	t|	d~~t
j|j	t|	d||}}
||	|
<|j|
|ycc}w)NceZdZy)(TestCopy._check_copy_weakdict.<locals>.CNrrCrrr-rE4rrr-rtrrV)	r4rrrMrrYr	
gc_collectassertNotIn)r	_dicttyper-iabr\r	uvrr s            r_check_copy_weakdictzTestCopy._check_copy_weakdict3s		#(8,aac,
1aK!!IIaLAA1q!1q!Q#
qQ#sAC1!A!-sDcB|jtjyr
)rNr;WeakKeyDictionaryrs rtest_copy_weakkeydictzTestCopy.test_copy_weakkeydictHs!!'";";<rcB|jtjyr
)rNr;WeakValueDictionaryrs rtest_copy_weakvaluedictz TestCopy.test_copy_weakvaluedictKs!!'"="=>rcGddt}tdDcgc]
}||c}\}}}}tj}|||<|||<t	j
|}|j
|||jt|d|j||||j||||j||j|j|j||j|j~tj|jt|dycc}w)NceZdZdZy)-TestCopy.test_deepcopy_weakkeydict.<locals>.Cc||_yr
rIrrIs  rr)z6TestCopy.test_deepcopy_weakkeydict.<locals>.C.__init__P	rNr0r1r2r)rCrrr-rWO
rr-rtrrV)
r4rr;rPrr rrrYrMrIr	rF)	rr-rIrJrKr\r	rLrMs	         rtest_deepcopy_weakkeydictz"TestCopy.test_deepcopy_weakkeydictNs
		%*!H-qad-
1a%%'!!MM!Aq!Q#1q!1q!1%1%
Q#.sEcGddt}tdDcgc]
}||c}\}}}}tj}|||<|||<t	j
|}|j
|||jt|dt|jd\\}	}
\}}|j|	||j|	j|j|j|
||j|||j|j|j|j||~	~
~~~tj|jt|dycc}w)NceZdZdZy)/TestCopy.test_deepcopy_weakvaluedict.<locals>.Cc||_yr
rYrZs  rr)z8TestCopy.test_deepcopy_weakvaluedict.<locals>.C.__init__dr[rNr\rCrrr-racr]rr-rtrc |djSrgrY)pairs rr/z6TestCopy.test_deepcopy_weakvaluedict.<locals>.<lambda>nsDGIIr)rrV)r4rr;rSrr rrrYsortedrrMrIrr	rF)
rr-rIrJrKr\r	rLrMrr zts
             rtest_deepcopy_weakvaluedictz$TestCopy.test_deepcopy_weakvaluedictbs>		%*!H-qad-
1a'')!!MM!Aq!Q#	/EFAAAacc"

aAacc"

a
q!Q
Q#%.sFc4Gddt}|}|j|_tj|}|j|j|j|j
|jj||jy)NceZdZdZy)0TestCopy.test_deepcopy_bound_method.<locals>.Foocyr
rCrs rmz2TestCopy.test_deepcopy_bound_method.<locals>.Foo.m|srN)r0r1r2rmrCrrFoork{s
rrn)r4rmrKrr rr__self__)rrnrgs    rtest_deepcopy_bound_methodz#TestCopy.test_deepcopy_bound_methodzsg	&	
EccMM!acc"

accllA&	rN)Qr0r1r2rr!r7rPrjrrrrrrrrrrrrrrrrrrr!r$r+r4r:rArFrKrPrTr\r`rbrerhrjrnrrrur|rrrrrrrrrrrrrrrrrrrrrrrr"r)r3r7r>r@rBrNrQrTr^rhrqrCrrrrs;
	'' !	!4
+''*	*	*'"'"	*	**$
	"	.	'' !	!8	/%$
%
"-
$,
'	''''$'$''', 	0''  %"-"
$'.(	$	'.%>.2	'+*=?$($0	rrc||zSr
rCr,s  rr1r1s
QqSjr__main__)__doc__rrKr;roperatorrrrrrrunittesttestr	rlrmrWTestCaserr1r0mainrCrr<module>rzsu%
++BN2v"66s
x  s
l!zHMMOr