python (3.11.7)

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

ejdZddlZddlZddlZddlZddlmZmZmZm	Z	m
Z
mZddlZddl
mZeeee	fZe
efZeezZGddejZdZedkrejdSdS)	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@ZBdAZCdBZDdCZEdDZFdEZGdFZHdGZIdHZJdIZKdJZLdKZMdLZNdMZOdNZPdOS)PTestCopyc|tjtj|ttjtdSN)assertIscopyErrorerror
assertTrue
issubclass	Exceptionselfs B/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/test/test_copy.pytest_exceptionszTestCopy.test_exceptionss>

dj$*---
4:y99:::::c^d}tj|}|||dSN*)rassertEqualrxys   rtest_copy_basiczTestCopy.test_copy_basics0IaLLArcGfddtd}tj|}||j|j||j|jdS)Nc eZdZdZfdZdS)"TestCopy.test_copy_copy.<locals>.Cc||_dSr
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__#q{{"rN)__name__
__module____qualname__r)r.r-srr-r$ s=



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

AbEEIaLLak222&&&&&rcGddtfd}d}|ttj|t	j|tj|}||||t|||j	|j	dS)NceZdZdZdS)&TestCopy.test_copy_registry.<locals>.CcHt|}||_|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								
	#	#	#	#	#
AbEE)TY222q(A&&&IaLLAa!$$$&&&&&rcGfddt}g|}tj|}||||dgdS)Nc eZdZfdZdZdS)'TestCopy.test_copy_reduce_ex.<locals>.Cc2ddSNappendrprotocs  r
__reduce_ex__z5TestCopy.test_copy_reduce_ex.<locals>.C.__reduce_ex__<rrc0|ddSNzshouldn't call thisfailrs r
__reduce__z2TestCopy.test_copy_reduce_ex.<locals>.C.__reduce__?		/00000rNr0r1r2r]rcr\srr-rS;=





1
1
1
1
1rr-rVr4rrrrr-rr r\s    @rtest_copy_reduce_exzTestCopy.test_copy_reduce_ex:s	1	1	1	1	1	1	1	1	1	1

ACCIaLL

aQC     rcGfddt}g|}tj|}||||dgdS)NceZdZfdZdS)$TestCopy.test_copy_reduce.<locals>.Cc2ddSrUrXrr\s rrcz/TestCopy.test_copy_reduce.<locals>.C.__reduce__Ir^rNr0r1r2rcrfsrr-rmH.






rr-rVrhris    @rtest_copy_reducezTestCopy.test_copy_reduceGs										

ACCIaLL

aQC     rcGddt}|}|tjtj|dS)NceZdZdZdS)"TestCopy.test_copy_cant.<locals>.Cc|drt|t||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_cantRs[	;	;	;	;	;	;	;	;

