File "mock.cpython-35.pyc"

Full Path: /home/attunedd/public_html/byp/izo/con7ext_sym404/rintoar.txt/opt/alt/python35/lib64/python3.5/unittest/__pycache__/mock.cpython-35.pyc
File size: 64.21 KB
MIME-type: text/x-bytecode.python
Charset: 8 bit



Yfy2@sdddddddddd	d
ddf
Zd
ZddlZddlZddlZddlZddlmZddlm	Z	m
Z
ddeeDZe
fZdejkrddlZe
ejjfZdZeZddZddZGdddeZeejefZddZddd Zd!d"Z d#d$Z!d%d&Z"d'd(Z#dd)d*Z$d+d,Z%d-d.Z&Gd/d0d0eZ'Gd1d2d2eZ(e(Z)e)j*Z*e)j+Z,e)j-Z.d3d4Z/d5d6d7d8d9d:d;d<hZ0d=d>Z1Gd?d@d@e2Z3dAdBZ4GdCdDdDeZ5GdEdFdFeZ6GdGd	d	e6Z7dHdIZ8GdJdKdKe6Z9GdLdde9e7Z:dMdNZ;dOdPZ<dQdRZ=GdSdTdTeZ>dUdVZ?e*ddddddWdXZ@ddddddYdZZAe*dddddd[dZBGd\d]d]eZCd^d_ZDd`daZEe@eB_eCeB_FeAeB_GeEeB_HdbeB_IdcZJddZKdejLdfdgeKjMDZNdejLdhdgeKjMDZOdidjdkdldmdndodpdqdrdsdtdudvdwdxdydzhZPd{d|ZQd}ddejLeJeKeNeOgjMDZReRePBZSd~ddddddhZTdddddddddiZUdeVdeVdeVdeVddddddddddddddddiZWddZXddZYddZZdeXdeYdeZiZ[ddZ\GdddeZ]Gdd
d
e]e7Z^Gddde]e:Z_GdddeZ`GdddeZaeaZbddZcGdddedZeeeddZfddddddZgddZhddZiGdddeZjeegeebjkfZleebjkjmfZndaoddZpddddZqGddde:ZrdS)Mock	MagicMockpatchsentinelDEFAULTANYcallcreate_autospec
FILTER_DIRNonCallableMockNonCallableMagicMock	mock_openPropertyMockz1.0N)
ModuleType)wrapspartialcCs%h|]}|jds|qS)_)
startswith).0namer2/opt/alt/python35/lib64/python3.5/unittest/mock.py	<setcomp>#s	rjavaTcCstt|tS)N)
issubclasstyper
)objrrr_is_instance_mock2srcCs+t|tp*t|to*t|tS)N)
isinstanceBaseExceptionsrr)rrrr
_is_exception8sr c@seZdZdgZdS)_slottedaN)__name__
__module____qualname__	__slots__rrrrr!?sr!cCst|trE|rEy
|j}Wntk
r;dSYnXd}n5t|tszy
|j}Wntk
rydSYnX|rt|d}n|}y|tj|fSWnt	k
rdSYnXdS)z
    Given an arbitrary, possibly callable object, try to create a suitable
    signature object.
    Return a (reduced func, signature) tuple, or None.
    NT)
rr__init__AttributeError
FunctionTypes__call__rinspectZ	signature
ValueError)funcZas_instanceZeat_selfZsig_funcrrr_get_signature_objectKs$

		

	
r.Fcs`t|||dkr"dS\}fdd}t|||t|_dS)Ncsj||dS)N)bind)
_mock_selfargskwargs)sigrrchecksigpsz"_check_signature.<locals>.checksig)r._copy_func_detailsr_mock_check_sig)r-mock	skipfirstinstancer4r)r3r_check_signatureks
r:c#Cs|j|_|j|_y|j|_Wntk
r<YnXy|j|_Wntk
raYnXy|j|_Wntk
rYnXy|j|_Wntk
rYnXdS)N)r#__doc____text_signature__r(r$__defaults____kwdefaults__)r-funcopyrrrr5vs$



r5cCs3t|trdSt|dddk	r/dSdS)NTr*F)rrgetattr)rrrr	_callables
rAcCst|ttfkS)N)rlisttuple)rrrr_is_listsrDcCs`t|ts%t|dddk	Sx4|f|jD]"}|jjddk	r6dSq6WdS)ztGiven an object, return True if the object is callable.
    For classes, return True if instances would be callable.r*NTF)rrr@__mro____dict__get)rbaserrr_instance_callablesrIcst|sdSt|t}t|||}|dkrA|S|\}fdd}t|||j}|jsd}d|d|i}d|}	t|	|||}
t|
||
S)Ncsj||dS)N)r/)r1r2)r3rrr4sz _set_signature.<locals>.checksigr?Z
_checksig_r7zYdef %s(*args, **kwargs):
    _checksig_(*args, **kwargs)
    return mock(*args, **kwargs))	rArrr.r5r#isidentifierexec_setup_func)r7originalr9r8resultr-r4rcontextsrcr?r)r3r_set_signatures$
	



rQcs_tsdSfdd}fdd}fdd}fdd}fd	d
}d_d_d_t_t_t_j	_	j
_
j_|_|_
|_|_|__dS)
Ncsj||S)N)assert_called_with)r1r2)r7rrrRsz'_setup_func.<locals>.assert_called_withcsj||S)N)assert_called_once_with)r1r2)r7rrrSsz,_setup_func.<locals>.assert_called_once_withcsj||S)N)assert_has_calls)r1r2)r7rrrTsz%_setup_func.<locals>.assert_has_callscsj||S)N)assert_any_call)r1r2)r7rrrUsz$_setup_func.<locals>.assert_any_callcsQt_t_jj}t|rM|k	rM|jdS)N)	_CallListmethod_calls
mock_calls
reset_mockreturn_valuer)ret)r?r7rrrYs
	z_setup_func.<locals>.reset_mockFr)r7rcalled
