%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/lib/python3.8/unittest/test/testmock/__pycache__/
Upload File :
Create Path :
Current File : //usr/local/lib/python3.8/unittest/test/testmock/__pycache__/testpatch.cpython-38.pyc

U

qa@sddlZddlZddlZddlmZddlmZmZddlm	Z	ddl
mZmZm
Z
mZmZmZmZmZmZmZmZdZejeZdeZdd	d
Ze
jae
jZGddde Z!d
eZ"e!fddZ#Gddde Z$Gdddej%Z&edkre'dS)N)support)	SomeClassis_instance)uncache)NonCallableMock
CallableMixinsentinel	MagicMockMockNonCallableMagicMockpatch_patchDEFAULTcall_get_targetbuiltinsz%s.PTModuleTcsBGfdddt}|s<fdd}fdd}||_||_|S)NcseZdZfddZdS)z_get_proxy.<locals>.Proxycs
t|SN)getattrselfnameobj</usr/local/lib/python3.8/unittest/test/testmock/testpatch.py__getattr__sz%_get_proxy.<locals>.Proxy.__getattr__N)__name__
__module____qualname__rrrrrProxysrcst||dSr)setattrrrvaluerrr__setattr__sz_get_proxy.<locals>.__setattr__cst|dSr)delattrrrrr__delattr__!sz_get_proxy.<locals>.__delattr__)objectr#r%)rget_onlyrr#r%rrr
_get_proxysr(c@sPeZdZddZddZddZdZedd	Ze	d
dZ
Gdd
d
eZdS)FoocCsdSrrrarrr__init__.zFoo.__init__cCsdSrrr*rrrf/r-zFoo.fcCsdSrrrrrrg0r-zFoo.gbarcCsdSrrrrrr
static_method3szFoo.static_methodcCsdSrr)clsrrrclass_method6szFoo.class_methodc@seZdZddZdS)zFoo.BarcCsdSrrr/rrrr+:r-z	Foo.Bar.aNrrrr+rrrrBar9sr6N)
rrrr,r.r0foostaticmethodr2classmethodr4r&r6rrrrr)-s