ACC$*di33333rcGdd}Gddt}d}Gddtj}dd	td
ddzd
ddddd|jdtt
dt
dtddd||t|tg}|D]*}|
tj||+dS)NceZdZdS)*TestCopy.test_copy_atomic.<locals>.ClassicNr0r1r2rCrrClassicr^DrrceZdZdS)+TestCopy.test_copy_atomic.<locals>.NewStyleNrrCrrNewStyler`rrrcdSr
rCrCrrfz$TestCopy.test_copy_atomic.<locals>.fbDrceZdZdS)0TestCopy.test_copy_atomic.<locals>.WithMetaclassNrrCrr
WithMetaclassrdrrr	metaclass.rdQ	@TF?hellohelloሴsworld
rV)r4abcABCMetaNotImplemented__code__bytesrangeslicemaxpropertyrr)rrrrrtestsrs       rtest_copy_atomiczTestCopy.test_copy_atomic]s-													v											ck				sNQVT4-5s,,eBiiq"a7C

	D
	+	+AMM$)A,,****	+	+rcgd}tj|}||||||g}tj|}||||||dS)NrVrrrrMrs   rtest_copy_listzTestCopy.test_copy_listnsIIIaLLAAIaLLAArc
d}|tj||d}|tj||dddgf}|tj||dS)NrrCrVrr)rrrrs  rtest_copy_tuplezTestCopy.test_copy_tuplexss

dillA&&&

dillA&&&
1bM

dillA&&&&&rcddd}tj|}||||||i}tj|}||||||dS)NrVrr'barrrs   rtest_copy_dictzTestCopy.test_copy_dictsa  IaLLAAIaLLAArc*hd}tj|}||||||t}tj|}||||||dSN>rVrr)rrrMsetrs   r
test_copy_setzTestCopy.test_copy_setsIIIaLLAAEEIaLLAArcthd}|tj||t}|tj||dSr)	frozensetrrrs  rtest_copy_frozensetzTestCopy.test_copy_frozensetsZiii  

dillA&&&KK

dillA&&&&&rc@td}tj|}||||||t}tj|}||||||dS)Nsabc)	bytearrayrrrMrs   rtest_copy_bytearrayzTestCopy.test_copy_bytearraysfIaLLAAKKIaLLAArcGdd}|d}|tj||dS)NceZdZdZdZdS)*TestCopy.test_copy_inst_vanilla.<locals>.Cc||_dSr
r&r(s  rr)z3TestCopy.test_copy_inst_vanilla.<locals>.C.__init__r*rc"|j|jkSr
r&rothers  r__eq__z1TestCopy.test_copy_inst_vanilla.<locals>.C.__eq__x59,,rNr0r1r2r)rrCrrr-r2



-
-
-
-
-rr-rrrrs   rtest_copy_inst_vanillazTestCopy.test_copy_inst_vanillas]	-	-	-	-	-	-	-	-

AbEE1q)))))rcGfddd}|tj||dS)Nc&eZdZdZfdZdZdS)'TestCopy.test_copy_inst_copy.<locals>.Cc||_dSr
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/rc"|j|jkSr
r&rs  rrz.TestCopy.test_copy_inst_copy.<locals>.C.__eq__rrN)r0r1r2r)r.rr3srr-rsL



#
#
#
#
#
-
-
-
-
-rr-rrrrr-s  @rtest_copy_inst_copyzTestCopy.test_copy_inst_copysh	-	-	-	-	-	-	-	-	-	-
AbEE1q)))))rcGdd}|d}|tj||dS)Nc eZdZdZdZdZdS).TestCopy.test_copy_inst_getinitargs.<locals>.Cc||_dSr
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__{"rc"|j|jkSr
r&rs  rrz5TestCopy.test_copy_inst_getinitargs.<locals>.C.__eq__rrNr0r1r2r)rrrCrrr-rA



#
#
#
-
-
-
-
-rr-rrrs   rtest_copy_inst_getinitargsz#TestCopy.test_copy_inst_getinitargs]	-	-	-	-	-	-	-	-
AbEE1q)))))rc.Gddt}|d}tj|}|||||||||||j|jdS)Nc eZdZdZdZdZdS)-TestCopy.test_copy_inst_getnewargs.<locals>.CcHt|}||_|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__xy rc"|j|jkSr
r&rs  rrz4TestCopy.test_copy_inst_getnewargs.<locals>.C.__eq__rrNr0r1r2r=rrrCrrr-rA



!
!
!
-
-
-
-
-rr-rrrassertIsInstancerrMr'rr-rr s    rtest_copy_inst_getnewargsz"TestCopy.test_copy_inst_getnewargss	-	-	-	-	-	-	-	-
AbEEIaLLa###AA&&&&&rc0Gddt}|d}tj|}|||||||||||j|jdS)Nc eZdZdZdZdZdS)0TestCopy.test_copy_inst_getnewargs_ex.<locals>.CcHt|}||_|Sr
rrs   rr=z8TestCopy.test_copy_inst_getnewargs_ex.<locals>.C.__new__rrcdd|jifSNrCr'r&rs r__getnewargs_ex__zBTestCopy.test_copy_inst_getnewargs_ex.<locals>.C.__getnewargs_ex__E48,,,rc"|j|jkSr
r&rs  rrz7TestCopy.test_copy_inst_getnewargs_ex.<locals>.C.__eq__rrNr0r1r2r=rrrCrrr-rA



-
-
-
-
-
-
-
-rr-rr&rrs    rtest_copy_inst_getnewargs_exz%TestCopy.test_copy_inst_getnewargs_exs	-	-	-	-	-	-	-	-
A"IIIIaLLa###AA&&&&&rcGdd}|d}|tj||dS)Nc eZdZdZdZdZdS)+TestCopy.test_copy_inst_getstate.<locals>.Cc||_dSr
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__tx((rc"|j|jkSr
r&rs  rrz2TestCopy.test_copy_inst_getstate.<locals>.C.__eq__rrNr0r1r2r)rrrCrrr-rA



)
)
)
-
-
-
-
-rr-rrrs   rtest_copy_inst_getstatez TestCopy.test_copy_inst_getstaterrcGdd}|d}|tj||dS)Nc eZdZdZdZdZdS)+TestCopy.test_copy_inst_setstate.<locals>.Cc||_dSr
r&r(s  rr)z4TestCopy.test_copy_inst_setstate.<locals>.C.__init__r*rc |d|_dSrr&rstates  r__setstate__z8TestCopy.test_copy_inst_setstate.<locals>.C.__setstate__ <rc"|j|jkSr
r&rs  rrz2TestCopy.test_copy_inst_setstate.<locals>.C.__eq__rrNr0r1r2r)rrrCrrr-rA



(
(
(
-
-
-
-
-rr-rrrs   rtest_copy_inst_setstatez TestCopy.test_copy_inst_setstaterrcGdd}|d}|tj|||d}|tj||dS)Nc&eZdZdZdZdZdZdS)4TestCopy.test_copy_inst_getstate_setstate.<locals>.Cc||_dSr
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__	xrc||_dSr
r&rs  rrzATestCopy.test_copy_inst_getstate_setstate.<locals>.C.__setstate__
 rc"|j|jkSr
r&rs  rrz;TestCopy.test_copy_inst_getstate_setstate.<locals>.C.__eq__rrNr0r1r2r)rrrrCrrr-rP



 
 
 
!
!
!
-
-
-
-
-rr-rgrrs   r test_copy_inst_getstate_setstatez)TestCopy.test_copy_inst_getstate_setstates	-	-	-	-	-	-	-	-
AbEE1q)))
AcFF1q)))))rc^d}tj|}|||dSr)rdeepcopyrrs   rtest_deepcopy_basiczTestCopy.test_deepcopy_basic
s2M!Arcg}||g}tj|}||||||||d|d||d|ddSNrrV)rr#rrMrrs   rtest_deepcopy_memozTestCopy.test_deepcopy_memos

FM!AA1qt$$$

adAaD!!!!!rcGddt}Gdd|}|tj||dS)NceZdZdS)/TestCopy.test_deepcopy_issubclass.<locals>.MetaNrrCrrMetar*"rrr+ceZdZdS),TestCopy.test_deepcopy_issubclass.<locals>.CNrrCrrr-r-$rrr-r)rNrrr#)rr+r-s   rtest_deepcopy_issubclassz!TestCopy.test_deepcopy_issubclasss
					4								$				q))1-----rcGfddtd}tj|}||j|j||j|jdS)Nc"eZdZdZdfd	ZdS)*TestCopy.test_deepcopy_deepcopy.<locals>.Cc||_dSr
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)r6r3srr-r1)sB



#
#
#
#
#
#
#
#rr-r)r4rr#rr5r'r6s   @rtest_deepcopy_deepcopyzTestCopy.test_deepcopy_deepcopy(s	#	#	#	#	#	#	#	#	#	#

AbEEM!ak222&&&&&rcGddtfd}d}|ttj|tj|tj|}||||t|||j
|j
dS)NceZdZdZdS)*TestCopy.test_deepcopy_registry.<locals>.CcHt|}||_|Sr
r<r>s   rr=z2TestCopy.test_deepcopy_registry.<locals>.C.__new__5rArNrBrCrrr-r:4rDrr-c|jffSr
r&rFs rrGz1TestCopy.test_deepcopy_registry.<locals>.pickle_C9rHrr)r4rIrJrr#rKrLrMrrNr'rOs    @rtest_deepcopy_registryzTestCopy.test_deepcopy_registry3s								
	#	#	#	#	#
AbEE)T]A666q(A&&&M!Aa!$$$&&&&&rcGfddt}g|}tj|}||||dgdS)Nc eZdZfdZdZdS)+TestCopy.test_deepcopy_reduce_ex.<locals>.Cc2ddSrUrXrZs  rr]z9TestCopy.test_deepcopy_reduce_ex.<locals>.C.__reduce_ex__Er^rc0|ddSr`rars rrcz6TestCopy.test_deepcopy_reduce_ex.<locals>.C.__reduce__HrdrNrerfsrr-r@Drgrr-rVr4rr#rrris    @rtest_deepcopy_reduce_exz TestCopy.test_deepcopy_reduce_exCs	1	1	1	1	1	1	1	1	1	1