call_count	call_argsrVcall_args_listrWrXrZside_effect_mock_childrenrRrSrTrUrY_mock_delegate)r?r7rRrSrTrUrYr)r?r7rrLs.									rLcCsd|dd|kS)Nz__%s__r)rrrr	_is_magicsrec@s.eZdZdZddZddZdS)_SentinelObjectz!A unique, named, sentinel object.cCs
||_dS)N)r)selfrrrrr'sz_SentinelObject.__init__cCsd|jS)Nzsentinel.%s)r)rgrrr__repr__sz_SentinelObject.__repr__N)r#r$r%r;r'rhrrrrrfsrfc@s.eZdZdZddZddZdS)	_SentinelzAAccess attributes to return a named object, usable as a sentinel.cCs
i|_dS)N)
_sentinels)rgrrrr'sz_Sentinel.__init__cCs+|dkrt|jj|t|S)N	__bases__)r(rj
setdefaultrf)rgrrrr__getattr__sz_Sentinel.__getattr__N)r#r$r%r;r'rmrrrrrisricCs2t|ttttfkr.t||S|S)N)rdictrBrCset)valuerrr_copysrqrZ_mock_return_valuer`_mock_side_effect_mock_parent_mock_new_parent
_mock_name_mock_new_namecCsHtj|d|}||dd}||dd}t||S)NZ_mock_cSs/|j}|dkr"t||St||S)N)rbr@)rgr	_the_namer3rrr_get"s	
z"_delegating_property.<locals>._getcSs9|j}|dkr%||j|<nt|||dS)N)rbrFsetattr)rgrprrxr3rrr_set's	z"_delegating_property.<locals>._set)_allowed_namesaddproperty)rrxryr{rrr_delegating_propertys


rc@s(eZdZddZddZdS)rVcCst|tstj||St|}t|}||krGdSxCtd||dD]*}||||}||kr_dSq_WdS)NFrT)rrB__contains__lenrange)rgrpZ	len_valueZlen_selfiZsub_listrrrr4sz_CallList.__contains__cCstjt|S)N)pprintZpformatrB)rgrrrrhBsz_CallList.__repr__N)r#r$r%rrhrrrrrV2srVcCst|sdS|js@|js@|jdk	s@|jdk	rDdS|}x)|dk	ru||kridS|j}qMW|r||_||_|r||_||_dS)NFT)rrvrwrtru)parentrprnew_name_parentrrr_check_and_set_parentFs$
				rc@s4eZdZddZddZddZdS)	_MockItercCst||_dS)N)iterr)rgrrrrr'`sz_MockIter.__init__cCs|S)Nr)rgrrr__iter__bsz_MockIter.__iter__cCs
t|jS)N)nextr)rgrrr__next__dsz_MockIter.__next__N)r#r$r%r'rrrrrrr_src@s(eZdZeZdZddZdS)BaseNcOsdS)Nr)rgr1r2rrrr'jsz
Base.__init__)r#r$r%rrrrsr'rrrrrgsrc
@seZdZdZddZdddddddddddddZd	d
ZdddZddd
dZddZ	ddZ
dZee	e
eZ
eddZedZedZedZedZedZddZddZeeeZddd Zd!d"Zd#d$Zd%d&Zd'd(Zd)d*Zd+d,Zd-d.Zd/d0Z d1d2Z!d3d4Z"d5d6Z#d7d8Z$dd9d:Z%d;d<Z&d=d>Z'dS)?r
z A non-callable version of `Mock`cOs4t|j|fd|ji}tj|}|S)Nr;)rr#r;object__new__)clsr1kwnewr9rrrrrs!zNonCallableMock.__new__NFcKs2|dkr|}|j}
||
d<||
d<||
d<||
d<|dk	r[|}d}|
dkrs|dk	}
|j|||	|
i|
d<||
d<d|
d<d	|
d
<d|
d<d|
d
<t|
d<t|
d<t|
d<||
d<|r	|j|tt|j||||||dS)NrtrvrwruTra_mock_wrapsrbFZ_mock_calledZ_mock_call_argsrZ_mock_call_countZ_mock_call_args_listZ_mock_mock_callsrW_mock_unsafe)rF_mock_add_specrVconfigure_mock_safe_superr
r')rgspecrrspec_setr_spec_state	_new_name_new_parent_spec_as_instance	_eat_selfZunsafer2rFrrrr'{s8	














zNonCallableMock.__init__cCs8d|_d|_d|_d|_t|||dS)z
        Attach a mock as an attribute of this one, replacing its name and
        parent. Calls to the attached mock will be recorded in the
        `method_calls` and `mock_calls` attributes of this one.Nr)rtrurvrwrz)rgr7	attributerrrattach_mocks
				zNonCallableMock.attach_mockcCs|j||dS)zAdd a spec to a mock. `spec` can either be an object or a
        list of strings. Only attributes on the `spec` can be fetched as
        attributes from the mock.

        If `spec_set` is True then only attributes on the spec can be set.N)r)rgrrrrr
mock_add_specszNonCallableMock.mock_add_specc	Csd}d}|dk	rwt|rwt|tr=|}nt|}t|||}|oh|d}t|}|j}||d<||d<||d<||d<dS)Nr_spec_class	_spec_set_spec_signature
_mock_methods)rDrr
_get_classr.dirrF)	rgrrrrrrresrFrrrrs		


zNonCallableMock._mock_add_speccCsU|j}|jdk	r$|jj}|tkrQ|jd|dd}||_|S)Nrrz())rrrbrZr_get_child_mock)rgr[rrrZ__get_return_values			z"NonCallableMock.__get_return_valuecCs>|jdk	r||j_n||_t||dddS)Nz())rbrZrrr)rgrprrrZ__set_return_values	z"NonCallableMock.__set_return_valuez1The value to be returned when the mock is called.cCs |jdkrt|S|jS)N)rr)rgrrr	__class__s
zNonCallableMock.__class__r\r]r^r_rXcCst|j}|dkr|jS|j}|dk	rpt|rpt|trpt|rpt|}||_|S)N)rbrsr`callablerrr )rg	delegatedZsfrrrZ__get_side_effects			z!NonCallableMock.__get_side_effectcCs:t|}|j}|dkr-||_n	||_dS)N)	_try_iterrbrsr`)rgrprrrrZ__set_side_effects
	z!NonCallableMock.__set_side_effectcCs|dkrg}t||kr(dS|jt|d|_d|_d|_t|_t|_t|_x6|j	j
D]%}t|trq|j
|qW|j}t|r||k	r|j
|dS)z-Restore the mock object to its initial state.NFr)idappendr\r^r]rVrXr_rWravaluesr
_SpecStaterYrrr)rgZvisitedZchildr[rrrrYs$				zNonCallableMock.reset_mockcKsx}t|jdddD]]\}}|jd}|j}|}x|D]}t||}qSWt|||qWdS)aZSet attributes on the mock through keyword arguments.

        Attributes plus return values and side effects can be set on child
        mocks using standard dot notation and unpacking a dictionary in the
        method call:

        >>> attrs = {'method.return_value': 3, 'other.side_effect': KeyError}
        >>> mock.configure_mock(**attrs)keycSs|djdS)Nr.)count)entryrrr<lambda>6sz0NonCallableMock.configure_mock.<locals>.<lambda>rN)sorteditemssplitpopr@rz)rgr2argvalr1finalrrrrrr)s	