r)z%s.FoocCsdSrrr+brrrfunction?r-r<c@s4eZdZddZddZddZddZd	d
ZdS)	ContainercCs
i|_dSrvaluesr/rrrr,CszContainer.__init__cCs
|j|Srr>rrrr__getitem__FszContainer.__getitem__cCs||j|<dSrr>r!rrr__setitem__IszContainer.__setitem__cCs|j|=dSrr>rrrr__delitem__LszContainer.__delitem__cCs
t|jSr)iterr?r/rrr__iter__OszContainer.__iter__N)rrrr,r@rArBrDrrrrr=Bs
r=c@sjeZdZdddZddZddZdd	Zd
dZdd
ZddZ	ddZ
ddZddZddZ
ddZddZddZddZd d!Zd"d#Zd$d%Zd&d'Zd(d)Zd*d+Zd,d-Zd.d/Zd0d1Zd2d3Zd4d5Zd6d7Zd8d9Zd:d;Zd<d=Z d>d?Z!d@dAZ"dBdCZ#dDdEZ$dFdGZ%dHdIZ&dJdKZ'dLdMZ(dNdOZ)dPdQZ*dRdSZ+dTdUZ,dVdWZ-dXdYZ.dZd[Z/d\d]Z0d^d_Z1d`daZ2dbdcZ3dddeZ4dfdgZ5dhdiZ6djdkZ7dldmZ8dndoZ9dpdqZ:drdsZ;dtduZ<dvdwZ=dxdyZ>dzd{Z?d|d}Z@d~dZAddZBddZCddZDddZEddZFddZGddZHddZIddZJddZKddZLddZMddZNddZOddZPddZQddZRddZSddZTddZUddZVddZWeXddddZYeXddddZZddZ[ddZ\ddZ]ddZ^ddZ_ddZ`ddZadd„ZbddĄZcddƄZdddȄZeddʄZfdd̄Zgdd΄ZhddЄZidd҄ZjddԄZkddքZldS)	PatchTestTcCs<t}|st}|t||t|||t|tdSr)rrassertRaises	TypeError
assertTruerassertFalser)rrmagic	MockClassrrrassertNotCallableVszPatchTest.assertNotCallablecsJGdddttdtjfdd}|jtjddS)Nc@seZdZejZdS)z4PatchTest.test_single_patchobject.<locals>.SomethingNrrrrOriginal	attributerrrr	SomethingasrPrOcsjtjddSNZ	unpatchedassertEqualrOrPatchedrrPrrrtestdsz/PatchTest.test_single_patchobject.<locals>.testpatch not restoredr&rrrTrSrOrNrrVrrUrtest_single_patchobject`sz!PatchTest.test_single_patchobjectc	Cs,d}|t|tddW5QRXdS)Nz>'Something' must be the actual object to be patched, not a strrPZdo_something)ZassertRaisesRegexrGrr&)rmsgrrr&test_patchobject_with_string_as_targetlsz0PatchTest.test_patchobject_with_string_as_targetcsHGdddttddfdd}|jtjddS)Nc@seZdZejZdS)z7PatchTest.test_patchobject_with_none.<locals>.SomethingNrMrrrrrPrsrPrOcsjddSrQ)assertIsNonerOrrUrrrVusz2PatchTest.test_patchobject_with_none.<locals>.testrW)r&rrSrOrrNrYrrUrtest_patchobject_with_noneqsz$PatchTest.test_patchobject_with_nonecslGdddttdtjtdtjfdd}|jtjdjtj	ddS)Nc@seZdZejZejZdS)z6PatchTest.test_multiple_patchobject.<locals>.SomethingNrrrrrNrO	Original2next_attributerrrrrPsrPrOracs(jtjdjtjddSrQ)rSrOrrTraPatched2rrUrrrVsz1PatchTest.test_multiple_patchobject.<locals>.testrW)
r&rrrTrbrSrOrNrar`rYrrUrtest_multiple_patchobject~sz#PatchTest.test_multiple_patchobjectcCsFt}tdttjdd}ztja||ttjW5|aXdS)N%s.somethingcSsdSrrrrrrrVsz8PatchTest.test_object_lookup_is_quite_lazy.<locals>.test)	somethingrrr
Something2Zreplacement_valuerSroriginalrVrrr test_object_lookup_is_quite_lazys
z*PatchTest.test_object_lookup_is_quite_lazycstdttjfdd}|tjtjdtdttjtdttjfdd}tjtjdtj	tjd|tjtjdtj	tjdt
}tj|_tdt
|fdd}||t|ddS)	NrdcstjtjddSrQ)rSPTModulererrfrr/rrrVsz"PatchTest.test_patch.<locals>.testrWz%s.something_elsecs(tjtjdtjtjddSrQ)rSrjrerrfsomething_else
SomethingElserr/rrrVs%s.opencstddtjddS)Nfilenamerzopen not patched)rSopenrHandlerr/rrrVs)rrrrfrSrjrerPrlrkr
rqreturn_valuebuiltin_stringassertNotEqualrp)rrVmockrr/r
test_patchs:zPatchTest.test_patchcs6tdttjfdd}|tjjddS)Nz%s.SomeClass.class_attributecstjjtjddSrQ)rSrjrclass_attributerClassAttributerr/rrrVs
z2PatchTest.test_patch_class_attribute.<locals>.testrW)rrrrxr]rjrrwrYrr/rtest_patch_class_attributes
z$PatchTest.test_patch_class_attributecsGdddttdfdd}|tdtdfdd}d|tjtj\|tjtjdS)Nc@seZdZejZejZdS)z:PatchTest.test_patchobject_with_default_mock.<locals>.TestN)rrrrrNrer`
something2rrrrTestsr{recs"|jd|tddS)N"Mock not passed into test function.patch with two arguments did not create a mock)rSreassertIsInstancer	ru)r{rrrrVs
z:PatchTest.test_patchobject_with_default_mock.<locals>.testrzcs|tjd|tjd|jd|jd|td|td|d|d||fS)Nz0Patched function didn't receive initial argumentz/Patched function didn't receive second argumentr|z)Second Mock not passed into test functionr}zunexpected value for mock1)	rSrthis1this2rzrer~r	rt)rrZmock1Zmock2r{Z
outerMock1Z
outerMock2rrrrVs*



)r&rrrrrYrrr"test_patchobject_with_default_mocks


z,PatchTest.test_patchobject_with_default_mockcs&tdttdfdd}|dS)N%s.SomeClassspeccs2t|ttjttdddS)NcSstjSrr
not_wibblerrrr<lambda>r-z>PatchTest.test_patch_with_spec.<locals>.test.<locals>.<lambda>rSrrHrwibbler	rFAttributeError
MockSomeClassr/rrrVsz,PatchTest.test_patch_with_spec.<locals>.test)rrrrYrr/rtest_patch_with_specszPatchTest.test_patch_with_speccs&tjtdtdfdd}|dS)Nrwrcs6tj|ttjjttdddS)NcSstjjSrrrwrrrrrrr-zDPatchTest.test_patchobject_with_spec.<locals>.test.<locals>.<lambda>	rSrrwrHrrr	rFrZ
MockAttributer/rrrV
sz2PatchTest.test_patchobject_with_spec.<locals>.testrr&rrYrr/rtest_patchobject_with_specsz$PatchTest.test_patchobject_with_speccs(tdtdgdfdd}|dS)Nrrrcs2t|ttjttdddS)NcSstjSrrrrrrrr-zFPatchTest.test_patch_with_spec_as_list.<locals>.test.<locals>.<lambda>rrr/rrrVsz4PatchTest.test_patch_with_spec_as_list.<locals>.testrrrYrr/rtest_patch_with_spec_as_listsz&PatchTest.test_patch_with_spec_as_listcs(tjtddgdfdd}|dS)Nrwrrcs6tj|ttjjttdddS)NcSstjjSrrrrrrr)r-zLPatchTest.test_patchobject_with_spec_as_list.<locals>.test.<locals>.<lambda>rrr/rrrV#sz:PatchTest.test_patchobject_with_spec_as_list.<locals>.testrrYrr/r"test_patchobject_with_spec_as_list"sz,PatchTest.test_patchobject_with_spec_as_listcs4tdttdtdgdfdd}|dS)Nrmrrrcs2t|ttjttdddS)NcSstjSrrrrrrr5r-zMPatchTest.test_nested_patch_with_spec_as_list.<locals>.test.<locals>.<lambda>r)rZMockOpenr/rrrV0sz;PatchTest.test_nested_patch_with_spec_as_list.<locals>.test)rrsrrYrr/r#test_nested_patch_with_spec_as_list.s
z-PatchTest.test_nested_patch_with_spec_as_listcs&tdtddfdd}|dS)NrTrcs*tjtfdddS)NcsjSrrrrrrr@r-zIPatchTest.test_patch_with_spec_as_boolean.<locals>.test.<locals>.<lambda>rSrrrFrrr/rrrV:sz7PatchTest.test_patch_with_spec_as_boolean.<locals>.testrrYrr/rtest_patch_with_spec_as_boolean9sz)PatchTest.test_patch_with_spec_as_booleancs&tjtdddfdd}|dS)NrTrcs*tjtfdddS)NcsjSrrrrrrrLr-zPPatchTest.test_patch_object_with_spec_as_boolean.<locals>.test.<locals>.<lambda>rrr/rrrVFsz>PatchTest.test_patch_object_with_spec_as_boolean.<locals>.test)rr&rjrYrr/r&test_patch_object_with_spec_as_booleanEsz0PatchTest.test_patch_object_with_spec_as_booleancs&tdtddfdd}|dS)NrTrcs>t|t|jtfdddS)NcsjSrrrinstancerrrZr-zVPatchTest.test_patch_class_acts_with_spec_is_inherited.<locals>.test.<locals>.<lambda>)rHrr	rLrrFrrr/rrrVRs

zDPatchTest.test_patch_class_acts_with_spec_is_inherited.<locals>.testrrYrr/r,test_patch_class_acts_with_spec_is_inheritedQs	z6PatchTest.test_patch_class_acts_with_spec_is_inheritedcs:tdttjddfdd}|tdddS)N
%s.froobleTcreatecsttjdSr)rSfrooblerFrooblerr/rrrV`szLPatchTest.test_patch_with_create_mocks_non_existent_attributes.<locals>.testcSstSrrrrrrrer-zPPatchTest.test_patch_with_create_mocks_non_existent_attributes.<locals>.<lambda>)rrsrrrF	NameErrorrYrr/r4test_patch_with_create_mocks_non_existent_attributes_sz>PatchTest.test_patch_with_create_mocks_non_existent_attributescs:tjtdtjddfdd}|ttddS)NrTrcstjtjdSr)rSrrrrrr/rrrViszRPatchTest.test_patchobject_with_create_mocks_non_existent_attributes.<locals>.test)rr&rrrrIhasattrrYrr/r:test_patchobject_with_create_mocks_non_existent_attributeshszDPatchTest.test_patchobject_with_create_mocks_non_existent_attributesc	CsH|t$tdttjdd}|W5QRX|tdddS)NrcSsdSrrrrrrrVssz9PatchTest.test_patch_wont_create_by_default.<locals>.testcSstSrrrrrrrwr-z=PatchTest.test_patch_wont_create_by_default.<locals>.<lambda>)rFrrrsrrrrYrrr!test_patch_wont_create_by_defaultqs