ACCM!

aQC     rcGfddt}g|}tj|}||||dgdS)NceZdZfdZdS)(TestCopy.test_deepcopy_reduce.<locals>.Cc2ddSrUrXros rrcz3TestCopy.test_deepcopy_reduce.<locals>.C.__reduce__Rr^rNrprfsrr-rGQrqrr-rVrCris    @rtest_deepcopy_reducezTestCopy.test_deepcopy_reducePs										

ACCM!

aQC     rcGddt}|}|tjtj|dS)NceZdZdZdS)&TestCopy.test_deepcopy_cant.<locals>.Cc|drt|t||Srwryr}s  rr|z7TestCopy.test_deepcopy_cant.<locals>.C.__getattribute__]rrNrrCrrr-rL\rrr-)r4rIrrr#rs   rtest_deepcopy_cantzTestCopy.test_deepcopy_cant[s[	;	;	;	;	;	;	;	;

ACC$*dmQ77777rc$Gdd}Gddt}d}ddtddd	zd
ddd
ddd|j|td|ttg}|D]*}|tj||+dS)NceZdZdS).TestCopy.test_deepcopy_atomic.<locals>.ClassicNrrCrrrrQgrrrceZdZdS)/TestCopy.test_deepcopy_atomic.<locals>.NewStyleNrrCrrrrSirrrcdSr
rCrCrrrz(TestCopy.test_deepcopy_atomic.<locals>.fkrr.rrrrTFrsbytesrrr)	r4rrrrrrrr#)rrrrrrs      rtest_deepcopy_atomiczTestCopy.test_deepcopy_atomicfs													v						sNB3dE27M1:599gsHJJ@	/	/AMM$-**A....	/	/rcddgdg}tj|}||||||||d|ddSNrVrrrrr#rrMrs   rtest_deepcopy_listzTestCopy.test_deepcopy_listsnVQKM!AA1qt$$$$$rcTg}||tj|}tD]}|t
||| |||||d||t|ddSr&)
rYrr#comparisonsrIRecursionErrorrMrrlenrrr ops    rtest_deepcopy_reflexive_listz%TestCopy.test_deepcopy_reflexive_listzs	M!	8	8Bnb!Q7777A