zNonCallableMock.configure_mockcCsu|dkrt|nU|jdk	rX||jksE|tkrptd|nt|rpt||js|jdrt||jj|}|tkrt|n|dkr.d}|j	dk	rt
|j	|}|jd|d|d|d	|d
|}||j|<nCt|t
rqt|j|j|j|j|j}||j|<|S)
NrrzMock object has no attribute %rassertassretrrrrr>rr)rr)r(r_all_magicsrerrrarG_deletedrr@rrrrrrr9rr)rgrrNrrrrrm?s6			
zNonCallableMock.__getattr__c
Cs|jg}|j}|}d}|dgkr6d}t}xt|dk	r|}|j|j|d}|jdkrd}|j}t||krP|jt|qBWtt|}|jpd}t	|dkr|dd
kr|d7}||d<dj
|}d}|dkr8d	|}d}	|jdk	rrd
}	|jrbd}	|	|jj
}	dt|j
||	t|fS)Nr()rr7r().rmock.z name=%rz spec=%rz spec_set=%rz<%s%s%s id='%s'>)rr)r7r)rwrurorrr}rBreversedrvrjoinrrr#r)
rgZ
_name_listrZlastdotseenZ_firstrZname_stringZspec_stringrrrrhesL			


	zNonCallableMock.__repr__cCststj|S|jpg}tt|}t|j}dd|D}dd|D}tt	|||t|j
S)z8Filter the output of `dir(mock)` to only useful members.cSs%g|]}|jds|qS)r)r)rerrr
<listcomp>s	z+NonCallableMock.__dir__.<locals>.<listcomp>cSs2g|](}|jds(t|r|qS)r)rre)rrrrrrs	)r	r__dir__rrrrBrFrrora)rgZextrasZ	from_typeZ	from_dictrrrrs
zNonCallableMock.__dir__cs|tkrtj||Sjrhjdk	rh|jkrh|jkrhtd|n|tkrd|}t|n|tkrIjdk	r|jkrtd|t	|st
t|t|||fdd}qt
|d|t
t|||j|<n;|dkrb|_dSt
|||r|j|<tj||S)Nz!Mock object has no attribute '%s'z.Attempting to set unsupported magic method %r.cs||S)Nr)r1r)rMrgrrrsz-NonCallableMock.__setattr__.<locals>.<lambda>r)r|r__setattr__rrrFr(_unsupported_magicsrrrzr_get_methodrrar)rgrrpmsgr)rMrgrrs2
	
zNonCallableMock.__setattr__cCs|tkrG|t|jkrGtt||||jkrGdS||jkrftj|||jj|t}|t	krt
||tk	r|j|=t	|j|<dS)N)rrrFdelattrr__delattr__rarG_missingrr()rgrrrrrrs!
zNonCallableMock.__delattr__cCs|jpd}t|||S)Nr7)rv_format_call_signature)rgr1r2rrrr_format_mock_call_signaturesz+NonCallableMock._format_mock_call_signaturecCs`d}|j||}|j}t|dkrC|dd}|j|}|||fS)Nz!Expected call: %s
Actual call: %sr)rr^r)rgr1r2messageexpected_stringr^Z
actual_stringrrr_format_mock_failure_messages	z,NonCallableMock._format_mock_failure_messagecCs|j}|dk	rt|dkr<d}|\}}n|\}}}y||j||fSWqtk
r}z|jdSWYdd}~XqXn|SdS)a
        Given a call (or simply an (args, kwargs) tuple), return a
        comparison key suitable for matching with other calls.
        This is a best effort method which relies on the spec's signature,
        if available, or falls back on the arguments themselves.
        Nrcr)rrr/	TypeErrorwith_traceback)rg_callr3rr1r2rrrr
_call_matchers	#zNonCallableMock._call_matchercCsA|}|jdkr=d|jp$d|jf}t|dS)z/assert that the mock was never called.
        rz7Expected '%s' to not have been called. Called %s times.r7N)r]rvAssertionError)r0rgrrrrassert_not_calleds
z!NonCallableMock.assert_not_calledcs|jdkr:j}td|ffdd}jf}jj}||krt|tr|nd}t||dS)zassert that the mock was called with the specified arguments.

        Raises an AssertionError if the args and keyword args passed in are
        different to the last call to the mock.NzExpected call: %s
Not calledcsj}|S)N)r)r)r1r2rgrr_error_messagesz:NonCallableMock.assert_called_with.<locals>._error_message)r^rrrr	Exception)r0r1r2expectedractualcauser)r1r2rgrrR	sz"NonCallableMock.assert_called_withcOsM|}|jdks=d|jp$d|jf}t||j||S)ziassert that the mock was called exactly once and that that call was
        with the specified arguments.rz1Expected '%s' to be called once. Called %s times.r7)r]rvrrR)r0r1r2rgrrrrrSsz'NonCallableMock.assert_called_once_withcsfdd|D}t|tr.|nd}tfddjD}|s||krtd|jf|dSt|}g}xA|D]9}y|j|Wqtk
r|j|YqXqW|rtdt	|f|dS)aassert the mock has been called with the specified calls.
        The `mock_calls` list is checked for the calls.

        If `any_order` is False (the default) then the calls must be
        sequential. There can be extra calls before or after the
        specified calls.

        If `any_order` is True then the calls can be in any order, but
        they must all appear in `mock_calls`.csg|]}j|qSr)r)rc)rgrrr2s	z4NonCallableMock.assert_has_calls.<locals>.<listcomp>Nc3s|]}j|VqdS)N)r)rr)rgrr	<genexpr>4sz3NonCallableMock.assert_has_calls.<locals>.<genexpr>z(Calls not found.
Expected: %r
Actual: %rz%r not all found in call list)
rrrVrXrrBremover,rrC)rgZcallsZ	any_orderrrZ	all_callsZ	not_foundZkallr)rgrrT(s*
"

z NonCallableMock.assert_has_callscsj||f}fddjD}||kr}t|trR|nd}j||}td||dS)zassert the mock has been called with the specified arguments.

        The assert passes if the mock has *ever* been called, unlike
        `assert_called_with` and `assert_called_once_with` that only pass if
        the call is the most recent one.csg|]}j|qSr)r)rr)rgrrrRs	z3NonCallableMock.assert_any_call.<locals>.<listcomp>Nz%s call not found)rr_rrrr)rgr1r2rrrrr)rgrrUKs
zNonCallableMock.assert_any_callcKsbt|}t|tsKt|tr3t}qXt|trXt}n
|jd}||S)aPCreate the child mocks for attributes and return value.
        By default child mocks will be the same type as the parent.
        Subclasses of Mock may want to override this to customize the way
        child mocks are made.

        For non-callable mocks the callable variant will be used (rather than
        any custom subclass).r)rr
CallableMixinrrr
rrE)rgr_typeklassrrrr[s		
zNonCallableMock._get_child_mock)(r#r$r%r;rr'rrrZ"_NonCallableMock__get_return_valueZ"_NonCallableMock__set_return_valueZ"_NonCallableMock__return_value_docr~rZrrr\r]r^r_rXZ!_NonCallableMock__get_side_effectZ!_NonCallableMock__set_side_effectr`rYrrmrhrrrrrrrrRrSrTrUrrrrrr
osN
)
	
		&2"
	#cCs[|dkr|St|r |St|r0|Syt|SWntk
