o =?h)@sddlZddlZddlZddlZddlmZddlZddlmZddlm Z ddl m Z m Z m Z mZmZmZmZmZmZmZmZmZmZGdddeZGdd d eZGd d d Zd d ZGdddejZedkrre dSdS)N) ALWAYS_EQ) is_instancemock) callDEFAULTpatchsentinel MagicMockMockNonCallableMockNonCallableMagicMock AsyncMock_Call _CallListcreate_autospecInvalidSpecErrorc@s(eZdZddZddZddZeZdS)ItercCstgd|_dS)NthisisZaniter)rthingselfrF/opt/alt/python310/lib64/python3.10/unittest/test/testmock/testmock.py__init__z Iter.__init__cCs|SNrrrrr__iter__z Iter.__iter__cCs t|jSr)nextrrrrrr" z Iter.nextN)__name__ __module__ __qualname__rr r"__next__rrrrrs rc@s2eZdZdddZedddZedddZdS) SomethingNcCdSrrrabcdrrrmeth zSomething.methcCr)rr)clsr+r,r-r.rrrcmeth"r!zSomething.cmethcCr)rrr+r,r-r.rrrsmeth%r!zSomething.smethr)r$r%r&r/ classmethodr2 staticmethodr4rrrrr(s   r(c@seZdZdZdZdZdS)TyposN)r$r%r& autospect auto_specset_specrrrrr7)sr7cCr)rrr+rrr something/r0r<c@s|eZdZddZddZddZddZd d Zd d Zd dZ ddZ ddZ ddZ ddZ ddZddZddZddZdd Zd!d"Zd#d$Zd%d&Zd'd(Zd)d*Zd+d,Zd-d.Zd/d0Zd1d2Zd3d4Zd5d6Zd7d8Zd9d:Zd;d<Z d=d>Z!d?d@Z"dAdBZ#dCdDZ$dEdFZ%dGdHZ&dIdJZ'dKdLZ(dMdNZ)dOdPZ*dQdRZ+dSdTZ,dUdVZ-dWdXZ.dYdZZ/d[d\Z0d]d^Z1d_d`Z2dadbZ3dcddZ4dedfZ5dgdhZ6didjZ7dkdlZ8dmdnZ9dodpZ:dqdrZ;dsdtZdydzZ?d{d|Z@d}d~ZAddZBddZCddZDddZEddZFddZGddZHddZIddZJddZKddZLddZMddZNddZOddZPddZQddZRddZSddZTddZUddZVddZWddZXddZYddZZddZ[ddZ\ddZ]ddZ^ddZ_ddZ`ddZaddZbdd„ZcddĄZdddƄZeddȄZfddʄZgdd̄Zhdd΄ZiddЄZjdd҄ZkddԄZlddքZmdd؄ZnddڄZodd܄ZpddބZqddZrddZsddZtddZuddZvddZwddZxddZyddZzddZ{ddZ|ddZ}ddZ~ddZddZddZddZddZddZddZddZd d Zd d Zd dZddZddZdS(MockTestcCs tddS)Nzfrom unittest.mock import *)execrrrrtest_all4s zMockTest.test_allcCst}||jd||jdd|t|jtd||jdd||j gd||j gd| d|j d | |jd | |jd ||jid dS) Nz called not initialised correctlyrz$call_count not initialised correctlyz&return_value not initialised correctlyz#call_args not initialised correctly(call_args_list not initialised correctlyz&method_calls not initialised correctlyZ_itemsz/default mock should not have '_items' attributez parent not initialised correctlyz!methods not initialised correctlyz$children not initialised incorrectly)r assertFalsecalled assertEqual call_count assertTruer return_value call_argscall_args_list method_calls assertNotIn__dict__ assertIsNone _mock_parent _mock_methods_mock_childrenrrrrrtest_constructor;s:      zMockTest.test_constructorcCstdd}||jddS)NrFz(return value in constructor not honoured)r rLrFrPrrr test_return_value_in_constructorWs z)MockTest.test_return_value_in_constructorcCs*dd}t|}d|j_||ddS)NcSr)rrrrrrf^r0z9MockTest.test_change_return_value_via_delegate..f)rrrFrCrrTrrrr%test_change_return_value_via_delegate]sz.MockTest.test_change_return_value_via_delegatecCsPdd}t|}t|j_|t |WddS1s!wYdS)NcSr)rrrrrrrTer0z8MockTest.test_change_side_effect_via_delegate..f)r TypeErrorr side_effect assertRaisesrVrrr$test_change_side_effect_via_delegateds   "z-MockTest.test_change_side_effect_via_delegatecCstdd}|dt||dt|t|tdftdddfg}|D]P\}}|d|t|j|d|t||d|t|j|d |t||d |t||d |t|jjjq'dS) Nfoonamez'%s'rbarz%s.barz%s.foo()z %s.foo().bingz%s()z%s()()z%s()().foo.bar.baz().bing)r assertInrepridr_r\Zbingbaz)rrmocksr^rrr test_reprls   zMockTest.test_reprcCsGdddt}t|d}|dt|t|d}|dt|t|d}|dt|t|d}|dt|t|dd}|dt||d t|tdd }|d t|t}|d t|tdgd}|d t|dS) Nc@ eZdZdS)z'MockTest.test_repr_with_spec..XNr$r%r&rrrrX}rhspecz spec='X' spec_setz spec_set='X' r\)rkr^z name='foo' r]rk)objectr r`rarJrrhrrrrtest_repr_with_spec|s$       zMockTest.test_repr_with_speccst}dd}||_|jt|dddd|jddddgdfdd}||_||||ggd d ttjd }||jtjd d d}t|tjd}||tjdS)Nc_td)NZkablooie) SystemError)argskwargsrrreffectz)MockTest.test_side_effect..effectrUfishrUrwrxcSrpoprZresultsrrrurvrxrwrUzside effect not used correctlyrYz#side effect in constructor not usedcStSrrrrrrrYr!z.MockTest.test_side_effect..side_effect)rYrF) r rYrZrrassert_called_withrCr SideEffectRETURN)rrrurYrrrtest_side_effects$   zMockTest.test_side_effectcsgdfdd}dd}t|}gd|_||||ggddgdt|}||_||||ggdddS) Nr{cr|rr}rrrrrurvz2MockTest.test_autospec_side_effect..effectcSr)rrrrrrrTr0z-MockTest.test_autospec_side_effect..fz1side effect not used correctly in create_autospecrz'callable side effect not used correctly)rrYrC)rrurTrrrrtest_autospec_side_effects  z"MockTest.test_autospec_side_effectcCs,dd}t|}td|_|td|dS)NcSr)rrrrrrrTr0z7MockTest.test_autospec_side_effect_exception..fzBazinga!)r ValueErrorrYassertRaisesRegexrVrrr#test_autospec_side_effect_exceptions z,MockTest.test_autospec_side_effect_exceptionc CsGdddt}tj|d|td t|jWdn1s&wY|tdtjj|dddWdn1sGwY|tdtjj|jd ddWdn1siwY|td tjj|d|jd Wdn1swY|td tjj|d|jd Wdn1swYWddSWddS1swYdS)Nc@seZdZGdddeZdS)z&MockTest.test_autospec_mock..Ac@seZdZdZdS)z(MockTest.test_autospec_mock..A.BN)r$r%r&CrrrrBrN)r$r%r&rnrrrrrAsrrz8Cannot autospec attr 'B' from target t}|t|jtd|}|||d||tj}||jd||j dd||j tjfifd||j j tjfd||j j id||j tjfifgdtj|_|tjtjd}||tjd ||j d d||j tjfd tjifd||j tjfiftjfd tjifgd dS) Nz%Default return_value should be a Mockz'different result from consecutive callszcalled not setrUzcall_count incorrectzcall_args not setr@)keyzincorrect return valuerwrzcall_args_list not set)r rErrFrCrr ArgrBrDrGrsrtrHZ ReturnValueZKeyArg)rrresultZret_valrrr test_callsP     zMockTest.test_callc Cst}||tj|tjd|tjtjd||jdtjffdtjiftjfdtjifg||jtjfdtjif||jjtjf||jjdtji| |jdkdS)N)kwrrza long sequence) r r rZKwargrCrHrGrsrtrArPrrrtest_call_args_comparison@s"   z"MockTest.test_call_args_comparisoncCs2t}|||k|||k||tk||tk||tjk||tjk|tj|k|tj|k||tk||tktt}ttj}|||k|||k|||k|||k||tk||tk||dk||dkdS)NrU)rr rErAANYrr)rZmmZcall1Zcall2rrrtest_calls_equal_with_anyVs* z"MockTest.test_calls_equal_with_anycCsdt}|||t|jd||t|j|dddddd|jdddddddS)NrUrwrxrzZnothingr+r,)r rrZAssertionErrorrrPrrrtest_assert_called_withrsz MockTest.test_assert_called_withcCs t}|t|tjdSr)r rrrrmrrrtest_assert_called_with_anys z$MockTest.test_assert_called_with_anycCsd dd}t|d}|dddd|ddd|jdddd|jt|jdddd|t}|jd d Wdn1sAwY||jjtdS) NcSr)rrr3rrrrTr0z9MockTest.test_assert_called_with_function_spec..frjrUrwrxr,r-r+r,r-er)r rrZrassertIsInstance exception __cause__rXrrTrcmrrr%test_assert_called_with_function_specs    z.MockTest.test_assert_called_with_function_speccszfdd}ttjd}||ttjd}||ttjd}||ttjd}||ttjd}||dS)NcsF|dddd|ddd|jddddjt|jdddddS)NrUrwrxrr)rrZrrrrr_checks   z._checkrj)r r(r/r2r4)rrrrrr#test_assert_called_with_method_specs    z,MockTest.test_assert_called_with_method_speccCsd}|t|d tWdn1swY|t|dtddWddS1sz7MockTest.test_assert_called_once_with..)r rrZrrrrrrtest_assert_called_once_withs z%MockTest.test_assert_called_once_withcs6tdd|ttdfdddS)NrUrwzCalls: [call(1), call(2)]cs dS)Nrwrrrrrr zAMockTest.test_assert_called_once_with_call_list..)r rrreescaperrrr&test_assert_called_once_with_call_lists z/MockTest.test_assert_called_once_with_call_listcCsddd}t|d}|dddd|ddd|jdddd|jt|jdddd|t}|jd d Wdn1sAwY||jjt|d d d |t|jddd|t|jd d d dS)NcSr)rrr3rrrrTr0z>MockTest.test_assert_called_once_with_function_spec..frjrUrwrxrrrrr)r rrZrrrrrXrrrr*test_assert_called_once_with_function_specs&       z3MockTest.test_assert_called_once_with_function_speccCsbt}|j}|t|td||j|dt}d|j_||dd||jjddS)Nzattribute isn't a mockz+different attributes returned for same namerxzmethod returned wrong valuez!method didn't record being called)r r<rErrCrFrBrrr<rrr#test_attribute_access_returns_mockss  z,MockTest.test_attribute_access_returns_mockscCs0t}|j}||jdd||j|ddS)Nr<z attribute name not set correctlyz"attribute parent not set correctly)r r<rCrrMrrrr(test_attributes_have_name_and_parent_sets  z1MockTest.test_attributes_have_name_and_parent_setcCstt}|jddd|jjdtjd||jjdddtjifgd||jdd d difd ddtjifgddS) Nrxryr)caker<)rrz#method calls not recorded correctly)rxrzzsomething_else.something)r r<something_elser ZCakerCrIrPrrrtest_method_calls_recordeds  z#MockTest.test_method_calls_recordedcCst}|||jdg||jddifgt}|d||jdg||jddifgt}|jdd||jdd difg||jddd difgt}|jdd d ||jddd d ifgdS) Nrr<r different)r<rrrUxrZmore)somer)r r<rCrIrPrrr test_method_calls_compare_easilys&     z)MockTest.test_method_calls_compare_easilyc CsHdgdfD]}dD]}tdi||i}|j|tdt|dq qdS)Nr<r)rkrmz-Mock object has no attribute 'something_else'rr)r r<rAttributeErrorgetattr)rrkargrrrrtest_only_allowed_methods_exist*sz(MockTest.test_only_allowed_methods_existcs>Gdddt}fdd}|t|d|t|ddS)Nc@seZdZdZdZddZdS)z*MockTest.test_from_spec..SomethingrxNcSr)rrrrrry<r0z,MockTest.test_from_spec..Something.y)r$r%r&r __something__rrrrrr(9s r(cs:|j|j|jtdt|dtdt|ddS)Nz Mock object has no attribute 'z'zz)Mock object has no attribute '__foobar__'Z __foobar__)rrrrrrrrrrtest_attributes>sz0MockTest.test_from_spec..test_attributesrj)rnr )rr(rrrrtest_from_spec8s zMockTest.test_from_speccCsJt}t|d}|||||dddd|jdddddS)NwrapsrUrwrxry)r rCrrrrealrrrrtest_wraps_callsRs  zMockTest.test_wraps_callscs8Gdddt}|}t|d|tfdddS)Nc@rf)zFMockTest.test_wraps_prevents_automatic_creation_of_mocks..RealNrgrrrrReal_rirrcr|r)Znew_attrrrrrrezJMockTest.test_wraps_prevents_automatic_creation_of_mocks..)rnr rZr)rrrrrr/test_wraps_prevents_automatic_creation_of_mocks^s z8MockTest.test_wraps_prevents_automatic_creation_of_mockscCs4t}t|d}d|_||d||jdS)Nrrx)r rFrCrArBrrrr,test_wraps_call_with_nondefault_return_valuehs  z5MockTest.test_wraps_call_with_nondefault_return_valuecsGdddt}|}t|d|||tfdd|j|jjjdddd }|jjjdddd |||jdS) Nc@seZdZeZdS)z,MockTest.test_wraps_attributes..RealN)r$r%r&r attributerrrrrss rrcjSrryrrrrrzz0MockTest.test_wraps_attributes..rUrwrxry) rnr rCrrZrassertNotEqualZfrogr)rrrrrrrtest_wraps_attributesrs zMockTest.test_wraps_attributescCsdGdddt}|}t|d}tjtg|j_||tj||tj| t |jdS)Nc@eZdZddZdS)z[MockTest.test_customize_wrapped_object_with_side_effect_iterable_with_default..RealcStjSr)r ORIGINAL_VALUErrrrmethodzbMockTest.test_customize_wrapped_object_with_side_effect_iterable_with_default..Real.methodNr$r%r&rrrrrr rr) rnr r VALUE1rrrYrCrrZ StopIterationrrrrrrrDtest_customize_wrapped_object_with_side_effect_iterable_with_defaults zMMockTest.test_customize_wrapped_object_with_side_effect_iterable_with_defaultcCsfGdddt}|}t|d}tjtjg|j_||tj||tj|t |jdS)Nc@r)zNMockTest.test_customize_wrapped_object_with_side_effect_iterable..RealcSr)rrrrrrrr0zUMockTest.test_customize_wrapped_object_with_side_effect_iterable..Real.methodNrrrrrrrrr) rnr r rVALUE2rrYrCrZrrrrr7test_customize_wrapped_object_with_side_effect_iterables z@MockTest.test_customize_wrapped_object_with_side_effect_iterablecCs:Gdddt}|}t|d}t|j_|t|jdS)Nc@r)zOMockTest.test_customize_wrapped_object_with_side_effect_exception..RealcSr)rrrrrrrr0zVMockTest.test_customize_wrapped_object_with_side_effect_exception..Real.methodNrrrrrrrrr)rnr RuntimeErrorrrYrZrrrr8test_customize_wrapped_object_with_side_effect_exceptions  zAMockTest.test_customize_wrapped_object_with_side_effect_exceptioncCsFGdddt}dd}|}t|d}||j_||tjdS)Nc@r)zNMockTest.test_customize_wrapped_object_with_side_effect_function..RealcSr)rrrrrrrr0zUMockTest.test_customize_wrapped_object_with_side_effect_function..Real.methodNrrrrrrrrcSrr)r VALUErrrrrYrzUMockTest.test_customize_wrapped_object_with_side_effect_function..side_effectr)rnr rrYrCr r)rrrYrrrrr7test_customize_wrapped_object_with_side_effect_functions  z@MockTest.test_customize_wrapped_object_with_side_effect_functioncCs@Gdddt}|}t|d}tj|j_||tjdS)Nc@r)zFMockTest.test_customize_wrapped_object_with_return_value..RealcSr)rrrrrrrr0zMMockTest.test_customize_wrapped_object_with_return_value..Real.methodNrrrrrrrrr)rnr r rrrFrCrrrr/test_customize_wrapped_object_with_return_values   z8MockTest.test_customize_wrapped_object_with_return_valuecCspGdddt}|}t|d}tjtjg|j_tj|j_| |tj| |tj| t |jdS)Nc@r)zVMockTest.test_customize_wrapped_object_with_return_value_and_side_effect..RealcSr)rrrrrrrr0z]MockTest.test_customize_wrapped_object_with_return_value_and_side_effect..Real.methodNrrrrrrrrr) rnr r rrrrYZ WRONG_VALUErFrCrZrrrrr?test_customize_wrapped_object_with_return_value_and_side_effects  zHMockTest.test_customize_wrapped_object_with_return_value_and_side_effectcCsLGdddt}|}t|d}dd|j_tj|j_||tjdS)Nc@r)zWMockTest.test_customize_wrapped_object_with_return_value_and_side_effect2..RealcSr)rrrrrrrr0z^MockTest.test_customize_wrapped_object_with_return_value_and_side_effect2..Real.methodNrrrrrrrrrcSrrrrrrrrr0z[MockTest.test_customize_wrapped_object_with_return_value_and_side_effect2..)rnr rrYr rrFrCrrrr@test_customize_wrapped_object_with_return_value_and_side_effect2s    zIMockTest.test_customize_wrapped_object_with_return_value_and_side_effect2cCsnGdddt}|}t|d}tjtg|j_tj|j_| |tj| |tj| t |jdS)Nc@r)z^MockTest.test_customize_wrapped_object_with_return_value_and_side_effect_default..RealcSr)rrrrrrrr0zeMockTest.test_customize_wrapped_object_with_return_value_and_side_effect_default..Real.methodNrrrrrrrrr) rnr r rrrrYrrFrCrZrrrrrGtest_customize_wrapped_object_with_return_value_and_side_effect_defaults  zPMockTest.test_customize_wrapped_object_with_return_value_and_side_effect_defaultcCsddi}t|d}||dd||dt|d|vd|j_||ddtj|j_||dd||dd||dt|d|vd|d<||dd||dt|d|v|d=||dddS)Nr\r_rrFrcspam)r rCgetrrArFr r)rdataZ wrapped_dictrrrtest_magic_method_wraps_dicts$  z%MockTest.test_magic_method_wraps_dictcCsTGddd}t|d}|}||dd||dd||ddS)Nc@eZdZddZddZdS)z3MockTest.test_magic_method_wraps_class..FoocSs|Srr)rindexrrr __getitem__r!z?MockTest.test_magic_method_wraps_class..Foo.__getitem__cSdSNr\rrrrr__custom_method__r!zEMockTest.test_magic_method_wraps_class..Foo.__custom_method__N)r$r%r&r rrrrrFoo s rrrwr\)r rCr r)rrklassobjrrrtest_magic_method_wraps_class s  z&MockTest.test_magic_method_wraps_classcC4ttd}|t|ttdd}|t|dSNrr\)r rrZrPrrrtest_exceptional_side_effect  z%MockTest.test_exceptional_side_effectcCrr)r KeyboardInterruptrZrPrrr test_baseexceptional_side_effect%rz)MockTest.test_baseexceptional_side_effectcCst}|td|jdS)Nz not called)r rrrrPrrrtest_assert_called_with_message-sz(MockTest.test_assert_called_with_messagecCstdd}|td|jdS)NZgeoffreyr]z'Expected 'geoffrey' to be called once\.)r rrrrPrrr$test_assert_called_once_with_message3s z-MockTest.test_assert_called_once_with_messagecs2t|tfddd_|jddS)Ncrr)r$rrrrr<rz'MockTest.test__name__..r\)r rZrr$rCrrrr test__name__:szMockTest.test__name__cCsJGdddt}t|dgd}|d|jd|tt|ddS)Nc@rf)z-MockTest.test_spec_list_subclass..SubNrgrrrrSubCrirr\rjrx)listr appendrrZrr)rrrrrrtest_spec_list_subclassBs   z MockTest.test_spec_list_subclasscCsGdddt}t|d}|||t|d}|||||j||tjjdt|d}|||t|d}|||dS)Nc@rf)z#MockTest.test_spec_class..XNrgrrrrrhMrirhrjr rl)rnr rassertIs __class__rCr$rorrrtest_spec_classLs       zMockTest.test_spec_classcCsGddd}t|d}|||t|d}|||||j||tjjdt|d}|||t|d}|||dS)Nc@rf)z2MockTest.test_spec_class_no_object_base..XNrgrrrrrharirhrjr rl)r rr r!rCr$rorrrtest_spec_class_no_object_base`s       z'MockTest.test_spec_class_no_object_basecsLGdddt}t|dd_t|dfdd}d_|t|dS)Nc@eZdZdZdS)z8MockTest.test_setting_attribute_with_spec_set..XrxN)r$r%r&rrrrrrhurrhrjr\rlc d_dSr rrrrrset_attr|r#z?MockTest.test_setting_attribute_with_spec_set..set_attr)rnr rrrZr)rrhr&rrr$test_setting_attribute_with_spec_setts   z-MockTest.test_setting_attribute_with_spec_setcCs4t}|tj|ttdttdS)NgeA)sysgetrecursionlimit addCleanupsetrecursionlimitintcopyr )rZcurrentrrr test_copyszMockTest.test_copycs\Gdddt}||d|jdfdd}|t|fdd}|t|dS)Nc@s&eZdZddZddZeeeZdS)z8MockTest.test_subclass_with_properties..SubClasscSr Nrxrrrrr_getr!z=MockTest.test_subclass_with_properties..SubClass._getcSrq)Nz strange error) NameError)rvaluerrr_setrvz=MockTest.test_subclass_with_properties..SubClass._setN)r$r%r&r0r3propertysome_attributerrrrSubClasssr6rlrxcr%r/)r5rsrrtestr#z4MockTest.test_subclass_with_properties..testcr%)Nr_r\rr7rrr9r#)r rCr5rZr1r)rr6r9rr7rtest_subclass_with_propertiess    z&MockTest.test_subclass_with_propertiescCs>t}dd}|t|_|d|d|t|dddS)NcSs||||Sr)Z_increment_mock_callZ _mock_callrrrr__call__s  z,MockTest.test_setting_call..__call__onetwo)r typer<rrZrX)rrr<rrrtest_setting_calls   zMockTest.test_setting_callcCst}tt|}tddttD}|t|||j|jf|dt||dt|d|_|_|dt||dt|dd|_ |d t|dS) NcSsg|] }|ds|qS)_) startswith).0rrrr sz%MockTest.test_dir..r+r,r-r.cSstgSr)rr7rrrrrz#MockTest.test_dir..r ) r setdirrCr+r,r`r-r.r )rrattrs type_attrsrrrtest_dirs    zMockTest.test_dircCsXttjd}tttj}tt|}|t||d|_|t|dddS)NrjrxversionrU)r unittestTestCaserErFrCrJcount)rrZtestcase_attrsrGrrrtest_dir_from_specs  zMockTest.test_dir_from_speccCs\ttdd}|zttt}ttt}|t||W|dS|w)NZ FILTER_DIRF) rrnrrrErFr rCstop)rZpatcherrGrHrrrtest_filter_dirs zMockTest.test_filter_dircCs6t}d|j_|dt||`|dt|dS)NrUr)r rrFr`rFrJrPrrr,test_dir_does_not_include_deleted_attributess z5MockTest.test_dir_does_not_include_deleted_attributescCstdd}||jdtdd}||jdtdtd}tdi|}|t|||jd||jtt}|jdi||t|||jd||jtdS)Nr_r:!)rYzfoo.bar.return_valuer\r) r rCr\r KeyErrorrZr_rZconfigure_mock)rrrtrrrtest_configure_mocks    zMockTest.test_configure_mockcOsR||}||i|Wdn1swYt|j}|||dSr)rZstrrrC)rrmessagefuncrsrtcontextrrrrassertRaisesWithMsgs  zMockTest.assertRaisesWithMsgc Cst}d}d}d}|jt|||f|jddddd|jddddd |jj|jjg}|D]}d }d }d}|jt|||f|dddddq-|D]}d }d }d}|jt|||f|ddqH|D]}d }d }d}|t|||f|dddq`|D]}d }d}d}|t|||f|qydS)Nz not called.zmock(1, '2', 3, bar='foo')z0expected call not found. Expected: %s Actual: %srU2rxr\)r_r:zfoo(1, '2', 3, foo='foo')zfoo(1, '2', 3, bar='foo')zfoo(bar='foo')z foo(1, 2, 3)rwzfoo())r rYrrr\r)rrZactualexpectedrVZ assertersr/rrr'test_assert_called_with_failure_messagesV       z0MockTest.test_assert_called_with_failure_messagec Cst}||jgkdt}|ddifg}||j|||t||j|||jjddifgt}|jdddddd ddifd d tddd fg}||j|||jjjdd tddd fg||jjd d tddd fgt}|j ddifd difddifg}||j|||jtj ttddfD]}tdi|}t |jddifg}||j|tdi|}| ddifddifg}||j||| jtgtdi|}|ddd||jtddd ||jtdd ||jtd tdi|}|dddj jd||jtdddj jd ||jtddj jd ||jtdj jd tdi|}t |j ddif}||jd|||jtj  ||j jt  ||j j jt qdS)NTrrUrwrxrrrz().foor{r\z ().foo.barz().foo.bar().bazr_r]z foo.__int__r+za()z().foo.bar().baz().__int__)r r rrCr\rrdictrFr_rc call_listr,r+r,r-__int__)rrr[rtZ last_callrrrtest_mock_calls=s            zMockTest.test_mock_callscCsFt}|}|||jttg||jtgdSr)r ZwibblerCrr)rrrrrrtest_child_mock_call_equals z#MockTest.test_child_mock_call_equalcCsFt}|||jdt||jdtdSNrUr)r r\r<rrrrrCrrrrtest_mock_call_not_equal_leaf z&MockTest.test_mock_call_not_equal_leafcCsFt}|||jdt||jdtdSrdr r\r_rrrrcrrrr!test_mock_call_not_equal_non_leafrfz*MockTest.test_mock_call_not_equal_non_leafcCs8t}|jdd||jdtjdddS)NrUrrw)r r\r_rCrrrrrr2test_mock_call_not_equal_non_leaf_params_differents"z;MockTest.test_mock_call_not_equal_non_leaf_params_differentcCs,t}|j||jdtjdSNrrgrrrr&test_mock_call_not_equal_non_leaf_attrs z/MockTest.test_mock_call_not_equal_non_leaf_attrcCs.t}|j||jdtdSrj)r r\r_rrrrrrr2test_mock_call_not_equal_non_leaf_call_versus_attrs z;MockTest.test_mock_call_not_equal_non_leaf_call_versus_attrcCs^t}|j|t|jdd|t|jdd|t|jdddS)Nrz call.foo()rUzcall.foo().bar()rwzcall.foo().bar().baz.bob())r r\r_rcrrCrarrrrrtest_mock_call_reprs zMockTest.test_mock_call_reprcCs0t}||_t||t|ddS)Nz)r r\raZ assertRegexrrrrtest_mock_call_repr_loops z!MockTest.test_mock_call_repr_loopcCst}|tg|jvdSr)r rArrrrrrtest_mock_calls_containssz!MockTest.test_mock_calls_containscCshGdddt}|}||j||||Gdddt}|}||j||||dS)Nc@rf)+MockTest.test_subclassing..SubclassNrgrrrrSubclassrirqc@r)rpc[stdi|S)Nr)r )rrtrrr_get_child_mocksz;MockTest.test_subclassing..Subclass._get_child_mockN)r$r%r&rrrrrrrqr)r rr\assertNotIsInstance)rrqrrrrtest_subclassingszMockTest.test_subclassingcsttttg}fdd}|D]=}||t|r1||dd|dd|||||jjddd|dd|||qdS)Ncs@d}|D]}t||}|t|t|gqdS)N)rHrIr)rrrrrC)rnamesr^attrrrr assert_attrss   z-MockTest.test_arg_lists..assert_attrsrUrwrxr;) r r r r callablerr\r_rc)rrdrwrrrrtest_arg_listss(    zMockTest.test_arg_listscCst}|ddd|ddd|t|jd||jjd||jjtdddtddfdtddfg}t||jD] \}}|t|d||d |d ||d|dq?dS) NrUrxr;rwrr,)rwrUr) r rClenrGrsrtr_ziprH)rrZ expected_listr[rGrrrtest_call_args_two_tuples  z!MockTest.test_call_args_two_tuplecCsttgdd}||||ggd|t|tgdd}||||ggd|t|tdd}||||ggd|t|Gdddt}t|d}|||ttd}|||||ggd|t|dS) Nr{rrZghi)ghic@rf)z/MockTest.test_side_effect_iterator..FooNrgrrrrrrirr) r rrCrZrr rnrr)rrrrrrtest_side_effect_iterators"      z"MockTest.test_side_effect_iteratorcCs\ttfD]'}tdtdf}||d}|t|||d|t|||dqdS)Nrxrr)r r rrSrZrC)rKlassiterablerrrr$test_side_effect_iterator_exceptions&s     z-MockTest.test_side_effect_iterator_exceptionscCst}tgd|_||||ggd|t||j}||ttggd|_||||ggd|t||j}||ttgt}||_|||||ggd|t|| |j|dS)Nr{rr) r rrYrCrZrrr?rr )rrrYZ this_iterrrr!test_side_effect_setting_iterator0s$    z*MockTest.test_side_effect_setting_iteratorcCs4tdd}tdtg|_|||gddgdS)NrwrRrU)r rrrYrCrPrrr!test_side_effect_iterator_defaultEs z*MockTest.test_side_effect_iterator_defaultc Cst}|dd|dd|dd|dd|ddtddddifd d ddifd d ddifd d ifd d ddifg}|D] }|j|gddq>tddtddtdddfD] }|jt|j|gddqXtddtddgtddtddgtddtddgg}|D] }|j|ddqtddtddtddgtddtddgtddtddtddgtddtddtddtddtddgg}|D] }|jt|j|ddqdS)NrUrwrxr;rrrzr+)rxrr)r]rUrwr]rTZ any_orderrZr\r)r rassert_has_callsrZr)rrkallskallZ kall_listsZ kall_listrrrtest_assert_has_calls_any_orderJsF       "*z(MockTest.test_assert_has_calls_any_orderc Cstddddifdtdddd d difg}ttdg}|tjdd |tjtid  dgg}t t fD]#}|dd|dd |dd |dd|ddd| ||fqDt }||d|jdd |jtid  dg| ||f|D]1\}}t t|D]&}dD]!}||||}||t|dkr|t|jtt|qqqdS)NrUrwr+rxrrrzr]r{r,r;r:rr{)rr\r_extendrrcr`ZbamrErzr r rranger|rrZrrreversed) rZkalls1Zkalls2rdrrrstepZtheserrrtest_assert_has_callsvsH  "          zMockTest.test_assert_has_callsc CsDGddd}t|}||fD]$}|jddddd|tjdddddg|tddddgq|||fD]6}|t|jtg|ddd|tdtdddg|jtdtddgq>|tdt dt dtddddg}|D] }|t|j|gqdS)Nc@s,eZdZddZdddZGdddZdS) z=MockTest.test_assert_has_calls_nested_spec..SomethingcSr)rrrrrrrr0zFMockTest.test_assert_has_calls_nested_spec..Something.__init__NcSr)rrr*rrrr/r0zBMockTest.test_assert_has_calls_nested_spec..Something.methc@r )zAMockTest.test_assert_has_calls_nested_spec..Something.FoocSr)rrrrrrrr0zJMockTest.test_assert_has_calls_nested_spec..Something.Foo.__init__cSr)rr)rr+r,rrrmeth1r0zGMockTest.test_assert_has_calls_nested_spec..Something.Foo.meth1N)r$r%r&rrrrrrrs rr)r$r%r&rr/rrrrrr(s r(rUrwrxr.r) rr/rrrrZrrrZ non_existent)rr(Z mock_classrZ invalid_callsrrrr!test_assert_has_calls_nested_specs0 "  z*MockTest.test_assert_has_calls_nested_speccCsJt}||t}| |dSr) r r\r_rcr=r>threerr`r)rrcallsrrr)test_assert_has_calls_nested_without_specs z2MockTest.test_assert_has_calls_nested_without_speccCsddd}t|d}|dddd|dd d d d |d dddddifdddd ifdifg}|||j|dd||dd|j|dddd||dd|j|ddddtt|}|t ||Wdn1s~wY|j|dd|t||ddWdn1swY|j|dddd|t||ddWdn1swY|j|dddddS)NcSr)rrr3rrrrTr0z.frjrUrwrxrrrrrr-r. )r-r]r{)rrrr.)rrrTrr^r)r rrrrZr)rrTrrrrr(test_assert_has_calls_with_function_specs8         z1MockTest.test_assert_has_calls_with_function_speccCsd dd}t|d}|d|tdtd}|tgWdn1s,wY||j j |tdtd}|ttddgWdn1sZwY| |j j t dS) NcSr)rrrrrrrTr0zAMockTest.test_assert_has_calls_not_matching_spec_error..frjrUz^{}$z5Calls not found. Expected: [call()] Actual: [call(1)]zError processing expected calls. Errors: [None, TypeError('too many positional arguments')] Expected: [call(), call(1, 2)] Actual: [call(1)]rwr) r rrrrrrrrLrrrrXrrrr-test_assert_has_calls_not_matching_spec_errors2   z6MockTest.test_assert_has_calls_not_matching_spec_errorcCst}|dd|dd|ddd|dd|jdd|jddd|t|j|t|jdd|jt|jdddS)NrUrwrxr;rrzr)r assert_any_callrZrrPrrrtest_assert_any_calls*      zMockTest.test_assert_any_callcCsddd}t|d}|dddd|dd d d d |ddd|jdddd |dd d d |jdd d d d|jt|jdddd|t}|jddWdn1sZwY||jjtdS)NcSr)rrr3rrrrT#r0z;MockTest.test_assert_any_call_with_function_spec..frjrUrwrxrrrrrrrr3rrr)r rrZrrrrrXrrrr'test_assert_any_call_with_function_spec"s    z0MockTest.test_assert_any_call_with_function_speccCsfdd}t}||_t|t|jg}|D]}|dd|dd||jtddtddgqdS)NcSr)rrrrrrrT6r0z3MockTest.test_mock_calls_create_autospec..frUrwrxr)rrTrrCrr)rrTrZfuncsrWrrrtest_mock_calls_create_autospec5s  z(MockTest.test_mock_calls_create_autospeccCs$tjtdd}|dt|dS)NZ sweet_funcr])rrrnr`rarrrrtest_create_autospec_with_nameGsz'MockTest.test_create_autospec_with_namec CstGddd}dD].}|j|dtt||}|||t|dWdn1s2wYq dS)Nc@s$eZdZeddZeddZdS)zMMockTest.test_create_autospec_classmethod_and_staticmethod..TestClasscSr)rr)r1rrr class_methodNr!zZMockTest.test_create_autospec_classmethod_and_staticmethod..TestClass.class_methodcSr)rrrrrr static_methodQr!z[MockTest.test_create_autospec_classmethod_and_staticmethod..TestClass.static_methodN)r$r%r&r5rr6rrrrr TestClassMs  r)rr)rZ extra_arg)ZsubTestrrrrrZrX)rrrZ mock_methodrrr1test_create_autospec_classmethod_and_staticmethodLsz:MockTest.test_create_autospec_classmethod_and_staticmethodcCsDt}d}|t| |Wdn1swY|t| |Wdn1s4wY|t| |Wdn1sNwY|t| |Wdn1shwY|t| |Wdn1swYtdd}|||||dS)Nz1is not a valid assertion. Use a spec for the mockT)unsafe)r rrZassert_foo_callZassret_foo_callZasert_foo_callZaseert_foo_callZassrt_foo_call)rrrrrrtest_mock_unsafe[s.       zMockTest.test_mock_unsafecCsBGdddt}t|d}|||j|jdS)Nc@r )z.MockTest.test_mock_safe_with_spec..FoocSr)rrrrrr assert_barrr!z9MockTest.test_mock_safe_with_spec..Foo.assert_barcSr)rrrrrr assertSomeur!z9MockTest.test_mock_safe_with_spec..Foo.assertSomeN)r$r%r&rrrrrrrqs rrj)rnr rrassert_called_oncerrrrrrtest_mock_safe_with_specps   z!MockTest.test_mock_safe_with_speccCsRt}|j||t|jWddS1s"wYdSr)r helloassert_not_calledrZrrrrrtest_assert_not_calleds    "zMockTest.test_assert_not_calledcCs*t}|dd|ttd|jdS)NrUrwzCalls: [call(1, 2)])r rrrrrrrrrtest_assert_not_called_messages  z'MockTest.test_assert_not_called_messagecCsbt}|t |jWdn1swY||j||jdSr)r rZrrrrrrrtest_assert_calleds   zMockTest.test_assert_calledcCst}|t |jWdn1swY||j||t|jWddS1s@wYdSr)r rZrrrrrrrtest_assert_called_onces     "z MockTest.test_assert_called_oncecCs2t}|dd|d|ttd|jdS)NrUrwrxzCalls: [call(1, 2), call(3)])r rrrrrrrrrtest_assert_called_once_messages z(MockTest.test_assert_called_once_messagecCsNt}|t }|Wdn1swY|dt|jdS)NzCalls:)r rZrrrJrUr)rrrrrr*test_assert_called_once_message_not_calleds   z3MockTest.test_assert_called_once_message_not_calledcCs0t}|jdddd}|t|jj|dS)NrZhero)r^Zdaddyz call(name='hello', daddy='hero'))r rrCrarG)rrtextrrrtest_ordered_call_signaturesz$MockTest.test_ordered_call_signaturecCsVt}tdd}t}||dd||jd|||jd|dS)NrrrU)rrMr r rCrI)rr-rrrrrtest_override_tuple_methodss  z$MockTest.test_override_tuple_methodscCs>tdddgd}|jddd||jt||jddS)NrrwrxrFrYT)r rrrFrCrYrrrrtest_reset_return_sideeffectsz%MockTest.test_reset_return_sideeffectcCs<tdddgd}|jdd||jt||jddS)NrrwrxrTrR)r rrrFrrYrrrrtest_reset_return zMockTest.test_reset_returncCs<tdddgd}|jdd||jd||jddS)NrrwrxrTr)r rrCrFrYrrrrtest_reset_sideeffectrzMockTest.test_reset_sideeffectcCs@ttddd}||d|jdd||ddS)NrUrRrTT)r rCrTrrrrrrtest_reset_return_with_childrens z(MockTest.test_reset_return_with_childrencCsDttddgdd}||jjd|jdd||jjddS)NrwrxrrT)r rrTrYrrCrrrr+test_reset_return_with_children_side_effects z4MockTest.test_reset_return_with_children_side_effectc sGdddt}Gdddt}Gdddtttttg}t|D]}||ffdd ||ffd d q"|D]}ttd d fD]y}|}|j|j |j f||fd gd gffD]a\}}ttd d fD]T}|j |fi||j| t t|d | t t|dd|vr| t t|dd|j |fi|| t t|d |j | t t|dd|vr| t t|ddqjq^qGq=dS)Nc@r$)z)MockTest.test_mock_add_spec.._OnerUNr$r%r&r=rrrr_Onerrc@r$)z)MockTest.test_mock_add_spec.._TworwN)r$r%r&r>rrrr_Tworrc@seZdZdZZZdS)z-MockTest.test_mock_add_spec..AnythingZfourN)r$r%r&r=r>rrrrrAnythingsrc |dS)NrjrKrrrrrz-MockTest.test_mock_add_spec..cr)NrlrrrrrrrTrlr=r>rrm)rnr r r r rrr_r=r>r mock_add_specrZrrsetattr) rrrZklassesrrtrZOneZTworrrtest_mock_add_specsV   zMockTest.test_mock_add_speccs|ttfD]7}|tt|tt|ddj_t| td|tfddqdS)Nr\rcsdSr rrrrrr#rz;MockTest.test_mock_add_spec_magic_methods..) r r r,rrnrZrXrarFrC)rrrrr test_mock_add_spec_magic_methodss   z)MockTest.test_mock_add_spec_magic_methodscCstttttfD]V}|}t|_|||jtg||j tg|}tdd|_ | ||jg||j g|}t|_ | ||jg||j gqdS)Nr^r]) r r r r rr\rCrIrrr_rcrrrrrrtest_adding_child_mock&s&  zMockTest.test_adding_child_mockcCs@ttfD]}|}t|_|||jttgqdSr)r r rFrCrrrrrrtest_adding_return_value_mock?s z&MockTest.test_adding_return_value_mockcCsGdddt}t}t|d}t|d}|}||j|}||j||d||d||| |j t t gdS)Nc@seZdZdZdZdS)z'MockTest.test_manager_mock..Foor=r>N)r$r%r&r=r>rrrrrIsrr=r>) rnr rrr*rO attach_mockr>r=rCrr)rrmanagerZp1Zp2Zmock_oneZmock_tworrrtest_manager_mockHs      zMockTest.test_manager_mockcCshttfD]-}|}tdd|_tdd|_t|t|||jttg||j gqdS)NrxrRg@) r r ra __float__r,floatrCrrrI)rrrrrrtest_magic_methods_mock_calls^s   z&MockTest.test_magic_methods_mock_callscCs<tjdd}|d}|}|d}|}|||dS)NrZ read_dataa-namez another-name)rrreadrC)r mocked_openf1Zf1_dataf2Zf2_datarrr test_mock_open_reuse_issue_21750is z)MockTest.test_mock_open_reuse_issue_21750cCsVtjdd}|d}dd|D}||dd||dd |t|gdS) NzRemarkable Norwegian BluerrcSg|]}|qSrrrClinerrrrDvrz=MockTest.test_mock_open_dunder_iter_issue..rz Remarkable rUzNorwegian Blue)rrrCr)rrrlinesrrr test_mock_open_dunder_iter_issueqs z)MockTest.test_mock_open_dunder_iter_issuecCstjdd}|d}t|}|}dd|D}||d||d||dd |t|g|t t|WddS1sJwYdS) Nz1st line 2nd line 3rd linerrcSrrrrrrrrDrz6MockTest.test_mock_open_using_next..z 1st line z 2nd line rz3rd line)rrr"r'rCrrZr)rrrZline1Zline2rrrrtest_mock_open_using_next{s     "z"MockTest.test_mock_open_using_nextcCs,tjdd}d|jj_|dt|dS)Nfoo barnrabc)rrrFreadlinerCr")rmopenrrr3test_mock_open_next_with_readline_with_return_values  z.attempt) rrr rrFrOSErrorrYrZ)rZmock_namedtempZmock_filehandleZ mock_writerrrrtest_mock_open_writes "zMockTest.test_mock_open_writecCsJtjdd}dd|jj_|}|}|d||d|dS)NrrcWr )Nrr)rsrrrrr0z8MockTest.test_mock_open_alter_readline..r)rrrFrrYrC)rrfirstsecondrrrtest_mock_open_alter_readlines    z&MockTest.test_mock_open_alter_readlinecCstjdd}|d}||d||d||d||d||g||g|dS)Nr\rr_r])rrrrCr readlines)rZ_openrrrrtest_mock_open_after_eofs z!MockTest.test_mock_open_after_eofcCs ttfD]~}|}t|}||_||||t|||||||t|||}|j|_| dt|j| dt|j|| dt|j| dt|j|}t|}||_||j_|t|||t||qdS)Nz name='mock.a') r r rarFr rCrr+r,r`)rrrZ original_reprrrrtest_mock_parentss. zMockTest.test_mock_parentscCsttttf}|D]B}|D]=}|}|dd}||d||j||dt||j d| |j t j dg| |j t j dgq qdS)Nr\r]r_zname='mock.bar'rU)r r r r rr r_r`rarcrCrrrIrZclassesrZKlass2rZm2rrrtest_attach_mocks    zMockTest.test_attach_mockcCsttttf}ttfD]4}|D]/}|}|dd}||d||||dt||| |j t  qq dS)Nr\r]rFz name='mock()') r r r r rr r`rar\rCrrr`rrrrtest_attach_mock_return_values    z&MockTest.test_attach_mock_return_valuecCs t}tjtdddn}||jd||d|dtd|dt dt dt dg}t dt dt dg}||j |||jj ||tj |||j || d t |jj||jd WddS1s~wYdS) N .somethingTrr<rrUrwrx mock.child) r rrr$rCZ_extract_mock_namerrr<rrr`ra)rrZ mock_funcZ parent_callsZ child_callsrrrtest_attach_mock_patch_autospecs   "z(MockTest.test_attach_mock_patch_autospecc CstjtdddI}t}||dt}|jddddd |tj tj ddddd g|jttj ddddd g|ttj ddddd gWdn1sVwYtjtd dd.}t}||d t d|t dgt tdg|tdgWdn1swYtjtd ddM}t}||d t}|jddddd |t t jddddd g|jtddddd g|ttjddddd gWddS1swYdS)N.Something.methTr attach_methrUrwrxrrr attach_func .Something attach_obj)rrr$r rr(r/rrrrr<rr)rZmockedrrrrr)test_attach_mock_patch_autospec_signatures8     ""z2MockTest.test_attach_mock_patch_autospec_signaturecCsfttttfD]&}|t|d|`|t|d|`|t|d| t t |dq dS)NrrT) r r r r rEhasattrrrArTrZrrrPrrrtest_attribute_deletions z MockTest.test_attribute_deletioncCsttttfD]:}d|_|t|d||jd|`|t|dd|_|t|d||jd|`|t|dq dS)Nrxr\r) r r r r r\rErrCrArPrrr7test_mock_does_not_raise_on_repeated_attribute_deletion(s z@MockTest.test_mock_does_not_raise_on_repeated_attribute_deletionc CsPttttfD]}|`|t |`Wdn1s wYq dSr)r r r r r\rZrrPrrr4test_mock_raises_when_deleting_nonexistent_attribute;s  z=MockTest.test_mock_raises_when_deleting_nonexistent_attributecCs,t}d|_|`||t|ddS)NTr)r rrrArrPrrr/test_reset_mock_does_not_raise_on_attr_deletionCs z8MockTest.test_reset_mock_does_not_raise_on_attr_deletioncCs:ttfD]}||tt|_||t|jqdSr)r r rsr,r!rr\rPrrrtest_class_assignableMs   zMockTest.test_class_assignablecC8|tj|ttjt|ttjtdSr)assertIsNotNonerr^rCr?rrrrrtest_name_attribute_of_callU z$MockTest.test_name_attribute_of_callcCr r)r rrrCr?rrrrrtest_parent_attribute_of_call\r z&MockTest.test_parent_attribute_of_callcCsddd}t}t||_|dd|t|jd||jtddg|dt |jj dS)NcSr)rrrrrrr\fr0zBMockTest.test_parent_propagation_with_create_autospec..foorUrwr) r rrrZrXrCrrr`rar)rr\rrrr,test_parent_propagation_with_create_autospecds  z5MockTest.test_parent_propagation_with_create_autospeccCspdd}t}|t|ddd|dd|t|jd||jjtddg| dt |jj dS) NcSr)rrrrrrr\rr0zGMockTest.test_parent_propagation_with_autospec_attach_mock..foor_r]rrUrwr) r rrrrZrXrCrrr`rar)rr\rrrr1test_parent_propagation_with_autospec_attach_mockps z:MockTest.test_parent_propagation_with_autospec_attach_mockc stjj}|dd|tdDtjd=fdd|tjttddl m }m }m }m }||||tg}|D] }|td }||tq?WddS1sXwYdS) NcSsttjd|S)Nr)rrKr)rrrrrsz9MockTest.test_isinstance_under_settrace..z sys.modulesz unittest.mockcsSrr)frameZeventrtracerrrr!z6MockTest.test_isinstance_under_settrace..tracer)r r r r rj)rKrrr*r_r(modulessettracegettrace unittest.mockr r r r rr(r) rZ old_patchr r r r rdrrrrrtest_isinstance_under_settrace}s"      "z'MockTest.test_isinstance_under_settracecCs^Gddd}|}tjjj|dtdWdn1swY||jjjddS)Nc@r)zFMockTest.test_bool_not_called_when_passing_spec_arg..SomethingcSstj|_dSr)rKrr obj_with_bool_funcrrrrrszOMockTest.test_bool_not_called_when_passing_spec_arg..Something.__init__N)r$r%r&rrrrrr(rr(rrjr)rKrrrnrCr__bool__rD)rr(rrrr*test_bool_not_called_when_passing_spec_args4z3MockTest.test_bool_not_called_when_passing_spec_argc Cs$Gddd}|t!ttdddWdn1s!wYWdn1s0wY|t tj|dddWdn1sNwYWdn1s]wY|t!ttdddWdn1s|wYWdn1swY|t tj|dddWdn1swYWdn1swY|t!ttdddWdn1swYWdn1swY|t!tj|dddWdn 1swYWdn 1swY|tt|dd}Wdn 1s1wY|t$tjtd tdd Wdn 1sSwYWdn 1scwY|t$tjtd tdd Wdn 1swYWdn 1swY|t$tjtd tdd Wdn 1swYWdn 1swYttdddd Wdn 1swYtj|dddd Wdn 1swYttddddWdn 1swYtj|ddddWdn 1s1wYttddddWdn 1sLwYtj|ddddWdn 1sfwYt|ddd}tjtddddd WddS1swYdS)Nc@r$)z/MockTest.test_misspelled_arguments..Foor=NrrrrrrrrrT)r8r=)r9)r:r)r/r8)r/r9)r/r:)rr8)rr9)rr:)r:rz.Typos)r8r:r9) rZrrr$rnrrZmultiplerrrrrtest_misspelled_argumentss 2 0 2 0 2 2       444$z"MockTest.test_misspelled_argumentsN)r$r%r&r?rQrSrWr[rerprrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr"r#r'r.r;r@rIrNrPrQrTrYr\rbrcrerhrirkrlrmrnrortryr~rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr r rrrrrrrrrr=2s )&          !      8N # ,((   5            ' r=__main__)!r-rr(rZ test.supportrrKZunittest.test.testmock.supportrrrrrrr r r r r rrrrrrnrr(r7r<rLr=r$mainrrrrsD   <  <