adAQ#####rc^d}tj|}|||dSNrCrr#rrs   rtest_deepcopy_empty_tuplez"TestCopy.test_deepcopy_empty_tuples0M!

arcddgdf}tj|}||||||||d|ddSrWrXrs   rtest_deepcopy_tuplezTestCopy.test_deepcopy_tuplerZrc^d}tj|}|||dS)N)rVrrrdrs   r!test_deepcopy_tuple_of_immutablesz*TestCopy.test_deepcopy_tuple_of_immutabless0M!

arclgf}|d|tj|}tD]}|t
||| |||||d|d||dd|dSNr)rYrr#r\rIr]rMrr_s    rtest_deepcopy_reflexive_tuplez&TestCopy.test_deepcopy_reflexive_tuples
E	!AM!	8	8Bnb!Q7777A1qt$$$

ad1gq!!!!!rcddgdd}tj|}||||||||d|ddS)NrVrrrr'rXrs   rtest_deepcopy_dictzTestCopy.test_deepcopy_dictsrF1%%M!AA51U8,,,,,rci}||d<tj|}tD]}|t||| t
D]}|t||| |||||d||	t|ddS)Nr'rV)rr#order_comparisonsrIrJequality_comparisonsr]rMrrr^r_s    rtest_deepcopy_reflexive_dictz%TestCopy.test_deepcopy_reflexive_dicts%M!#	3	3BiQ2222&	8	8Bnb!Q7777A