rV|SYnXdS)N)r rArr)rrrrros
rc@s^eZdZddeddddddddd
ZddZddZd	d
ZdS)rNrc
KsH||jd<tt|j|||||||	|
|||_dS)Nrr)rFrrr'r`)rgrr`rZrrrrrrrr2rrrr's

zCallableMixin.__init__cOsdS)Nr)rgr1r2rrrr6szCallableMixin._mock_check_sigcOs |j|||j||S)N)r6
_mock_call)r0r1r2rrrr*szCallableMixin.__call__cOs|}d|_|jd7_|j}|j}t||fdd}||_|jj||jjtd||ft	}|dk}|j
dk	}	|j}
x|dk	rt|||f}|jrd}|rd}d}|jdkrd}|j||}|	r~||
kr3|}
nt|
||f}
|jj|
|j
dk	}	|	r~|jd|
}
|jj||j}t
|}||krP|j|qWt}|j}|dk	r@t|r|t|s1t|}t|r||tkr-|j}|S|||}|jdk	rn|jtkrn|j||S|tkr|j}|S)NTrtworz()rF)r\r]rwru_Callr^r_rrXrortrvrWrr}rr`r rArrZrrr)r0r1r2rgrrrrZ
skip_next_dotZdo_method_callsrZthis_mock_callrZthis_method_callZ_new_parent_idret_valZeffectrNrrrrsp												zCallableMixin._mock_call)r#r$r%rr'r6r*rrrrrrs	rc@seZdZdZdS)ra	
    Create a new `Mock` object. `Mock` takes several optional arguments
    that specify the behaviour of the Mock object:

    * `spec`: This can be either a list of strings or an existing object (a
      class or instance) that acts as the specification for the mock object. If
      you pass in an object then a list of strings is formed by calling dir on
      the object (excluding unsupported magic attributes and methods). Accessing
      any attribute not in this list will raise an `AttributeError`.

      If `spec` is an object (rather than a list of strings) then
      `mock.__class__` returns the class of the spec object. This allows mocks
      to pass `isinstance` tests.

    * `spec_set`: A stricter variant of `spec`. If used, attempting to *set*
      or get an attribute on the mock that isn't on the object passed as
      `spec_set` will raise an `AttributeError`.

    * `side_effect`: A function to be called whenever the Mock is called. See
      the `side_effect` attribute. Useful for raising exceptions or
      dynamically changing return values. The function is called with the same
      arguments as the mock, and unless it returns `DEFAULT`, the return
      value of this function is used as the return value.

      If `side_effect` is an iterable then each call to the mock will return
      the next value from the iterable. If any of the members of the iterable
      are exceptions they will be raised instead of returned.

    * `return_value`: The value returned when the mock is called. By default
      this is a new Mock (created on first access). See the
      `return_value` attribute.

    * `wraps`: Item for the mock object to wrap. If `wraps` is not None then
      calling the Mock will pass the call through to the wrapped object
      (returning the real result). Attribute access on the mock will return a
      Mock object that wraps the corresponding attribute of the wrapped object
      (so attempting to access an attribute that doesn't exist will raise an
      `AttributeError`).

      If the mock has an explicit `return_value` set then calls are not passed
      to the wrapped object and the `return_value` is returned instead.

    * `name`: If the mock has a name then it will be used in the repr of the
      mock. This can be useful for debugging. The name is propagated to child
      mocks.

    Mocks can also be called with arbitrary keyword arguments. These will be
    used to set attributes on the mock after it is created.
    N)r#r$r%r;rrrrrs1cCsAyt||SWn)tk
r<t|t||SYnXdS)N)r@r(
__import__)thingcompimport_pathrrr_dot_lookups


rcCs_|jd}|jd}t|}x.|D]&}|d|7}t|||}q1W|S)Nrrz.%s)rrrr)targetZ
componentsrrrrrr	_importer!s
rcCs
t|dS)Nis_local)hasattr)patcherrrr_is_started,src@seZdZdZgZddZddZddZdd	Zd
dZ	dd
Z
ddZddZddZ
ddZdS)_patchNc

Cs|dk	r<|tk	r$td|dk	r<td||_||_||_||_||_||_d|_||_	||_
|	|_g|_dS)Nz,Cannot use 'new' and 'new_callable' togetherz1Cannot use 'autospec' and 'new_callable' togetherF)
rr,getterrrnew_callablercreateZ	has_localrautospecr2additional_patchers)
rgrrrrrrrrr2rrrr'6s$												z_patch.__init__c
Csht|j|j|j|j|j|j|j|j|j		}|j
|_
dd|jD|_|S)NcSsg|]}|jqSr)copy)rprrrrYs	z_patch.copy.<locals>.<listcomp>)rrrrrrrrrr2attribute_namer)rgrrrrrQsz_patch.copycCs)t|tr|j|S|j|S)N)rrdecorate_classdecorate_callable)rgr-rrrr*^s
z_patch.__call__cCssxlt|D]^}|jtjs(q
t||}t|dsIq
|j}t||||q
W|S)Nr*)rrrTEST_PREFIXr@rrrz)rgrattr
attr_valuerrrrrdsz_patch.decorate_classcsTtdr#jj|Stfdd|g_S)N	patchingscs
g}g}t}zyxejD]Z}|j}|j||jdk	rc|j|q%|jtkr%|j|q%W|t|7}||SWn<||krt|r|j|t	j
}YnXWdx!t|D]}|j|qWXdS)N)
rCr
	__enter__rrupdaterrrsysexc_infor__exit__)r1Zkeywargs
extra_argsZentered_patchersrpatchingr)r-patchedrrrws*	

z)_patch.decorate_callable.<locals>.patched)rr
rr)rgr-r)r-rrrrs!z_patch.decorate_callablecCs|j}|j}t}d}y|j|}Wn*ttfk
r^t||t}YnXd}|tkrt|t	rd|_
|j
r|tkrtd||f||fS)NFTz!%s does not have the attribute %r)rrrrFr(KeyErrorr@	_builtinsrrr)rgrrrMlocalrrrget_originals		z_patch.get_originalcCsP|j|j|j}}}|j|j}}|j}|j|_|dkrZd}|dkrld}|dkr~d}|dk	r|dk	rtd|dk	s|dk	r|dkrtd|j	\}}|t
kr |dkr d}	|dkr/|}|dkrh|}d}n9|dk	rV|dkrh|}d}n|dkrh|}|dk	s|dk	r|t
krtdt|trd}	t
}
i}|dk	r|}
nd|dk	s|dk	r2|}|dk	r|}t|rd|k}
n
t|}
|
r2t}
|dk	rH||d<|dk	r^||d	<t|
trt|
tr|jr|j|d
<|j||
|}|	rt|r|}|dk	r|}t|rt|rt}
|jd
|
d|dd
||_n|dk	r|t
k	rDtd|t
kr\tdt|}|dkrz|}t|d	|d|j|}n|rtd|}||_||_t|j|j||jdk	rLi}|jt
kr|||j<x9|jD].}|j }|jt
kr|j|qW|S|S)zPerform the patch.FNzCan't specify spec and autospecTz6Can't provide explicit spec_set *and* spec or autospecz!Can't use 'spec' with create=Truer*rrrrrz()zBautospec creates the mock for you. Can't specify autospec and new.z%Can't use 'autospec' with create=True_namez.Can't pass kwargs to a mock we aren't creating)TN)!rrrrr2rrrrrrrrrrDrrrr
rrrrIrrZboolr
temp_originalrrzrrr)rgrrrrr2rrMrZinheritKlass_kwargsZ	this_specZnot_callableZnew_attrrrrrrrrs				







			
z_patch.__enter__cGst|std|jrL|jtk	rLt|j|j|jn[t|j|j|j	rt
|j|js|jdkrt|j|j|j|`|`|`x0t|jD]}t|r|j
|qWdS)	zUndo the patch.z stop called on unstarted patcherr;r$r=__annotations__r>N)r;r$r=rr>)rRuntimeErrorrrrrzrrrrrrrr)rgrrrrrr0s  	z_patch.__exit__cCs |j}|jj||S)z-Activate a patch, returning any created mock.)r_active_patchesr)rgrNrrrstartHsz_patch.startcCs3y|jj|Wntk
r(YnX|jS)zStop an active patch.)rrr,r)rgrrrstopOs