z+PatchTest.test_patch_wont_create_by_defaultc	CsH|t$ttdtjdd}|W5QRX|ttddS)NordcSsdSrrrrrrrV|sz?PatchTest.test_patchobject_wont_create_by_default.<locals>.test)	rFrrr&rrrrIrrYrrr'test_patchobject_wont_create_by_defaultzs

z1PatchTest.test_patchobject_wont_create_by_defaultcCsHttddd}ttddd}||d||ddS)	Nz.ordcSsd|_tdS)Nec)rrr)Zmock_ordrrrtest_ordsz>PatchTest.test_patch_builtins_without_create.<locals>.test_ordz.opencSs*|j}d|j_td}|}||S)Nabcdzdoesnotexists.txt)rrreadrpclose)Z	mock_openmZfobjdatarrr	test_opensz?PatchTest.test_patch_builtins_without_create.<locals>.test_openrrrrrS)rrrrrr"test_patch_builtins_without_creates



	z,PatchTest.test_patch_builtins_without_createcsPGdddttdtddfdd}|tjdS)Nc@seZdZeddZdS)z5PatchTest.test_patch_with_static_methods.<locals>.FoocSstjSr)rStaticrrrrwootsz:PatchTest.test_patch_with_static_methods.<locals>.Foo.wootN)rrrr8rrrrrr)sr)rcSstjSr)rrTrrrrrr-z:PatchTest.test_patch_with_static_methods.<locals>.<lambda>cstjdSr)rSrrrTrr)rrr	anonymoussz;PatchTest.test_patch_with_static_methods.<locals>.anonymous)r&rr8rSrrr)rrrrrtest_patch_with_static_methodss
z(PatchTest.test_patch_with_static_methodscs8tj}ttddfdd}|tj|dS)Nr)cstjddSNr))rSrr)rr/rrrsz-PatchTest.test_patch_local.<locals>.anonymous)rr)rr&rS)rr7rrr/rtest_patch_locals
zPatchTest.test_patch_localcsTGdddt}|tj_tddfdd}|jtjdS)Nc@seZdZdZdS)z'PatchTest.test_patch_slots.<locals>.Foo)r)N)rrr	__slots__rrrrr)sr)csjddSr)rSr)rr7rrrrsz-PatchTest.test_patch_slots.<locals>.anonymous)r&rr)rrS)rr)rrrrtest_patch_slotsszPatchTest.test_patch_slotscsfGdddtGfdddt}tdtj|}|}||jtjddS)Nc@seZdZejZdS)z=PatchTest.test_patchobject_class_decorator.<locals>.SomethingNrMrrrrrPsrPcs(eZdZfddZfddZdS)z7PatchTest.test_patchobject_class_decorator.<locals>.FoocsjtjddSrQrR
other_selfrUrrtest_methodszCPatchTest.test_patchobject_class_decorator.<locals>.Foo.test_methodcsjtjddSNznon-test method patched)rSrOrrNrrUrrnot_test_methodszGPatchTest.test_patchobject_class_decorator.<locals>.Foo.not_test_methodN)rrrrrrrUrrr)sr)rOrW)	r&rrrTrrrSrOrN)rr)r.rrUr test_patchobject_class_decoratorsz*PatchTest.test_patchobject_class_decoratorcsrGdddt}Gfdddt}tdt|}|}|||jtjdt	j
tjddS)Nc@seZdZejZdS)z7PatchTest.test_patch_class_decorator.<locals>.SomethingNrMrrrrrPsrPcs(eZdZdZfddZfddZdS)z1PatchTest.test_patch_class_decorator.<locals>.FooZwhatevercstj|ddSrQ)rSrjre)rZmock_somethingr/rrrs
z=PatchTest.test_patch_class_decorator.<locals>.Foo.test_methodcstjtjddSr)rSrjrerrPrr/rrrszAPatchTest.test_patch_class_decorator.<locals>.Foo.not_test_methodN)rrrZtest_class_attrrrrr/rrr)sr)rdrW)r&rrrrrSrOrrNrjrerP)rrPr)r.rr/rtest_patch_class_decorators
z$PatchTest.test_patch_class_decoratorcsZGdddttdtjtdtjfdd}|jtjddS)Nc@seZdZejZejZdS)z3PatchTest.test_patchobject_twice.<locals>.SomethingNr_rrrrrPsrPrOcsjtjddSrQrRrrUrrrVsz.PatchTest.test_patchobject_twice.<locals>.testrWrXrYrrUrtest_patchobject_twicesz PatchTest.test_patchobject_twicecstdd}tfdd}||tddifdd}||tdgfd	d}||dS)
Nreinitialothercsdd<d=dd<dSNr+rsomething elserrrr7rrrVsz'PatchTest.test_patch_dict.<locals>.testr+r;cs$tddddSNrr+r;rSlenrrrrrVsr:cs$tddddSrrrrrrrVsr&copyrdictrSrgrrrtest_patch_dictszPatchTest.test_patch_dictcsttd<dd<j}tfdd}|j|tddifdd}|j|dS)	Nrrercsdd<d=dd<dSrrrrrrrV%sz=PatchTest.test_patch_dict_with_container_object.<locals>.testr+r;cs&tjddddSr)rSrr?rrrrrV/sr=r&r?rrrrSrgrrr%test_patch_dict_with_container_objects

z/PatchTest.test_patch_dict_with_container_objectcstdd}tjddfdd}||tjddiddfd	d}||tjd
gddfdd}||dS)NrerTclearcs idd<dd<dSNrr+rrrSrrrrrV=sz2PatchTest.test_patch_dict_with_clear.<locals>.testr+r;csddidSNr+r;rrrrrrVGsr:csddidSrrrrrrrVOsrrgrrrtest_patch_dict_with_clear9sz$PatchTest.test_patch_dict_with_clearcsttd<dd<j}tjddfdd}|j|tjdd	iddfd
d}|j|dS)NrrerTrcs"jidd<dd<dSrrSr?rrrrrV_szGPatchTest.test_patch_dict_with_container_object_and_clear.<locals>.testr+r;csjddidSrrrrrrrVisrrgrrr/test_patch_dict_with_container_object_and_clearXs