ah"""Q#####rci}g}tj||}||t|d|dSrl)rr#ridrr5rr s    rtest_deepcopy_keepalivez TestCopy.test_deepcopy_keepalivesFM!T""

d2d88nQ'+++++rcTi}gd}tj||}||||t|di}dg}tj||}||||t|ddS)N)rVrrrri)rr#rr^rvs    r!test_deepcopy_dont_memo_immutablez*TestCopy.test_deepcopy_dont_memo_immutablesLLM!T""ATA&&&
HM!T""ATA&&&&&rcGdd}|dg}tj|}|||||j|jdS)NceZdZdZdZdS).TestCopy.test_deepcopy_inst_vanilla.<locals>.Cc||_dSr
r&r(s  rr)z7TestCopy.test_deepcopy_inst_vanilla.<locals>.C.__init__r*rc"|j|jkSr
r&rs  rrz5TestCopy.test_deepcopy_inst_vanilla.<locals>.C.__eq__rrNrrCrrr-r}rrr-rrr#rrMr'rs    rtest_deepcopy_inst_vanillaz#TestCopy.test_deepcopy_inst_vanillas	-	-	-	-	-	-	-	-

ArdGGM!A&&&&&rcGfdddg}tj|}||||||||j|jdS)Nc&eZdZdZfdZdZdS)/TestCopy.test_deepcopy_inst_deepcopy.<locals>.Cc||_dSr
r&r(s  rr)z8TestCopy.test_deepcopy_inst_deepcopy.<locals>.C.__init__r*rcJtj|j|Sr
)rr#r'r4s  rr6z<TestCopy.test_deepcopy_inst_deepcopy.<locals>.C.__deepcopy__s!qtx66777rc"|j|jkSr
r&rs  rrz6TestCopy.test_deepcopy_inst_deepcopy.<locals>.C.__eq__rrN)r0r1r2r)r6rr3srr-rsL



8
8
8
8
8
-
-
-
-
-rr-rrr6s   @rtest_deepcopy_inst_deepcopyz$TestCopy.test_deepcopy_inst_deepcopys	-	-	-	-	-	-	-	-	-	-
ArdGGM!AA&&&&&rcGdd}|dg}tj|}||||||||j|jdS)Nc eZdZdZdZdZdS)2TestCopy.test_deepcopy_inst_getinitargs.<locals>.Cc||_dSr
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__rrc"|j|jkSr
r&rs  rrz9TestCopy.test_deepcopy_inst_getinitargs.<locals>.C.__eq__rrNrrCrrr-rrrr-rrrs    rtest_deepcopy_inst_getinitargsz'TestCopy.test_deepcopy_inst_getinitargs	-	-	-	-	-	-	-	-
ArdGGM!AA&&&&&rcpGddt}|dg}tj|}|||||||||||j|j||j|jdS)Nc eZdZdZdZdZdS)1TestCopy.test_deepcopy_inst_getnewargs.<locals>.CcHt|}||_|Sr
rrs   rr=z9TestCopy.test_deepcopy_inst_getnewargs.<locals>.C.__new__rrc|jfSr
r&rs rrz@TestCopy.test_deepcopy_inst_getnewargs.<locals>.C.__getnewargs__rrc"|j|jkSr
r&rs  rrz8TestCopy.test_deepcopy_inst_getnewargs.<locals>.C.__eq__rrNrrCrrr-rrrr-rrrr#rrrMr'rs    rtest_deepcopy_inst_getnewargsz&TestCopy.test_deepcopy_inst_getnewargss	-	-	-	-	-	-	-	-
ArdGGM!a###AA&&&&&&&&rcrGddt}|dg}tj|}|||||||||||j|j||j|jdS)Nc eZdZdZdZdZdS)4TestCopy.test_deepcopy_inst_getnewargs_ex.<locals>.CcHt|}||_|Sr
rrs   rr=z<TestCopy.test_deepcopy_inst_getnewargs_ex.<locals>.C.__new__rrcdd|jifSrr&rs rrzFTestCopy.test_deepcopy_inst_getnewargs_ex.<locals>.C.__getnewargs_ex__rrc"|j|jkSr
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	-	-	-	-	-	-	-	-
A2$KKKM!a###AA&&&&&&&&rcGdd}|dg}tj|}||||||||j|jdS)Nc eZdZdZdZdZdS)/TestCopy.test_deepcopy_inst_getstate.<locals>.Cc||_dSr
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__rrc"|j|jkSr
r&rs  rrz6TestCopy.test_deepcopy_inst_getstate.<locals>.C.__eq__rrNrrCrrr-rrrr-rrrs    rtest_deepcopy_inst_getstatez$TestCopy.test_deepcopy_inst_getstaterrcGdd}|dg}tj|}||||||||j|jdS)Nc eZdZdZdZdZdS)/TestCopy.test_deepcopy_inst_setstate.<locals>.Cc||_dSr
r&r(s  rr)z8TestCopy.test_deepcopy_inst_setstate.<locals>.C.__init__"r*rc |d|_dSrr&rs  rrz<TestCopy.test_deepcopy_inst_setstate.<locals>.C.__setstate__$rrc"|j|jkSr
r&rs  rrz6TestCopy.test_deepcopy_inst_setstate.<locals>.C.__eq__&rrNrrCrrr-r!rrr-rrrs    rtest_deepcopy_inst_setstatez$TestCopy.test_deepcopy_inst_setstate rrcGdd}|dg}tj|}||||||||j|j|g}tj|}||||||||j|jdS)Nc&eZdZdZdZdZdZdS)8TestCopy.test_deepcopy_inst_getstate_setstate.<locals>.Cc||_dSr
r&r(s  rr)zATestCopy.test_deepcopy_inst_getstate_setstate.<locals>.C.__init__0r*rc|jSr
r&rs rrzETestCopy.test_deepcopy_inst_getstate_setstate.<locals>.C.__getstate__2rrc||_dSr
r&rs  rrzETestCopy.test_deepcopy_inst_getstate_setstate.<locals>.C.__setstate__4rrc"|j|jkSr
r&rs  rrz?TestCopy.test_deepcopy_inst_getstate_setstate.<locals>.C.__eq__6rrNrrCrrr-r/r rr-rrrs    r$test_deepcopy_inst_getstate_setstatez-TestCopy.test_deepcopy_inst_getstate_setstate.s	-	-	-	-	-	-	-	-
ArdGGM!AA&&&
AbEEM!AA&&&&&rcGdd}|}||_tj|}|||||j|dS)NceZdZdS)0TestCopy.test_deepcopy_reflexive_inst.<locals>.CNrrCrrr-rErrr-)r'rr#rMrrs    rtest_deepcopy_reflexive_instz%TestCopy.test_deepcopy_reflexive_instDs}								
ACCM!A

aeQrcGddt}|}tj|}|||tj|}|||dS)NceZdZdZdS)+TestCopy.test_reconstruct_string.<locals>.CcdS)NrWrCrs rrcz6TestCopy.test_reconstruct_string.<locals>.C.__reduce__QsrrNrprCrrr-rPs#




rr-)r4rrr#rs    rtest_reconstruct_stringz TestCopy.test_reconstruct_stringOs								
ACCIaLL

aM!

arc$Gfddt}d|_tj|}||j|jtj|}||j|jdS)NceZdZfdZdS),TestCopy.test_reconstruct_nostate.<locals>.CcdfSrcrCr,s rrcz7TestCopy.test_reconstruct_nostate.<locals>.C.__reduce__[s2wrNrpr3srr-rZs.






rr-r)r4r'rrr5r#r6s   @rtest_reconstruct_nostatez!TestCopy.test_reconstruct_nostateYs										
ACCIaLL

ak1;///M!

ak1;/////rc>Gfddt}dg|_tj|}|||tj|}|||||j|jdS)Nc eZdZfdZdZdS)*TestCopy.test_reconstruct_state.<locals>.Ccd|jfSrc__dict__r,s rrcz5TestCopy.test_reconstruct_state.<locals>.C.__reduce__f2t}--rc"|j|jkSr
rrs  rrz1TestCopy.test_reconstruct_state.<locals>.C.__eq__h}66rNr0r1r2rcrr3srr-res=
.
.
.
.
.
7
7
7
7
7rr-rr4r'rrr#rMr6s   @rtest_reconstruct_statezTestCopy.test_reconstruct_stateds	7	7	7	7	7	7	7	7	7	7

ACCIaLLAM!A&&&&&rc>Gfddt}dg|_tj|}|||tj|}|||||j|jdS)Nc&eZdZfdZdZdZdS)3TestCopy.test_reconstruct_state_setstate.<locals>.Ccd|jfSrcrr,s rrcz>TestCopy.test_reconstruct_state_setstate.<locals>.C.__reduce__trrc:|j|dSr
)rupdaters  rrz@TestCopy.test_reconstruct_state_setstate.<locals>.C.__setstate__vs
$$U+++++rc"|j|jkSr
rrs  rrz:TestCopy.test_reconstruct_state_setstate.<locals>.C.__eq__xrrN)r0r1r2rcrrr3srr-rssL
.
.
.
.
.
,
,
,
7
7
7
7
7rr-rrr6s   @rtest_reconstruct_state_setstatez(TestCopy.test_reconstruct_state_setstaters	7	7	7	7	7	7	7	7	7	7
ACCIaLLAM!A&&&&&rcGddt}|}||_tj|}|||||j|dS)NceZdZdS).TestCopy.test_reconstruct_reflexive.<locals>.CNrrCrrr-rrrr-)r4r'rr#rMrrs    rtest_reconstruct_reflexivez#TestCopy.test_reconstruct_reflexives								
ACCM!A

aeQrcGfddtddgdg}tj|}||||||||d|dtj|}||||||||d|ddS)Nc eZdZfdZdZdS)&TestCopy.test_reduce_4tuple.<locals>.Cc4d|jt|fSrc)riterr,s rrcz1TestCopy.test_reduce_4tuple.<locals>.C.__reduce__s2t}d4jj99rcbt|t|ko|j|jkSr
)listrrs  rrz-TestCopy.test_reduce_4tuple.<locals>.C.__eq__,T

d5kk18
79rNrr3srr-rs=
:
:
:
:
:
9
9
9
9
9rr-rVrrr)rrrrMrr#r6s   @rtest_reduce_4tuplezTestCopy.test_reduce_4tuples	9	9	9	9	9	9	9	9	9	9
A1vqkNNIaLLAA

adAaD!!!M!AA1qt$$$$$rcGfddtdddgfdg}tj|}||||||||d|dtj|}||||||||d|ddS)Nc eZdZfdZdZdS)&TestCopy.test_reduce_5tuple.<locals>.Cc@d|jd|fSrc)ritemsr,s rrcz1TestCopy.test_reduce_5tuple.<locals>.C.__reduce__s2t}dDJJLLAArcbt|t|ko|j|jkSr
)dictrrs  rrz-TestCopy.test_reduce_5tuple.<locals>.C.__eq__rrNrr3srr-rsB
B
B
B
B
B
9
9
9
9
9rr-r'rVr)rr)rrrrMrr#r6s   @rtest_reduce_5tuplezTestCopy.test_reduce_5tuples		9	9	9	9	9	9	9	9	9	9
A1v
+,,IaLLAA

ah%)))M!AA51U8,,,,,rcdfdGfdd}t5tj|dddn#1swxYwYt5tj|ddddS#1swxYwYdS)Nc2ddSr`ra)argskwargsrs  rstate_setterz1TestCopy.test_reduce_6tuple.<locals>.state_settersII+,,,,,rceZdZfdZdS)&TestCopy.test_reduce_6tuple.<locals>.Ccd|jddfSrcr)rr-rs rrcz1TestCopy.test_reduce_6tuple.<locals>.C.__reduce__s"dmT4EErNrp)r-rsrr-rs;
F
F
F
F
F
F
F
Frr-rIrJrr#)rrr-rs` @@rtest_reduce_6tuplezTestCopy.test_reduce_6tuplesk	-	-	-	-	-	F	F	F	F	F	F	F	F	F	F	F
ACC


y
)
)		IaLLL															


y
)
)		M!																		s#AA"%A"B%%B),B)cTGfdd}|t5tj|dddn#1swxYwY|t5tj|ddddS#1swxYwYdS)NceZdZfdZdS)+TestCopy.test_reduce_6tuple_none.<locals>.Ccd|jdddfSrcrr,s rrcz6TestCopy.test_reduce_6tuple_none.<locals>.C.__reduce__s"dmT4==rNrpr3srr-rs.
>
>
>
>
>
>
>rr-rrs  @rtest_reduce_6tuple_nonez TestCopy.test_reduce_6tuple_nones@	>	>	>	>	>	>	>	>	>	>
ACC


y
)
)		IaLLL															


y
)
)		M!																		s#AAA;BB!$B!cGddt}|}dg|_tj|}||j|jdS)NceZdZdgZdS)#TestCopy.test_copy_slots.<locals>.Cr'Nr0r1r2	__slots__rCrrr-rIIIrr-r)r4r'rrrs    rtest_copy_slotszTestCopy.test_copy_slotssk	 	 	 	 	 	 	 	 
ACCIaLL

aeQU#####rcGddt}|}dg|_tj|}||j|j||j|jdS)NceZdZdgZdS)'TestCopy.test_deepcopy_slots.<locals>.Cr'NrrCrrr-rrrr-r)r4r'rr#rrMrs    rtest_deepcopy_slotszTestCopy.test_deepcopy_slotss	 	 	 	 	 	 	 	 
ACCM!&&&&&&&&rc~Gddt}|ddi}tj|}|||||j|j|||d|d<|||||j|jdS)Nc*eZdZdfd	ZfdZxZS)/TestCopy.test_deepcopy_dict_subclass.<locals>.CNc|si}t||_t|dSr
)rkeys_keyssuperr))rdr5s  rr)z8TestCopy.test_deepcopy_dict_subclass.<locals>.C.__init__sCA!!&&((^^
  #####rct||||jvr|j|dSdSr
)r
__setitem__rrY)rkeyitemr5s   rrz;TestCopy.test_deepcopy_dict_subclass.<locals>.C.__setitem__sN##C...dj((J%%c*****)(rr
)r0r1r2r)r
__classcell__)r5s@rr-r	sV
$
$
$
$
$
$

+
+
+
+
+
+
+
+
+rr-r'r)rrVr)rrr#rrrMassertNotEqualrs    rtest_deepcopy_dict_subclassz$TestCopy.test_deepcopy_dict_subclasss		+		+		+		+		+		+		+		+
Aq	NNNM!A!'***A%Aq!!!AGQW-----rcGddt}|ddgdg}ddg|_tj|}|t|t|||j|j||d|d||j|jdS)	NceZdZdS)+TestCopy.test_copy_list_subclass.<locals>.CNrrCrrr-rrrr-rVrrryr)rr'rrrrs    rtest_copy_list_subclassz TestCopy.test_copy_list_subclasss								
A1vqkNNAIaLLa$q''***&&&

adAaD!!!

aeQU#####rcGddt}|ddgdg}ddg|_tj|}|t|t|||j|j||d|d||j|jdS)	NceZdZdS)/TestCopy.test_deepcopy_list_subclass.<locals>.CNrrCrrr-rrrr-rVrrryrr)rr'rr#rrMrs    rtest_deepcopy_list_subclassz$TestCopy.test_deepcopy_list_subclasss								
A1vqkNNAM!a$q''***&&&1qt$$$&&&&&rcGddt}|gd}|t|dtj|}|t|ddS)NceZdZdS),TestCopy.test_copy_tuple_subclass.<locals>.CNrrCrrr-r!rrr-r)tuplerrrs    rtest_copy_tuple_subclassz!TestCopy.test_copy_tuple_subclasss								
AiiiLLq9---IaLLq9-----rc~Gddt}|ddgdg}|t|ddgdftj|}|t|ddgdf|||||d|ddS)NceZdZdS)0TestCopy.test_deepcopy_tuple_subclass.<locals>.CNrrCrrr-r&	rrr-rVrrr)r"rrr#rMrs    rtest_deepcopy_tuple_subclassz%TestCopy.test_deepcopy_tuple_subclasss								
A1vqkNNqQFA;///M!qQFA;///A1qt$$$$$rcGddt}|ttj|dS)NceZdZdZdS)-TestCopy.test_getstate_exc.<locals>.EvilStatec td)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\	@	@	@	@	@	@	@	@	
*di=====rc|tjttd}|tj||d}|tj||dS)Nc||zSr
rCrr s  rr'z(TestCopy.test_copy_function.<locals>.foo
aczrcdSr
rCrCrr<lambda>z-TestCopy.test_copy_function.<locals>.<lambda>dr)rr
global_foorr'rs   rtest_copy_functionzTestCopy.test_copy_functionst:..
;;;!!!3---l3-----rc|tjttd}|tj||d}|tj||dS)Nc||zSr
rCr1s  rr'z,TestCopy.test_deepcopy_function.<locals>.foo!r2rcdSr
rCrCrrr4z1TestCopy.test_deepcopy_function.<locals>.<lambda>#r5r)rrr#r6r7s   rtest_deepcopy_functionzTestCopy.test_deepcopy_functionsxz22J???!!!s++S111ls++S11111rcGddt}|}tj|}||}|||~||}|||dS)NceZdZdS)"TestCopy._check_weakref.<locals>.CNrrCrrr-r?'rrr-)r4weakrefrefr)r_copyr-r@rr s      r_check_weakrefzTestCopy._check_weakref&s								accKE!HH

aE!HH

arcD|tjdSr
)rCrrs rtest_copy_weakrefzTestCopy.test_copy_weakref1sDI&&&&&rcD|tjdSr
)rCrr#rs rtest_deepcopy_weakrefzTestCopy.test_deepcopy_weakref4sDM*****rc
Gddt

fdtdD\}}}}|}|||<|||<tj|}|||||||||||||||t|d~~t
j|t|d

}	}|	||<|||dS)NceZdZdS)(TestCopy._check_copy_weakdict.<locals>.CNrrCrrr-rJ8rrr-c$g|]}
SrCrC.0ir-s  r
<listcomp>z1TestCopy._check_copy_weakdict.<locals>.<listcomp>:s,,,aaacc,,,rryrrV)	r4rrrMrr^r	
gc_collectassertNotIn)r	_dicttypeabr\ruvrr r-s          @r_check_copy_weakdictzTestCopy._check_copy_weakdict7sd								,,,,588,,,
1aIKK!!IaLLAA1q!!!1q!!!Q###
qQ###qssAACC1!ArcD|tjdSr
)rWr@WeakKeyDictionaryrs rtest_copy_weakkeydictzTestCopy.test_copy_weakkeydictLs!!'";<<<<<rcD|tjdSr
)rWr@WeakValueDictionaryrs rtest_copy_weakvaluedictz TestCopy.test_copy_weakvaluedictOs!!'"=>>>>>rcGddtfdtdD\}}}}tj}|||<|||<t	j|}||||t|d|	||||	||||||j
|j
|||j
|j
~tj|t|ddS)NceZdZdZdS)-TestCopy.test_deepcopy_weakkeydict.<locals>.Cc||_dSr
rNrrNs  rr)z6TestCopy.test_deepcopy_weakkeydict.<locals>.C.__init__T
rNr0r1r2r)rCrrr-r`S#




rr-c&g|]
}|SrCrCrLs  rrOz6TestCopy.test_deepcopy_weakkeydict.<locals>.<listcomp>V!---qaadd---rryrrV)
r4rr@rYrr#rrr^rMrNr	rP)rrSrTr\rrUrVr-s       @rtest_deepcopy_weakkeydictz"TestCopy.test_deepcopy_weakkeydictRs[								.---E!HH---
1a%''!!M!Aq!!!Q###1q!!!1q!!!1%%%1%%%
Q#####rcBGddtfdtdD\}}}}tj}|||<|||<t	j|}||||t|dt|
d\\}}\}	}
|||||j|j|
||||	|||	j|j|
|
|~~~	~
~tj|t|ddS)	NceZdZdZdS)/TestCopy.test_deepcopy_weakvaluedict.<locals>.Cc||_dSr
rbrcs  rr)z8TestCopy.test_deepcopy_weakvaluedict.<locals>.C.__init__hrdrNrerCrrr-rlgrfrr-c&g|]
}|SrCrCrLs  rrOz8TestCopy.test_deepcopy_weakvaluedict.<locals>.<listcomp>jrhrryrc|djSrlrb)pairs rr4z6TestCopy.test_deepcopy_weakvaluedict.<locals>.<lambda>rsDGIr)rrV)r4rr@r\rr#rrr^sortedrrMrNrr	rP)rrSrTr\rrUrVrr ztr-s           @rtest_deepcopy_weakvaluedictz$TestCopy.test_deepcopy_weakvaluedictfs								.---E!HH---
1a'))!!M!Aq!!!Q###		/E/EFFFAAAac"""