z_patch.stop)r#r$r%rrr'rr*rrrrrrr rrrrr1s
(~rcsfyjdd\}Wn+ttfk
rItdfYnXfdd}||fS)Nrrz.Need a valid target to patch. You supplied: %rcs
tS)N)rr)rrrrasz_get_target.<locals>.<lambda>)rsplitrr,)rrrr)rr_get_target[sr"c

s4fdd}	t|	||||||||	S)a
    patch the named member (`attribute`) on an object (`target`) with a mock
    object.

    `patch.object` can be used as a decorator, class decorator or a context
    manager. Arguments `new`, `spec`, `create`, `spec_set`,
    `autospec` and `new_callable` have the same meaning as for `patch`. Like
    `patch`, `patch.object` takes arbitrary keyword arguments for configuring
    the mock object it creates.

    When used as a class decorator `patch.object` honours `patch.TEST_PREFIX`
    for choosing which methods to wrap.
    csS)Nrr)rrrrwsz_patch_object.<locals>.<lambda>)r)
rrrrrrrrr2rr)rr
_patch_objectesr#c
sttkr'fdd}nfdd}|sKtdt|j}|d\}	}
t||	|
|||||i	}|	|_x[|ddD]I\}	}
t||	|
|||||i	}|	|_|jj|qW|S)aPerform multiple patches in a single call. It takes the object to be
    patched (either as an object or a string to fetch the object by importing)
    and keyword arguments for the patches::

        with patch.multiple(settings, FIRST_PATCH='one', SECOND_PATCH='two'):
            ...

    Use `DEFAULT` as the value if you want `patch.multiple` to create
    mocks for you. In this case the created mocks are passed into a decorated
    function by keyword, and a dictionary is returned when `patch.multiple` is
    used as a context manager.

    `patch.multiple` can be used as a decorator, class decorator or a context
    manager. The arguments `spec`, `spec_set`, `create`,
    `autospec` and `new_callable` have the same meaning as for `patch`. These
    arguments will be applied to *all* patches done by `patch.multiple`.

    When used as a class decorator `patch.multiple` honours `patch.TEST_PREFIX`
    for choosing which methods to wrap.
    cs
tS)N)rr)rrrrsz!_patch_multiple.<locals>.<lambda>csS)Nrr)rrrrsz=Must supply at least one keyword argument with patch.multiplerrN)	rstrr,rBrrrrr)
rrrrrrr2rrrrrZthis_patcherr)rr_patch_multiple~s&			r%c