z9PatchTest.test_patch_dict_with_container_object_and_clearc	CsFddi}tj|dd}||ddiW5QRX||ddidS)Nr+r;r)r+)rrrS)rr7patchedrrr"test_patch_dict_as_context_managerrsz,PatchTest.test_patch_dict_as_context_managercCsZi}tdtttdttddtttt|dd}||jddS)NrTautospeccSsdSrrrrrr	some_name|sz0PatchTest.test_name_preserved.<locals>.some_namer)rrr&rrrS)rr7rrrrtest_name_preservedyszPatchTest.test_name_preservedc	CsHi}t|ddidd}|t|W5QRX||idS)Nr+r;cSstddS)NZKonradrrrrrrVsz1PatchTest.test_patch_with_exception.<locals>.test)rrrFrrS)rr7rVrrrtest_patch_with_exceptions
z#PatchTest.test_patch_with_exceptioncs&tdddifdd}|dS)Nz
os.environ
konrad_delongz
some valuecsdtjdS)Nr)assertInosenvironrr/rrrVsz3PatchTest.test_patch_dict_with_string.<locals>.test)rrrYrr/rtest_patch_dict_with_stringsz%PatchTest.test_patch_dict_with_stringcsZtj}tdddifdd}z&ddit_|tjddiW5|t_XdS)Nz%unittest.test.testmock.support.targetr1BARcstjddddS)NBAZrr7r1)rSrtargetrr/rrrVsz<PatchTest.test_patch_dict_decorator_resolution.<locals>.testr7r)rrrrrrSrgrr/r$test_patch_dict_decorator_resolutions

z.PatchTest.test_patch_dict_decorator_resolutioncCstdttdddd}|t|tjtdtdddd}|t|tdtddd	d}|t|tjtdddd
d}|t|dS)NrTrspec_setcSs
d|_dSNr7zrKrrrrVsz+PatchTest.test_patch_spec_set.<locals>.testrcSs
d|_dSrrrrrrrVsrcSs
d|_dSrrrrrrrVscSs
d|_dSrrrrrrrVs)rrrrFrr&rrYrrrtest_patch_spec_sets