aAac"""

a
q!Q
Q#####rc(Gddt}|}|j|_tj|}||j|j||jj||dS)NceZdZdZdS)0TestCopy.test_deepcopy_bound_method.<locals>.FoocdSr
rCrs rmz2TestCopy.test_deepcopy_bound_method.<locals>.Foo.msrN)r0r1r2ryrCrrFoorws#




rrz)r4ryrTrr#rr__self__)rrzrgs    rtest_deepcopy_bound_methodz#TestCopy.test_deepcopy_bound_method~s					&			
CEEcM!ac"""

aclA&&&	rN)Qr0r1r2rr!r7rPrjrrrrrrrrrrrrrrrrrr!r$r'r.r7r=rDrIrNrUrYrarergrjrmrorsrwrzrrrrrrrrrrrrrrrrrrrrrrrr#r'r.r8r<rCrErGrWrZr]rirtr}rCrrrrs;;;
	'	'	'''' !!!	!	!	!444+++"''''''***	*	*	*	*	*	*'''"'''"	*	*	*	*	*	****$
	"	"	"	.	.	.	'	'	'''' !!!	!	!	!888///%%%$$$
%%%
"""---
$
$
$,,,
'
'
'	'	'	''''''''''$'''$''''''''',   	0	0	0''''''    %%%"---"


$$$'''...(	$	$	$	'	'	'...%%%>>>...222			'''+++*===???$$$($$$0					rrc||zSr
rCr1s  rr6r6s
QqSjr__main__)__doc__rrKr@roperatorrrrrrrunittesttestr	rqrrr\TestCaserr6r0mainrCrr<module>rs%%



++++++++++++++++BN2v"66w
w
w
w
w
x w
w
w
t!  zHMOOOOOr