Ks4t|\}}	t||	|||||||	S)a

    `patch` acts as a function decorator, class decorator or a context
    manager. Inside the body of the function or with statement, the `target`
    is patched with a `new` object. When the function/with statement exits
    the patch is undone.

    If `new` is omitted, then the target is replaced with a
    `MagicMock`. If `patch` is used as a decorator and `new` is
    omitted, the created mock is passed in as an extra argument to the
    decorated function. If `patch` is used as a context manager the created
    mock is returned by the context manager.

    `target` should be a string in the form `'package.module.ClassName'`. The
    `target` is imported and the specified object replaced with the `new`
    object, so the `target` must be importable from the environment you are
    calling `patch` from. The target is imported when the decorated function
    is executed, not at decoration time.

    The `spec` and `spec_set` keyword arguments are passed to the `MagicMock`
    if patch is creating one for you.

    In addition you can pass `spec=True` or `spec_set=True`, which causes
    patch to pass in the object being mocked as the spec/spec_set object.

    `new_callable` allows you to specify a different class, or callable object,
    that will be called to create the `new` object. By default `MagicMock` is
    used.

    A more powerful form of `spec` is `autospec`. If you set `autospec=True`
    then the mock will be created with a spec from the object being replaced.
    All attributes of the mock will also have the spec of the corresponding
    attribute of the object being replaced. Methods and functions being
    mocked will have their arguments checked and will raise a `TypeError` if
    they are called with the wrong signature. For mocks replacing a class,
    their return value (the 'instance') will have the same spec as the class.

    Instead of `autospec=True` you can pass `autospec=some_object` to use an
    arbitrary object as the spec instead of the one being replaced.

    By default `patch` will fail to replace attributes that don't exist. If
    you pass in `create=True`, and the attribute doesn't exist, patch will
    create the attribute for you when the patched function is called, and
    delete it again afterwards. This is useful for writing tests against
    attributes that your production code creates at runtime. It is off by
    default because it can be dangerous. With it switched on you can write
    passing tests against APIs that don't actually exist!

    Patch can be used as a `TestCase` class decorator. It works by
    decorating each test method in the class. This reduces the boilerplate
    code when your test methods share a common patchings set. `patch` finds
    tests by looking for method names that start with `patch.TEST_PREFIX`.
    By default this is `test`, which matches the way `unittest` finds tests.
    You can specify an alternative prefix by setting `patch.TEST_PREFIX`.

    Patch can be used as a context manager, with the with statement. Here the
    patching applies to the indented block after the with statement. If you
    use "as" then the patched object will be bound to the name after the
    "as"; very useful if `patch` is creating a mock object for you.

    `patch` takes arbitrary keyword arguments. These will be passed to
    the `Mock` (or `new_callable`) on construction.

    `patch.dict(...)`, `patch.multiple(...)` and `patch.object(...)` are
    available for alternate use-cases.
    )r"r)
rrrrrrrr2rrrrrrsEc@s|eZdZdZfdddZddZddZd	d
ZddZd
dZ	ddZ
eZe
ZdS)_patch_dicta#
    Patch a dictionary, or dictionary like object, and restore the dictionary
    to its original state after the test.

    `in_dict` can be a dictionary or a mapping like container. If it is a
    mapping then it must at least support getting, setting and deleting items
    plus iterating over keys.

    `in_dict` can also be a string specifying the name of the dictionary, which
    will then be fetched by importing it.

    `values` can be a dictionary of values to set in the dictionary. `values`
    can also be an iterable of `(key, value)` pairs.

    If `clear` is True then the dictionary will be cleared before the new
    values are set.

    `patch.dict` can also be called with arbitrary keyword arguments to set
    values in the dictionary::

        with patch.dict('sys.modules', mymodule=Mock(), other_module=Mock()):
            ...

    `patch.dict` can be used as a context manager, decorator or class
    decorator. When used as a class decorator `patch.dict` honours
    `patch.TEST_PREFIX` for choosing which methods to wrap.
    FcKsYt|trt|}||_t||_|jj|||_d|_dS)N)	rr$rin_dictrnrrclear	_original)rgr'rr(r2rrrr's		z_patch_dict.__init__csAttrjStfdd}|S)Nc
s-jz||SWdjXdS)N)r&
_unpatch_dict)r1r)frgrr_inner&s
z$_patch_dict.__call__.<locals>._inner)rrrr)rgr+r,r)r+rgrr*#s
!z_patch_dict.__call__cCsx{t|D]m}t||}|jtjr
t|dr
t|j|j|j	}||}t
|||q
W|S)Nr*)rr@rrrrr&r'rr(rz)rgrrr	Z	decoratorZ	decoratedrrrr1sz_patch_dict.decorate_classcCs|jdS)zPatch the dict.N)r&)rgrrrr<sz_patch_dict.__enter__cCs|j}|j}|j}y|j}Wn7tk
rdi}x|D]}||||<qHWYnX||_|r~t|y|j|Wn1tk
rx|D]}||||<qWYnXdS)N)rr'r(rr(r)_clear_dictr)rgrr'r(rMrrrrr&As"			

	


z_patch_dict._patch_dictcCse|j}|j}t|y|j|Wn1tk
r`x|D]}||||<qDWYnXdS)N)r'r)r-rr()rgr'rMrrrrr*[s		


z_patch_dict._unpatch_dictcGs|jdS)zUnpatch the dict.F)r*)rgr1rrrrhs
z_patch_dict.__exit__N)
r#r$r%r;r'r*rrr&r*rrr rrrrr&s
r&cCsKy|jWn6tk
rFt|}x|D]
}||=q1WYnXdS)N)r(r(rB)r'keysrrrrr-qs

r-cCs(x!ttjD]}|jqWdS)z7Stop all active patches. LIFO to unroll nested patches.N)rrrr )rrrr_patch_stopallzsr/Ztestzlt le gt ge eq ne getitem setitem delitem len contains iter hash str sizeof enter exit divmod rdivmod neg pos abs invert complex int float index trunc floor ceil bool next zHadd sub mul matmul div floordiv mod lshift rshift and xor or pow truediv ccs|]}d|VqdS)zi%sNr)rnrrrrsrccs|]}d|VqdS)zr%sNr)rr1rrrrs__get____set__
__delete____reversed____missing__
__reduce__
__reduce_ex__Z__getinitargs____getnewargs____getstate____setstate__
__getformat__
__setformat__rhr__subclasses__
__format__Z__getnewargs_ex__csfdd}||_|S)z:Turns a callable object (like a mock) into a real functioncs|||S)Nr)rgr1r)r-rrmethodsz_get_method.<locals>.method)r#)rr-r@r)r-rrs	rcCsh|]}d|qS)z__%s__r)rr@rrrrs	rmrr'rZ__prepare____instancecheck____subclasscheck____del____hash__cCs
tj|S)N)rrC)rgrrrrsr__str__cCs
tj|S)N)rrD)rgrrrrs
__sizeof__cCs
tj|S)N)rrE)rgrrrrs__lt____gt____le____ge____int__rr__len__r__complex__y?	__float__g?__bool__	__index__csfdd}|S)Ncs0jj}|tk	r|S|kr,dStS)NT)__eq__rrrNotImplemented)otherr)rgrrrPsz_get_eq.<locals>.__eq__r)rgrPr)rgr_get_eqsrScsfdd}|S)Ncs*jjtk	rtS|kr&dStS)NF)__ne__rrrrQ)rR)rgrrrTs
z_get_ne.<locals>.__ne__r)rgrTr)rgr_get_nesrUcsfdd}|S)Ncs,jj}|tkr"tgSt|S)N)rrrrr)r)rgrrrs
z_get_iter.<locals>.__iter__r)rgrr)rgr	_get_itersrVrPrTrcCstj|t}|tk	r+||_dStj|}|dk	ry||}Wntk
rvt|}YnX||_dStj|}|dk	r|||_dS)N)_return_valuesrGrrZ_calculate_return_valuer(_side_effect_methodsr`)r7r@rZfixedZreturn_calulatorrZZ
side_effectorrrr_set_return_values	
	rZc@s(eZdZddZddZdS)