zPatchTest.test_patch_spec_setcCs(tdtdddd}|t|dS)NrTrcSs|}d|_dSrr)rKrrrrrVsz-PatchTest.test_spec_set_inherit.<locals>.test)rrrFrrYrrrtest_spec_set_inherits
zPatchTest.test_spec_set_inheritcCs\t}tdt}|t||}z||||t|W5|X|t|dS)Nrd)rerrassertIsstartstopassertIsNot)rrhpatcherrurrrtest_patch_start_stops
zPatchTest.test_patch_start_stopcCsttdd}||dSNr1r)rfoo_namer]rrrrrrtest_stop_without_startsz!PatchTest.test_stop_without_startcCs.ttdd}||||dSr)rrrrr]rrrrtest_stop_idempotentszPatchTest.test_stop_idempotentcCs^t}ttdd}|t||}z||d|t|W5|X|t|dS)Nrer7)rerr&rjrrrrS)rrhrZreplacedrrrtest_patchobject_start_stops
z%PatchTest.test_patchobject_start_stopcCsfddi}|}tj|dgdd}||||z||ddiW5|X|||dS)Nr7r1)spameggsTrr	r
)rrrrSrr)rdrhrrrrtest_patch_dict_start_stops
z$PatchTest.test_patch_dict_start_stopcs|ddi}Gfdddt}tjddidd|}|||}|||||||}||||||dS)	Nr	r
cs(eZdZfddZfddZdS)z7PatchTest.test_patch_dict_class_decorator.<locals>.TestcsddidSNr7r1rr/rthisrr
test_first
szBPatchTest.test_patch_dict_class_decorator.<locals>.Test.test_firstcsddidSr
rr/rrrtest_secondszCPatchTest.test_patch_dict_class_decorator.<locals>.Test.test_secondN)rrrrrrrrrr{	sr{r7r1Tr)rr&rrrSrr)rrhr{rVrrrtest_patch_dict_class_decorators z)PatchTest.test_patch_dict_class_decoratorcsGdddt}Gddd}||||fD]X}t|tddfdd}|jd|jddjq,dS)	Nc@seZdZdZdS)z0PatchTest.test_get_only_proxy.<locals>.Somethingr7Nrrrr7rrrrrP$srPc@seZdZdZdS)z4PatchTest.test_get_only_proxy.<locals>.SomethingElser7Nrrrrrrl&srlr7r1csjddSNr1rSr7rproxyrrrrV,sz+PatchTest.test_get_only_proxy.<locals>.testr&r(rrSr7ZassertNotIn__dict__rrPrlthingrVrrrtest_get_only_proxy#szPatchTest.test_get_only_proxycsGdddt}Gddd}||||fD]\}t|ddtddfd	d
}|jd|jddjq,dS)Nc@seZdZdZdS)z6PatchTest.test_get_set_delete_proxy.<locals>.Somethingr7NrrrrrrP6srPc@seZdZdZdS)z:PatchTest.test_get_set_delete_proxy.<locals>.SomethingElser7Nrrrrrrl8srlF)r'r7r1csjddSrrrrrrrV>sz1PatchTest.test_get_set_delete_proxy.<locals>.testrrrrrtest_get_set_delete_proxy5sz#PatchTest.test_get_set_delete_proxycCsZtdtd}ttf|}|}||t|||j	d|
|jtdS)N!Zside_effectzfoo.bar.return_valuer7)KeyErrorr	rrrrrFrSr7r1r~rkwargsrrurrrtest_patch_keyword_argsGsz!PatchTest.test_patch_keyword_argscCs^tdtd}tjtdf|}|}||t|||j	
d||j	tdS)Nrrr.)r r	rr&r)rrrFrSr7r1r~r!rrrtest_patch_object_keyword_argsTsz(PatchTest.test_patch_object_keyword_argscCs`ddi}|}tj|dddd}|z||tddddW5|X|||dS)Nr7r1r)r7r1Zbaz)rrrrrrS)rrhrrrrrtest_patch_dict_keyword_argsas
z&PatchTest.test_patch_dict_keyword_argscsGdddt}fddfddfdd}ttd	d
|}|}t||tjt}tj|dd	d
|}|}t||dS)Nc@s8eZdZddZddZddZdZGdd	d	eZd
S)z$PatchTest.test_autospec.<locals>.BoocSsdSrrr*rrrr,rr-z-PatchTest.test_autospec.<locals>.Boo.__init__cSsdSrrr*rrrr.sr-z&PatchTest.test_autospec.<locals>.Boo.fcSsdSrrr/rrrr0tr-z&PatchTest.test_autospec.<locals>.Boo.gr1c@seZdZddZdS)z(PatchTest.test_autospec.<locals>.Boo.BarcSsdSrrr/rrrr+xr-z*PatchTest.test_autospec.<locals>.Boo.Bar.aNr5rrrrr6wsr6N)	rrrr,r.r0r7r&r6rrrrBooqs
r(cs"|d|dt|dSN)assert_called_withrFrGrr/rr_testzs
z&PatchTest.test_autospec.<locals>._testcs|d|jdt|j||jt|jdtt|d|j|jjtt|jd|	|j	|j	
|j	j
t|j	j
d|	
|	j
t|	j
dtt|j	dtt|	ddS)Nr*hr1r;)r.r+rFrGr0rrr7lowerr6r+rr/rr_test2s(




z'PatchTest.test_autospec.<locals>._test2cs,|||d|t|Sr))rr)rr,r/rrrr<s
z)PatchTest.test_autospec.<locals>.functionTrr))r&rrrr)sysmodulesr)rr(r<rVrumodulerr0r
test_autospecps	
zPatchTest.test_autospeccs&tdtddfdd}|dS)N%s.functionTrcstttjttjtdttjtdtttddtddtttt	tddS)Nr*rr7)
r<Zassert_not_calledrFAssertionErrorZ
assert_calledZassert_called_oncer+rGrrrr/rrrVs

z.PatchTest.test_autospec_function.<locals>.testrrYrr/rtest_autospec_functionsz PatchTest.test_autospec_functioncCs0tdtddddd}|}||ddS)Nr5Tr)rrrcSs
tddS)Nr*r6)r<)Z
mock_functionrrrrVsz.PatchTest.test_autospec_keywords.<locals>.testr)rrVresultrrrtest_autospec_keywordss

z PatchTest.test_autospec_keywordsc	Cs0tdtdd}t|W5QRXdS)Nz%s.Foo.static_methodTr)rrr)r2assert_called_once_withrmethodrrrtest_autospec_staticmethodsz$PatchTest.test_autospec_staticmethodc	Cs0tdtdd}t|W5QRXdS)Nz%s.Foo.class_methodTr)rrr)r4r;r<rrrtest_autospec_classmethodsz#PatchTest.test_autospec_classmethodcCsNtdtddd}|t|jtjt}tj|dddd}|t|jdS)Nr5rT)newrr<)rrrFrGrr1r2r&)rrr3rrrtest_autospec_with_news

z PatchTest.test_autospec_with_newcCsRGdddt}tt|d}|}z|||||jtW5|XdS)Nc@seZdZgZdS)z0PatchTest.test_autospec_with_object.<locals>.BarN)rrrextrarrrrr6sr6r)r)rrrrr~rBlist)rr6rrurrrtest_autospec_with_objectsz#PatchTest.test_autospec_with_objectcCsHt}ttdd}|}z |||||d|W5|XdS)NTrr)r)rrrrr~)rZFooClassrrurrrtest_autospec_inheritssz PatchTest.test_autospec_inheritscCstttdd}|}zP|dt||dt|j|dt|d|dt|djW5|XdS)NTrz name='Foo'z
 name='Foo.f'z
 name='Foo()'z name='Foo().f')rrrrrreprr.)rrrurrrtest_autospec_nameszPatchTest.test_autospec_namecCsbttdtdd}z
|Wnt}YnXtddd}|||}|d|dS)Nr.cSstdSr)r7rrrrrV
sz'PatchTest.test_tracebacks.<locals>.testrzraise AssertionError)	rr&r)r1exc_infounittestZTextTestResultZ_exc_info_to_stringr)rrVerrr9	tracebackrrrtest_tracebackss

zPatchTest.test_tracebackscCsTtttd}|}||}||||||fD]}||q@dS)Nnew_callable)rrrrrrrLrrZm1Zm2rurrrtest_new_callable_patchsz!PatchTest.test_new_callable_patchcCsXtjtdtd}|}||}||||||fD]}||qDdS)Nr.rM)rr&r)rrrrrLrOrrrtest_new_callable_patch_object'sz(PatchTest.test_new_callable_patch_objectcsfGfdddtttddd}|}z*|t||jt	dddW5|XdS)NcseZdZdZfddZdS)z:PatchTest.test_new_callable_keyword_arguments.<locals>.BarNcs
|_dSrr"rr"r6rrr,7szCPatchTest.test_new_callable_keyword_arguments.<locals>.Bar.__init__rrrr"r,rrTrrr65sr6r*r6)rNarg1arg2)rVrW)
r&rrrrrtyperSr"r)rrrrrTr#test_new_callable_keyword_arguments4sz-PatchTest.test_new_callable_keyword_argumentscsGfdddtttd}|z|jtdW5|Xttd}|z|jtdW5|XdS)NcseZdZdZfddZdS)z-PatchTest.test_new_callable_spec.<locals>.BarNcs
|_dSrrRrSrTrrr,Fsz6PatchTest.test_new_callable_spec.<locals>.Bar.__init__rUrrTrrr6Dsr6rNrr)rNrr)r&rrrrrSr"rrrrTrtest_new_callable_specCs
z PatchTest.test_new_callable_speccCsZdt}t|td}|t|jt|tdd}|}z|j|ddW5|XdS)Nz	%s.weeeeerMT)rNrF)rJ)rrrrFrrrrL)rZnon_existent_attrprrrrtest_new_callable_createXsz"PatchTest.test_new_callable_createcCs4|jtttttd|jttjtdttddS)N)r@rNr.)rF
ValueErrorrrr&r	r)r/rrr'test_new_callable_incompatible_with_newfsz1PatchTest.test_new_callable_incompatible_with_newcCs0|jttttdd|jttjtdtdddS)NT)rNrr.)rFr^rrr	r&r)r/rrr,test_new_callable_incompatible_with_autospecpsz6PatchTest.test_new_callable_incompatible_with_autospecc	
CsGdddt}tttt|f}|D]X}dD]N}|di}ttfd|i|}|}z|j}|	t
t|dW5|Xq*q"dS)Nc@seZdZdS)z>PatchTest.test_new_callable_inherit_for_mocks.<locals>.MockSubNrrrrrrrMockSub|srbrTrNx)r
rrr	rrrrrrrFrr)	rrbZMockClassesZKlassargr"r\rrrrr#test_new_callable_inherit_for_mocks{s z-PatchTest.test_new_callable_inherit_for_mockscCshGdddt}tt|dd}|}z$|t|||tt	|dW5|X|
|jtdS)Nc@seZdZddZdS)z>PatchTest.test_new_callable_inherit_non_mock.<locals>.NotAMockcSs
||_dSrr)rrrrrr,szGPatchTest.test_new_callable_inherit_non_mock.<locals>.NotAMock.__init__N)rrrr,rrrrNotAMocksrfTrZrr)
r&rrrrrHrrFrrrSrr))rrfr\rrrr"test_new_callable_inherit_non_mocks
z,PatchTest.test_new_callable_inherit_non_mockcsR|tGfdddt}tttd|}|||tdS)Ncs*eZdZfddZddZddZdS)z>PatchTest.test_new_callable_class_decorating.<locals>.SomeTestcs(tt|ttdSr)rr)rr~rrZmock_foorhrVrrr,szDPatchTest.test_new_callable_class_decorating.<locals>.SomeTest._testcSs||dSrr,rhrrrtest_twoszGPatchTest.test_new_callable_class_decorating.<locals>.SomeTest.test_twocSs||dSrrjrhrrrtest_oneszGPatchTest.test_new_callable_class_decorating.<locals>.SomeTest.test_oneNrrrr,rkrlrrirrSomeTestsrnrM)r)r&rrrrlrkr)rrnrrir"test_new_callable_class_decoratings

z,PatchTest.test_new_callable_class_decoratingc	sttj}tj}tjtddd}tjtddd}||fD]l}|z,t	tjd	tjdW5|Xt	tj|	tj|q8tjtdddfdd}|dS)Nr*r6)r.r0rr%cs,ttjdtjddS)Nrr%)rr)rSr.r0roriginal_foorrrrVsz+PatchTest.test_patch_multiple.<locals>.test)
r)r.r0rmultiplerrrrrS)r
original_f
original_gZpatcher1Zpatcher2rrVrrprtest_patch_multiples$
zPatchTest.test_patch_multiplecCs$|ttjt|ttjtdSr)rFr^rrrrr)r/rrrtest_patch_multiple_no_kwargssz'PatchTest.test_patch_multiple_no_kwargscsVttj}tj}tjttdtdfdd}|tj|tj|dS)Nrr.r0r7csZttj|tjdtj|t|tt|tdSNr	rr)r.rSr0r7rHrr	)r.r7rprrrVsz8PatchTest.test_patch_multiple_create_mocks.<locals>.testr)r.r0rrrrrrS)rrsrtrVrrpr test_patch_multiple_create_mockssz*PatchTest.test_patch_multiple_create_mockscsrtj}tj}ttdd}d|_ttdt}d|_|g|_|fdd}|tj|tj|dS)Nr.rr0cs tj|tjddSrx)rr)r0rSr.)r0r/rrrVszHPatchTest.test_patch_multiple_create_mocks_different_order.<locals>.test)	r)r.r0rr&attribute_nameradditional_patchersrS)rrsrtrrrVrr/r0test_patch_multiple_create_mocks_different_ordersz:PatchTest.test_patch_multiple_create_mocks_different_ordercsttj}tj}tjttdtjttdttdfdd}tjttdttdtjttdfdd}ttdtjttdtjttdfdd	}fd
d|||tj|tj|dS)N)r.rz.gcs|f|dSrrr0r"rjrrtest1sz?PatchTest.test_patch_multiple_stacked_decorators.<locals>.test1cs|f|dSrrrrjrrtest2
sz?PatchTest.test_patch_multiple_stacked_decorators.<locals>.test2cs|f|dSrrrrjrrtest3sz?PatchTest.test_patch_multiple_stacked_decorators.<locals>.test3cs|d}|d}|ttj|tj|tj|t|t	t|t	t|t	dS)Nr.r7)
poprIrr)r.r0r7rHrr	)r0r"r.r7rprrr,s


z?PatchTest.test_patch_multiple_stacked_decorators.<locals>._testrz)rrsrtrrrr)r,rqrr&test_patch_multiple_stacked_decoratorss*



z0PatchTest.test_patch_multiple_stacked_decoratorscCst}tj}tj}tjttdtd}|}zt|d}|d}|	t
|t
ddg|t||tj||tj||
t|t|
t|tW5|X|	tj||	tj|dS)Nrrwr.r7)r)r.r0rrrrrrrrSsetrr7rHrr	)rrqrsrtrr9r.r7rrr(test_patch_multiple_create_mocks_patcher*s"
z2PatchTest.test_patch_multiple_create_mocks_patchercsv|ttj}tj}Gfdddt}tjttdtd|}|}||	|
tj||
tj|dS)Ncs*eZdZfddZddZddZdS)z@PatchTest.test_patch_multiple_decorating_class.<locals>.SomeTestcsZttj|tjdtj|t|tt|tdSrxryrr.r7rqrVrrr,KszFPatchTest.test_patch_multiple_decorating_class.<locals>.SomeTest._testcSs|||dSrrjrrrrrkSszIPatchTest.test_patch_multiple_decorating_class.<locals>.SomeTest.test_twocSs|||dSrrjrrrrrlUszIPatchTest.test_patch_multiple_decorating_class.<locals>.SomeTest.test_oneNrmrrrrrnIsrnrrw)r)r.r0r&rrrrrrlrkrS)rrsrtrnrrrr$test_patch_multiple_decorating_classCs$z.PatchTest.test_patch_multiple_decorating_classcCsftjtdd}|t|jtjtddd}|z|tjdW5|X|	t
tddS)Nblam)rT)rr)rrrr)rFrrrrSrrIrrrrrtest_patch_multiple_createds
z$PatchTest.test_patch_multiple_createcCstjttddgd}|}z^|tj|dtjdtj	dtjj
dtjj	
d|tt
tjddW5|XdS)Nr+r;)r7rr7r*r6r)rrrr)rrrrSr7r+r;r+rFrr )rrr9rrrtest_patch_multiple_spec_setrsz&PatchTest.test_patch_multiple_spec_setcCsGdddt}tjttt|d}|}zT|tj|d|tj	|d|
tj||
tj	||tjtj	W5|XdS)Nc@seZdZdS)z9PatchTest.test_patch_multiple_new_callable.<locals>.ThingNrarrrrThingsr)r.r0rNr.r0)r&rrrr)rrrrr.r0r~r)rrrr9rrr test_patch_multiple_new_callablesz*PatchTest.test_patch_multiple_new_callablecCstj}tj}ttddttddttdddd}ttddttddttdddd}ttddttddttddd	d
}|||fD],}|t||tj||tj|qdS)Nr0r*missingr.cSsdSrrrrrrthing1sz3PatchTest.test_nested_patch_failure.<locals>.thing1cSsdSrrrrrrthing2sz3PatchTest.test_nested_patch_failure.<locals>.thing2cSsdSrrrrrrthing3sz3PatchTest.test_nested_patch_failure.<locals>.thing3)r)r.r0rr&rFrrS)rrsrtrrrfuncrrrtest_nested_patch_failures$z#PatchTest.test_nested_patch_failurec	Cstj}tj}tj}dd}ttddtjtd|dttdddd	}tjtd|dttddttddd
d}ttddttddtjtd|ddd
}|||fD]:}|t||tj||tj||tj|qdS)NcSstddSNcrasherrrrrrrsz4PatchTest.test_new_callable_failure.<locals>.crasherr0r*r7rMr.cSsdSrrrrrrrsz3PatchTest.test_new_callable_failure.<locals>.thing1cSsdSrrrrrrrsz3PatchTest.test_new_callable_failure.<locals>.thing2cSsdSrrrrrrrsz3PatchTest.test_new_callable_failure.<locals>.thing3)	r)r.r0r7rr&rFrrS)	rrsrtrqrrrrrrrrtest_new_callable_failures*z#PatchTest.test_new_callable_failurecCstj}tj}ttdd}d|_ttdd}d|_ttdd}d|_||g||gfD]>}||_|dd}|t||	tj||	tj|qXdS)Nr.r*r0rcSsdSrrrrrrrsz3PatchTest.test_patch_multiple_failure.<locals>.func)
r)r.r0rr&r|r}rFrrS)rrsrtrgoodbadadditionalsrrrrtest_patch_multiple_failures
z%PatchTest.test_patch_multiple_failurec
Cstj}tj}tj}dd}ttdd}d|_ttdd}d|_tjtd|d}d|_||g||gfD]L}||_|dd	}	|t	|	|
tj||
tj||
tj|qhdS)
NcSstddSrrrrrrrszCPatchTest.test_patch_multiple_new_callable_failure.<locals>.crasherr.r*r0r7rMcSsdSrrrrrrrsz@PatchTest.test_patch_multiple_new_callable_failure.<locals>.func)r)r.r0r7rr&r|r}rFrrS)
rrsrtrqrrrrrrrrr(test_patch_multiple_new_callable_failures$
z2PatchTest.test_patch_multiple_new_callable_failurecsLtdtfddi}|tjddfdd}|jddS)Nr)fishZtastynearly gone)rcsjddS)Nr)rSrrrrrrVsz=PatchTest.test_patch_multiple_string_subclasses.<locals>.test)rXstrrrrrSr)rr)rVrrr%test_patch_multiple_string_subclassessz/PatchTest.test_patch_multiple_string_subclasseszunittest.mock.patch.TEST_PREFIXr7cCslGdddt}t|dd|}|}||d||d||d||ddS)Nc@s0eZdZdZddZddZddZdd	Zd
S)z-PatchTest.test_patch_test_prefix.<locals>.FoorhcSs|jSrrr/rrrfoo_onesz5PatchTest.test_patch_test_prefix.<locals>.Foo.foo_onecSs|jSrrr/rrrfoo_twosz5PatchTest.test_patch_test_prefix.<locals>.Foo.foo_twocSs|jSrrr/rrrrlsz6PatchTest.test_patch_test_prefix.<locals>.Foo.test_onecSs|jSrrr/rrrrksz6PatchTest.test_patch_test_prefix.<locals>.Foo.test_twoN)rrrrrrrlrkrrrrr)
s
r)rchangedrh)r&rrSrrrlrkrr)r7rrrtest_patch_test_prefixsz PatchTest.test_patch_test_prefixr1csGfdddt}dditjdd|}|}||ddi||ddi||ddi||ddidS)Ncs<eZdZfddZfddZfddZfddZd	S)
z2PatchTest.test_patch_dict_test_prefix.<locals>.FoocstSrrr/Zthe_dictrrbar_one%sz:PatchTest.test_patch_dict_test_prefix.<locals>.Foo.bar_onecstSrrr/rrrbar_two'sz:PatchTest.test_patch_dict_test_prefix.<locals>.Foo.bar_twocstSrrr/rrrrl)sz;PatchTest.test_patch_dict_test_prefix.<locals>.Foo.test_onecstSrrr/rrrrk+sz;PatchTest.test_patch_dict_test_prefix.<locals>.Foo.test_twoN)rrrrrrlrkrrrrr)$sr)keyrhr)r)r&rrrSrrrlrkrrrrtest_patch_dict_test_prefix"s
z%PatchTest.test_patch_dict_test_prefixc	CsdD]x}tdtf|di}|}zL|dt||dt|j|dt||dt|jW5|XqdS)NrrrrTz name='SomeClass'z! name='SomeClass.class_attribute'z name='SomeClass()'z# name='SomeClass().class_attribute')rrrrrrFrw)rrdr\rrrrtest_patch_with_spec_mock_repr8s
z(PatchTest.test_patch_with_spec_mock_reprc	CsJtddd4}|dt|j|dt|W5QRXdS)Nunittest.test.testmock.supportTrz" name='support.SomeClass.wibble()'z$ name='support.SomeClass().wibble()')rrrFrr)rrrrrtest_patch_nested_autospec_reprGsz)PatchTest.test_patch_nested_autospec_reprc	CsdD]}tdtf|di}|}z|tg}||j|||j|||jjtg|}|	t||j|||	t||j|||jtg||jjtg||jtgW5|XqdS)NrrT)
rrrrrrrSZ
mock_callsZmethod_callsappend)rrdr\rZkallsr9rrrtest_mock_calls_with_patchPs&
z$PatchTest.test_mock_calls_with_patchc	Csptd}|t|jtd:t}|tjd<d|_td}d|_||	W5QRX|
|jddS)N
squizz.squozzsquizzr)rrFImportErrorrrr
r1r2ZsquozzrrS)rZp1rrrrtest_patch_imports_lazilyks

z#PatchTest.test_patch_imports_lazilyc	sGdddGfdddtfdd}|ddd	}td
"t}|tjd
<|t|W5QRX|jdt|	jdd
|	jdddS)Nc@seZdZdZdS)z;PatchTest.test_patch_propagates_exc_on_exit.<locals>.holder)NNNN)rrrrHrrrrholder{srcseZdZdfdd	ZeZdS)zAPatchTest.test_patch_propagates_exc_on_exit.<locals>.custom_patchNcs t|||||||f_dSr)r
__exit__rH)retypevaltbrrrrszJPatchTest.test_patch_propagates_exc_on_exit.<locals>.custom_patch.__exit__)NNN)rrrrrrrrrcustom_patch~src
s$t|\}}||tdddddi	S)NF)rr)rgetterrO)rrrwith_custom_patchszFPatchTest.test_patch_propagates_exc_on_exit.<locals>.with_custom_patchrcSstdSr)RuntimeErrorrrrrrVsz9PatchTest.test_patch_propagates_exc_on_exit.<locals>.testrrr*zexception value not propagatedr6z"exception traceback not propagated)
r
rr
r1r2rFrrrHZassertIsNotNone)rrrVrr)rrr!test_patch_propagates_exc_on_exitzs 


z+PatchTest.test_patch_propagates_exc_on_exitcCspdD]f}tdtfddi|di}|t|j|tddttfddi|di}||qdS)Nrrrz%s.doesnotexistrTcSstSr)doesnotexistrrrrrr-z1PatchTest.test_create_and_specs.<locals>.<lambda>)rrrFrGrrMODNAMEr)rkwargr\rrrtest_create_and_specsszPatchTest.test_create_and_specscCst}dD]6}ttfddi|di}|t|j|t|qdD]6}ttfddi|di}|t|j|t|qDdD]6}ttfddi|di}|t|j|t|qdS)Nrrrrrr)rrr)rjrrrFrGrr)rrhrr\rrrtest_multiple_specsszPatchTest.test_multiple_specscCs8ttdddd}|}z|jd|_W5|XdS)NFrr)rrrrZdoes_not_exist)rr\rurrr test_specs_false_instead_of_nones
z*PatchTest.test_specs_false_instead_of_nonec	CsFdD]<}ttf|di}|}z|tt|dW5|XqdS)NrrZdoesnotexit)rrrrrFrrrrr\rrrrtest_falsey_specszPatchTest.test_falsey_specc	Cs`dD]V}ttfddi|di}|}z&|tt|dd|tt|dW5|XqdS)NrrTrre)rrrrrFrr rrrrrtest_spec_set_trues
zPatchTest.test_spec_set_truecCs:d}tt|d}|}z|t|W5|XdS)N)__call__r)rrrrrHcallablerrr\rrrrtest_callable_spec_as_listsz$PatchTest.test_callable_spec_as_listcCs:d}tt|d}|}z|t|W5|XdS)Nrr)rrrrrIrrrrrtest_not_callable_spec_as_listsz(PatchTest.test_not_callable_spec_as_listcs^tjtjtj}tdttdttdfdd}|tj|dS)Nz	os.unlinkzos.chdirzos.pathcs6ttj|tjtjdSr)rstopallrrpathunlinkchdir)Z	mock_pathrrrrrrsz-PatchTest.test_patch_stopall.<locals>.patched)	rrrrrrerrkr)rrrrrrtest_patch_stopallszPatchTest.test_patch_stopallcsRgGdddtfddfdddDt|dd	d
gdS)Nc@seZdZdZZZdS)z*PatchTest.test_stopall_lifo.<locals>.thingN)rrronetwothreerrrrrsrc
s8Gfdddtfddddddddi	S)Ncs"eZdZfddZZS)z?PatchTest.test_stopall_lifo.<locals>.get_patch.<locals>.mypatchcst|Sr)rsuperrr/)	__class__rOmypatchstoppedrrrs
zDPatchTest.test_stopall_lifo.<locals>.get_patch.<locals>.mypatch.stop)rrrr
__classcell__r)rOrr)rrrsrcsSrrrrrrrr-z@PatchTest.test_stopall_lifo.<locals>.get_patch.<locals>.<lambda>F)r
)rO)rr)rOrr	get_patchsz.PatchTest.test_stopall_lifo.<locals>.get_patchcsg|]}|qSr)r).0r)rrr
<listcomp>
sz/PatchTest.test_stopall_lifo.<locals>.<listcomp>)rrrrrr)r&rrrSr/r)rrrrtest_stopall_lifoszPatchTest.test_stopall_lifoc	Cs>ddd}t|dd||dW5QRX||dt|dd||jdW5QRX||jd	t|d
d||jdW5QRX||jdt|d
tdg||jtdgW5QRX||jtdddd}t|dtdg||dW5QRX||ddS)NrcSs|S)TESTrrcrrrr7sz)PatchTest.test_special_attrs.<locals>.foo__defaults__)r*r*__doc__ZFUNrrZ
testpatch2z unittest.test.testmock.testpatch__annotations__)sr*rcWs|Srr)rcr+rrrr7's__kwdefaults__)rcr*)r)rr&rSrrrr)rr7rrrtest_special_attrss"
zPatchTest.test_special_attrsc	CsXddl}td<tjd=tjd=tjd=tjd=tddd	}|W5QRXdS)
Nrzsys.modulesrzunittest.test.testmockz
unittest.testrI unittest.test.testmock.support.XcSsdSrrrrrrrV:sz9PatchTest.test_dotted_but_module_not_loaded.<locals>.test)unittest.test.testmock.supportrrr1r2)rrIrVrrr!test_dotted_but_module_not_loaded-s
z+PatchTest.test_dotted_but_module_not_loadedc	Cs"|ttdW5QRXdS)N)rFrGrr/rrrtest_invalid_target@szPatchTest.test_invalid_targetc	Cs8tdtdddd}|t|W5QRXdS)Nrr*)r@rccSsdSrrrrrrrVFsz@PatchTest.test_cant_set_kwargs_when_passing_a_mock.<locals>.test)rr&rFrGrYrrr(test_cant_set_kwargs_when_passing_a_mockEs
z2PatchTest.test_cant_set_kwargs_when_passing_a_mockN)T)mrrrrLrZr\r^rcrirvryrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr#r$r'r4r8r:r>r?rArDrErGrLrPrQrYr[r]r_r`rergrorurvr{r~rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrETs


+*

			
!
	
	


C	




+!

	"



rE__main__)T)(rr1rIZunittest.test.testmockrrrrZtest.test_importlib.utilrZ
unittest.mockrrrr	r
rrr
rrrrsr2rrjrr(rPrerlrkr&r)rr<r=ZTestCaserEmainrrrr<module>sB4



Zerion Mini Shell 1.0