MagicMixincOs1|jtt|j|||jdS)N)_mock_set_magicsrr[r')rgr1rrrrr's
zMagicMixin.__init__cCst}t|dddk	rvtj|j}t}t|}x0|D](}|t|jkrJt||qJW|tt|j}t|}x'|D]}t||t	||qWdS)Nr)
_magicsr@intersectionrrorrFrrz
MagicProxy)rgZthese_magicsZ
remove_magicsrrrrrr\s	


zMagicMixin._mock_set_magicsN)r#r$r%r'r\rrrrr[sr[c@s%eZdZdZdddZdS)rz-A version of `MagicMock` that isn't callable.FcCs|j|||jdS)zAdd a spec to a mock. `spec` can either be an object or a
        list of strings. Only attributes on the `spec` can be fetched as
        attributes from the mock.

        If `spec_set` is True then only attributes on the spec can be set.N)rr\)rgrrrrrr/sz"NonCallableMagicMock.mock_add_specN)r#r$r%r;rrrrrr-sc@s%eZdZdZdddZdS)ra
    MagicMock is a subclass of Mock with default implementations
    of most of the magic methods. You can use MagicMock without having to
    configure the magic methods yourself.

    If you use the `spec` or `spec_set` arguments then *only* magic
    methods that exist in the spec will be created.

    Attributes and the return value of a `MagicMock` will also be `MagicMocks`.
    FcCs|j|||jdS)zAdd a spec to a mock. `spec` can either be an object or a
        list of strings. Only attributes on the `spec` can be fetched as
        attributes from the mock.

        If `spec_set` is True then only attributes on the spec can be set.N)rr\)rgrrrrrrEszMagicMock.mock_add_specN)r#r$r%r;rrrrrr:s
c@sCeZdZddZddZddZddd	ZdS)
r_cCs||_||_dS)N)rr)rgrrrrrr'Qs	zMagicProxy.__init__cOs|j}|||S)N)create_mock)rgr1r2mrrrr*UszMagicProxy.__call__cCsT|j}|j}|jd|d|d|}t|||t||||S)Nrrr)rrrrzrZ)rgrrrarrrr`Ys			zMagicProxy.create_mockNcCs
|jS)N)r`)rgrrrrrr2bszMagicProxy.__get__)r#r$r%r'r*r`r2rrrrr_Ps	r_c@s:eZdZdZddZddZddZdS)	_ANYz2A helper object that compares equal to everything.cCsdS)NTr)rgrRrrrrPjsz_ANY.__eq__cCsdS)NFr)rgrRrrrrTmsz_ANY.__ne__cCsdS)Nz<ANY>r)rgrrrrhpsz
_ANY.__repr__N)r#r$r%r;rPrTrhrrrrrbgsrbcCsd|}d}djdd|D}djddt|jD}|r`|}|r|rv|d7}||7}||S)Nz%s(%%s)rz, cSsg|]}t|qSr)repr)rrrrrrzs	z*_format_call_signature.<locals>.<listcomp>cSs&g|]\}}d||fqS)z%s=%rr)rrrprrrr|s	)rrr)rr1r2rZformatted_argsZargs_stringZ
kwargs_stringrrrrws
"

rc@seZdZdZfddddddZfdddddd	Zd
dZejZdd
Z	ddZ
ddZddZddZ
ddZdS)ra
    A tuple for holding the results of a call to a mock, either in the form
    `(args, kwargs)` or `(name, args, kwargs)`.

    If args or kwargs are empty then a call tuple will compare equal to
    a tuple without those values. This makes comparisons less verbose::

        _Call(('name', (), {})) == ('name',)
        _Call(('name', (1,), {})) == ('name', (1,))
        _Call(((), {'a': 'b'})) == ({'a': 'b'},)

    The `_Call` object provides a useful shortcut for comparing with call::

        _Call(((1, 2), {'a': 3})) == call(1, 2, a=3)
        _Call(('foo', (1, 2), {'a': 3})) == call.foo(1, 2, a=3)

    If the _Call has no name then it will match any name.
    rNFTcCsf}i}t|}|dkr6|\}}}n|dkr|\}	}
t|	tr|	}t|
tr{|
}q|
}q|	|
}}nK|dkr|\}t|tr|}nt|tr|}n|}|rtj|||fStj||||fS)Nrrcr)rrr$rCr)rrprrr	from_kallr1r2_lenfirstsecondrrrrs.					z
_Call.__new__cCs||_||_||_dS)N)rrrd)rgrprrrrdrrrr's		z_Call.__init__cCs|tkrdSyt|}Wntk
r8dSYnXd}t|dkr`|\}}n|\}}}d}|dkrfi}}n|dkr|\}}}n|dkr|\}	t|	tr|	}i}qt|	tr|	}fi}}qf}|	}np|dkr|\}
}t|
trr|
}t|trb|i}}qf|}}q|
|}}ndS|r||krdS||f||fkS)NTFrrcrrr)rrrrrCr$)rgrRZ	len_otherZ	self_nameZ	self_argsZself_kwargsZ
other_nameZ
other_argsZother_kwargsrprfrgrrrrPsJ
				z_Call.__eq__cOsW|jdkr(td||fddS|jd}t|j||fd|d|S)Nrrz()r)rr)rgr1r2rrrrr*s
z_Call.__call__cCsN|jdkr"td|ddSd|j|f}td|d|ddS)NrrdFz%s.%sr)rr)rgrrrrrrmsz_Call.__getattr__cOs|jd||S)Nr)rm)rgr1r2rrrrsz_Call.countcOs|jd||S)Nindex)rm)rgr1r2rrrrhsz_Call.indexcCs|js5|jpd}|jdr1d|}|St|dkr\d}|\}}nD|\}}}|szd}n&|jdsd|}n
d|}t|||S)Nrz()zcall%srczcall.%s)rdrrrr)rgrr1r2rrrrhs	
	

z_Call.__repr__cCsNg}|}x/|dk	r=|jr1|j||j}qWtt|S)zFor a call object that represents multiple calls, `call_list`
        returns a list of all the intermediate calls as well as the
        final call.N)rdrrrVr)rgvalsrrrr	call_list#s	

z_Call.call_list)r#r$r%r;rr'rPrrTr*rmrrhrhrjrrrrrs3	rrdcKst|rt|}t|t}d|i}|rHd|i}n|dkrZi}|rp|rpd|d<|j|t}tj|ri}n4t|st}n|r|rt	|rt}|j
d|}|}	|dkrd}	|d|d	|d
|	d||}
t|tr>t|
|}
nt
||
|||dk	rq|rq|
|j|<|r|rd|krt||ddd
dd|
|
_x@t|D]2}t|rqyt||}Wntk
rwYnXd|i}|rd|i}t|tsPt|||
||}
|
|
j|<n~|
}t|trn|
j}t|||}||d<td|d|d
|d	||}
|
|
j|<t
||
d|t|
trt|
||
qW|
S)aICreate a mock object using another object as a spec. Attributes on the
    mock will use the corresponding attribute on the `spec` object as their
    spec.

    Functions or methods being mocked will have their arguments checked
    to check that they are called with the correct signature.

    If `spec_set` is True then attempting to set attributes that don't exist
    on the spec object will raise an `AttributeError`.

    If a class is used as a spec then the return value of the mock (the
    instance of the class) will have the same spec. You can use a class as the
    spec for an instance object by passing `instance=True`. The returned mock
    will only be callable if instances of the mock are callable.

    `create_autospec` also takes arbitrary keyword arguments that are passed to
    the constructor of the created mock.rrNTrrrrrrrZr9rz()rrr8)rDrrrrr+ZisdatadescriptorrArrIrr)rQr:rarrZrrer@r(rr7
_must_skiprz)rrr9rrr2is_typerrrr7rrMrrr8rrrr4st

		

	
	
cCst|ts4|t|dikr+dS|j}xq|jD]f}|jj|t}|tkrhq>t|tt	frdStt|ddt
r|SdSq>W|S)z[
    Return whether we should skip the first argument on spec's `entry`
    attribute.
    rFFr2N)rrr@rrErFrGrstaticmethodclassmethodMethodWrapperTypes)rrrlrrNrrrrks	rkcCs.y|jSWntk
r)t|SYnXdS)N)rr(r)rrrrrs
rc@s+eZdZdddddddZdS)rFNcCs:||_||_||_||_||_||_dS)N)ridsrrr9r)rgrrrrrpr9rrrr's					z_SpecState.__init__)r#r$r%r'rrrrrsrc#st|trdndfdd|jD}|dkr`|dd}n|ddd	|d
<x|D]}|VqWdS)Ns

csg|]}|qSrr)rl)seprrrs	z&_iterate_read_data.<locals>.<listcomp>rrtrtrtrt)rbytesr)	read_dataZdata_as_listliner)rsr_iterate_read_datas"
rxrcstfdd}fdd}fddtdkrddl}ttt|jjtt|ja|dkrtd	d
dt	}tdtj
_tdgdj
_dj_dj_dj_|j_d<dj_|j_fd
d}||_|_|S)a
    A helper function to create a mock to replace the use of `open`. It works
    for `open` called directly or used as a context manager.

    The `mock` argument is the mock object to configure. If `None` (the
    default) then a `MagicMock` will be created for you, with the API limited
    to methods or attributes available on standard file handles.

    `read_data` is a string for the `read` methoddline`, and `readlines` of the
    file handle to return.  This is an empty string by default.
    cs*jjdk	rjjStdS)Nr)	readlinesrZrB)r1r2)_statehandlerr_readlines_side_effect	s
z)mock_open.<locals>._readlines_side_effectcs6jjdk	rjjStjdS)Nr)readrZrr)r1r2)rzr{rvrr_read_side_effect	s
z$mock_open.<locals>._read_side_effectc3sWjjdk	r$xjjVqWxdD]}|Vq/WxtVqAWdS)Nr)readlinerZr)rw)rzr{rvrr_readline_side_effect	s	z(mock_open.<locals>._readline_side_effectNrropenrrcsGtd<jjdkrCd<dj_tS)Nrr)rxrr`r)r1r2)rrzr{rvrr
reset_data7	s

zmock_open.<locals>.reset_data)	file_spec_iorBror
TextIOWrapperunionBytesIOrrrrZrxwriter}rryr`)r7rvr|r~rrr)rrzr{rvrr	s.3
		c@s:eZdZdZddZddZddZdS)	r
aW
    A mock intended to be used as a property, or other descriptor, on a class.
    `PropertyMock` provides `__get__` and `__set__` methods so you can specify
    a return value when it is fetched.

    Fetching a `PropertyMock` instance from an object calls the mock, with
    no args. Setting it calls the mock with the value being set.
    cKs
t|S)N)r)rgr2rrrrM	szPropertyMock._get_child_mockcCs|S)Nr)rgrZobj_typerrrr2P	szPropertyMock.__get__cCs||dS)Nr)rgrrrrrr3R	szPropertyMock.__set__N)r#r$r%r;rr2r3rrrrr
D	s)s__all____version__r+rr
builtinstypesr	functoolsrrrr
BaseExceptionrplatformrZlangZ	Throwabler	superrrr rr!rr"r~ZDescriptorTypesr.r:r5rArDrIrQrLrerfrirrZMISSINGrZDELETEDrrqr|rrBrVrrrr
rrrrrrrr"r#r%rr&r-r/rnZmultipleZstopallrZ
magic_methodsZnumericsrrZinplacerightZ
_non_defaultsrr]rrrXrQrWrSrUrVrYrZr[rrr_rbrrrCrrrrkrrrPr)r2rorrxrr
rrrr<module>s			 +							e5+		1	Jv						""		%
		
	
		w	D