Your IP : 216.73.216.213


Current Path : /opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/
Upload File :
Current File : //opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyc

�
�mYc@s�dZddlZddlZdZdddddgZejd	d
fkZdfd��YZdfd��YZd
�Z	dfd��YZ
dfd��YZd�Zd�Z
dfd��YZer�ddUndfd��YZdefd��YZdfd��YZed�Zdfd��YZdefd ��YZd!fd"��YZdefd#��YZdefd$��YZeed%�r�d&�Zn	d'�ZdS((s9
PluginManager, basic initialization and tracing.

pluggy is the cristallized core of plugin management as used
by some 150 plugins for pytest.

Pluggy uses semantic versioning. Breaking changes are only foreseen for
Major releases (incremented X in "X.Y.Z").  If you want to use pluggy in
your project you should thus use a dependency restriction like
"pluggy>=0.1.0,<1.0" to avoid surprises.

pluggy is concerned with hook specification, hook implementations and hook
calling.  For any given hook specification a hook call invokes up to N implementations.
A hook implementation can influence its position and type of execution:
if attributed "tryfirst" or "trylast" it will be tried to execute
first or last.  However, if attributed "hookwrapper" an implementation
can wrap all calls to non-hookwrapper implementations.  A hookwrapper
can thus execute some code ahead and after the execution of other hooks.

Hook specification is done by way of a regular python function where
both the function name and the names of all its arguments are significant.
Each hook implementation function is verified against the original specification
function, including the names of all its arguments.  To allow for hook specifications
to evolve over the livetime of a project, hook implementations can
accept less arguments.  One can thus add new arguments and semantics to
a hook specification by adding another argument typically without breaking
existing hook implementations.

The chosen approach is meant to let a hook designer think carefuly about
which objects are needed by an extension writer.  By contrast, subclass-based
extension mechanisms often expose a lot more state and behaviour than needed,
thus restricting future developments.

Pluggy currently consists of functionality for:

- a way to register new hook specifications.  Without a hook
  specification no hook calling can be performed.

- a registry of plugins which contain hook implementation functions.  It
  is possible to register plugins for which a hook specification is not yet
  known and validate all hooks when the system is in a more referentially
  consistent state.  Setting an "optionalhook" attribution to a hook
  implementation will avoid PluginValidationError's if a specification
  is missing.  This allows to have optional integration between plugins.

- a "hook" relay object from which you can launch 1:N calls to
  registered hook implementation functions

- a mechanism for ordering hook implementation functions

- mechanisms for two different type of 1:N calls: "firstresult" for when
  the call should stop when the first implementation returns a non-None result.
  And the other (default) way of guaranteeing that all hook implementations
  will be called and their non-None result collected.

- mechanisms for "historic" extension points such that all newly
  registered functions will receive all hook calls that happened
  before their registration.

- a mechanism for discovering plugin objects which are based on
  setuptools based entry points.

- a simple tracing mechanism, including tracing of plugin calls and
  their arguments.

i����Ns0.4.0t
PluginManagertPluginValidationErrort
HookCallErrortHookspecMarkertHookimplMarkeriicBs)eZdZd�Zdeed�ZRS(s Decorator helper class for marking functions as hook specifications.

    You can instantiate it with a project_name to get a decorator.
    Calling PluginManager.add_hookspecs later will discover all marked functions
    if the PluginManager uses the same project_name.
    cCs
||_dS(N(tproject_name(tselfR((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyt__init__Vscs3���fd�}|dk	r+||�S|SdS(sA if passed a function, directly sets attributes on the function
        which will make it discoverable to add_hookspecs().  If passed no
        function, returns a decorator which can be applied to a function
        later using the attributes supplied.

        If firstresult is True the 1:N hook call (N being the number of registered
        hook implementation functions) will stop at I<=N when the I'th function
        returns a non-None result.

        If historic is True calls to a hook will be memorized and replayed
        on later registered plugins.

        csE�r�rtd��nt|�jdtd�d���|S(Ns'cannot have a historic firstresult hookt_spectfirstresultthistoric(t
ValueErrortsetattrRtdict(tfunc(R	R
R(sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pytsetattr_hookspec_optsgs
N(tNone(RtfunctionR	R
R((R	R
RsQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyt__call__Ys
N(t__name__t
__module__t__doc__RRtFalseR(((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyRNs	cBs/eZdZd�Zdeeeed�ZRS(s
 Decorator helper class for marking functions as hook implementations.

    You can instantiate with a project_name to get a decorator.
    Calling PluginManager.register later will discover all marked functions
    if the PluginManager uses the same project_name.
    cCs
||_dS(N(R(RR((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyR{scs9�����fd�}|dkr+|S||�SdS(s if passed a function, directly sets attributes on the function
        which will make it discoverable to register().  If passed no function,
        returns a decorator which can be applied to a function later using
        the attributes supplied.

        If optionalhook is True a missing matching hook specification will not result
        in an error (by default it is an error if no matching spec is found).

        If tryfirst is True this hook implementation will run as early as possible
        in the chain of N hook implementations for a specfication.

        If trylast is True this hook implementation will run as late as possible
        in the chain of N hook implementations.

        If hookwrapper is True the hook implementations needs to execute exactly
        one "yield".  The code before the yield is run early before any non-hookwrapper
        function is run.  The code after the yield is run after all non-hookwrapper
        function have run.  The yield receives an ``_CallOutcome`` object representing
        the exception or result outcome of the inner calls (including other hookwrapper
        calls).

        cs6t|�jdtd�d�d�d���|S(Nt_implthookwrappertoptionalhookttryfirstttrylast(RRR
(R(RRRRR(sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pytsetattr_hookimpl_opts�sN(R(RRRRRRR((RRRRRsQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyR~sN(RRRRRRR(((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyRts		cCsD|jdt�|jdt�|jdt�|jdt�dS(NRRRR(t
setdefaultR(topts((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pytnormalize_hookimpl_opts�st
_TagTracercBs>eZd�Zd�Zd�Zd�Zd�Zd�ZRS(cCsi|_d|_d|_dS(Ni(t	_tag2procRtwritertindent(R((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyR�s		cCst||f�S(N(t
_TagTracerSub(Rtname((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pytget�sc	Cs�t|dt�r*|d}|d }ni}djtt|��}d|j}d||dj|�fg}x4|j�D]&\}}|jd|||f�q�W|S(Ni����t s  s
%s%s [%s]
t:s
%s    %s: %s
(t
isinstanceR
tjointmaptstrR#titemstappend(	RttagstargstextratcontentR#tlinesR%tvalue((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pytformat_message�s


cCsp|jdk	r@|r@|j||�}|jdj|��ny|j|||�Wntk
rknXdS(Nt(R"RR5R*R!tKeyError(RR/R0R3((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pytprocessmessage�s
cCs
||_dS(N(R"(RR"((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyt	setwriter�scCsMt|t�r't|jd��}nt|t�s<t�||j|<dS(NR((R)R,ttupletsplittAssertionErrorR!(RR/t	processor((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pytsetprocessor�s(RRRR&R5R8R9R>(((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyR �s						R$cBs,eZd�Zd�Zd�Zd�ZRS(cCs||_||_dS(N(trootR/(RR?R/((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyR�s	cGs|jj|j|�dS(N(R?R8R/(RR0((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyR�scCs|jj|j|�dS(N(R?R>R/(RR=((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pytsetmyprocessor�scCs|j|j|j|f�S(N(t	__class__R?R/(RR%((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyR&�s(RRRRR@R&(((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyR$�s			cCs2|j}td|j|j|j|f��dS(Nswrap_controller at %r %s:%d %s(tgi_codetRuntimeErrortco_nametco_filenametco_firstlineno(twrap_controllertmsgtco((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyt_raise_wrapfail�s	cCswyt|�Wntk
r.t|d�nXt|�}y|j|�t|d�Wntk
rlnX|j�S(s0 Wrap calling to a function with a generator which needs to yield
    exactly once.  The yield point will trigger calling the wrapped function
    and return its _CallOutcome to the yield point.  The generator then needs
    to finish (raise StopIteration) in order for the wrapped call to complete.
    s
did not yieldshas second yield(tnextt
StopIterationRJt_CallOutcometsendt
get_result(RGRtcall_outcome((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyt
_wrapped_call�s


RMcBs/eZdZdZd�Zd�Zd�ZRS(s� Outcome of a function call, either an exception or a proper result.
    Calling the ``get_result`` method will return the result or reraise
    the exception raised when the function was called. cCs7y|�|_Wn tk
r2tj�|_nXdS(N(tresultt
BaseExceptiontsystexc_infotexcinfo(RR((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyRs
cCs||_d|_dS(N(RRRRV(RRR((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pytforce_result
s	cCsM|jdkr|jS|j}tr?|dj|d��nt|�dS(Nii(RVRRRt_py3twith_tracebackt_reraise(Rtex((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyROs	N(RRRRRVRRWRO(((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyRMs
		s4
def _reraise(cls, val, tb):
    raise cls, val, tb
t_TracedHookExecutioncBs#eZd�Zd�Zd�ZRS(cCsP||_||_||_|j|_t|jt�s@t�||j_dS(N(t
pluginmanagertbeforetaftert_inner_hookexectoldcallR)R\R<(RR]R^R_((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyR"s			csW�j�j���t����fd��}�j|�j���|j�S(Ncs�j����S(N(Ra((thookt
hook_implstkwargsR(sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyt<lambda>,R6(R^R%RMR_RO(RRbRcRdtoutcome((RbRcRdRsQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyR*scCs|j|j_dS(N(RaR]R`(R((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pytundo0s(RRRRRg(((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyR\!s		cBs�eZdZdd�Zd�Zdd�Zd�Zddd�Zd�Z	d�Z
d�Zd	�Zd
�Z
d�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZRS(s� Core Pluginmanager class which manages registration
    of plugin objects and 1:N hook calling.

    You can register new hooks by calling ``add_hookspec(module_or_class)``.
    You can register plugin objects (which contain hooks) by calling
    ``register(plugin)``.  The Pluginmanager is initialized with a
    prefix that is searched for in the names of the dict of registered
    plugin objects.  An optional excludefunc allows to blacklist names which
    are not considered as hooks despite a matching prefix.

    For debugging purposes you can call ``enable_tracing()``
    which will subsequently send debug information to the trace helper.
    cCsp||_i|_i|_g|_t�jd�|_t|jjjd��|_	||_
d�|_dS(sr if implprefix is given implementation functions
        will be recognized if their name matches the implprefix. tpluginmanageRbcSst|||j�j�S(N(t
_MultiCallt	spec_optstexecute(RbtmethodsRd((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyReMsN(Rt_name2plugint_plugin2hookcallerst_plugin_distinfoR R&ttracet
_HookRelayR?Rbt_implprefixR`(RRt
implprefix((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyRCs					cCs|j|||�S(N(R`(RRbRlRd((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyt	_hookexecPsc	Cs�|p|j|�}||jks3||jkrq|jj|d�dkrRdStd|||jf��n||j|<g|j|<}x�t|�D]�}|j||�}|dk	r�t|�t	||�}t
||||�}t	|j|d�}|dkr7t||j
�}t|j||�n,|j�rc|j||�|j|�n|j|�|j|�q�q�W|S(s� Register a plugin and return its canonical name or None if the name
        is blocked from registering.  Raise a ValueError if the plugin is already
        registered. i����Ns#Plugin already registered: %s=%s
%s(tget_canonical_nameRmRnR&RRtdirtparse_hookimpl_optsRtgetattrtHookImplRbt_HookCallerRtRthas_spect_verify_hookt_maybe_apply_historyt
_add_hookimplR.(	RtpluginR%tplugin_namethookcallerst
hookimpl_optstmethodthookimplRb((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pytregisterUs0


cCs�t||�}yt||jdd�}Wntk
rEi}nX|dk	rkt|t�rkd}n0|dkr�|jr�|j|j�r�i}n|S(NR(RxRRt	ExceptionR)R
Rrt
startswith(RRR%R�tres((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyRwxs

	'	cCs�|dkr6|dk	s$td��|j|�}n|dkrT|j|�}n|jj|�rs|j|=nx*|jj|g�D]}|j|�q�W|S(sn unregister a plugin object and all its contained hook implementations
        from internal data structures. s+one of name or plugin needs to be specifiedN(	RR<tget_namet
get_pluginRmR&Rntpopt_remove_plugin(RRR%t
hookcaller((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyt
unregister�s
cCs!|jd|�d|j|<dS(sJ block registrations of the given name, unregister if already registered. R%N(R�RRm(RR%((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pytset_blocked�scCs ||jko|j|dkS(sA return True if the name blogs registering plugins of that name. N(RmR(RR%((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyt
is_blocked�scCs�g}x�t|�D]�}|j||�}|dk	rt|j|d�}|dkr�t||j||�}t|j||�n;|j||�x(|j	|j
D]}|j||�q�W|j|�qqW|s�t
d|j|f��ndS(s� add new hook specifications defined in the given module_or_class.
        Functions are recognized if they have been decorated accordingly. sdid not find any %r hooks in %rN(Rvtparse_hookspec_optsRRxRbRzRtRtset_specificationt	_wrapperst_nonwrappersR|R.RR(Rtmodule_or_classtnamesR%Rjthcthookfunction((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyt
add_hookspecs�scCs&t||�}t||jdd�S(NR(RxRR(RR�R%R�((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyR��scCs
t|j�S(s' return the set of registered plugins. (tsetRn(R((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pytget_plugins�scCs
||jkS(s2 Return True if the plugin is already registered. (Rn(RR((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyt
is_registered�scCs"t|dd�p!tt|��S(s	 Return canonical name for a plugin object. Note that a plugin
        may be registered under a different name which was specified
        by the caller of register(plugin, name). To obtain the name
        of an registered plugin use ``get_name(plugin)`` instead.RN(RxRR,tid(RR((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyRu�scCs|jj|�S(s- Return a plugin or None for the given name. (RmR&(RR%((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyR��scCs|j|�dk	S(s< Return True if a plugin with the given name is registered. N(R�R(RR%((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyt
has_plugin�scCs4x-|jj�D]\}}||kr|SqWdS(s> Return name for registered plugin or None if not registered. N(RmR-(RRR%tval((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyR��sc	Cs�|j�r4|jr4td|j|jf��nx]|jD]R}||jkr>td|j|j|t|j�dj|j�f��q>q>WdS(Ns6Plugin %r
hook %r
historic incompatible to hookwrappersXPlugin %r
hook %r
argument %r not available
plugin definition: %s
available hookargs: %ss, (	tis_historicRRR�R%targnamest
_formatdefRR*(RRbR�targ((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyR|�scCs�x�|jjD]z}|ddkr
t|j|�}|j�s�x@|j|jD]+}|jsRtd||jf��qRqRWq�q
q
WdS(s� Verify that all hooks which have not been verified against
        a hook specification are optional, otherwise raise PluginValidationErrorit_sunknown hook %r in plugin %rN(	Rbt__dict__RxR{R�R�RRR(RR%RbR�((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyt
check_pending�s	cCs�ddlm}m}m}x�||�D]�}|j|j�s)|j|j�rYq)ny|j�}Wn?|k
rq)n,|k
r�}td|j|f��nX|j	|d|j�|j
j||jf�q)Wt
|j
�S(ss Load modules from querying the specified setuptools entrypoint name.
        Return the number of loaded plugins. i����(titer_entry_pointstDistributionNotFoundtVersionConflicts"Plugin %r could not be loaded: %s!R%(t
pkg_resourcesR�R�R�R�R%R�tloadRR�RoR.tdisttlen(Rtentrypoint_nameR�R�R�tepRte((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pytload_setuptools_entrypoints�s$
cCs
t|j�S(sV return list of distinfo/plugin tuples for all setuptools registered
        plugins. (tlistRo(R((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pytlist_plugin_distinfoscCst|jj��S(s# return list of name/plugin pairs. (R�RmR-(R((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pytlist_name_plugin
scCs|jj|�S(s0 get all hook callers for the specified plugin. (RnR&(RR((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pytget_hookcallersscCst|||�jS(sG add before/after tracing functions for all hooks
        and return an undo function which, when called,
        will remove the added tracers.

        ``before(hook_name, hook_impls, kwargs)`` will be called ahead
        of all hook calls and receive a hookcaller instance, a list
        of HookImpl instances and the keyword arguments for the hook call.

        ``after(outcome, hook_name, hook_impls, kwargs)`` receives the
        same arguments as ``before`` but also a :py:class:`_CallOutcome`` object
        which represents the result of the overall hook call.
        (R\Rg(RR^R_((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pytadd_hookcall_monitorings
cs:|jj��fd�}�fd�}|j||�S(s; enable tracing of hook calls and return an undo function. cs#�jjd7_�||�dS(Ni(R?R#(t	hook_nameRlRd(t	hooktrace(sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyR^(scs>|jdkr(�d|d|j�n�jjd8_dS(Ntfinishs-->i(RVRRRR?R#(RfR�RlRd(R�(sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyR_,s(Rbt_traceR�(RR^R_((R�sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pytenable_tracing$sc	Cs�t|j|�}g|D]}t||�r|^q}|r�t|j|j|j|j�}xY|j|j	D]G}|j
}||krr|j|�|jj
|g�j|�qrqrW|S|S(s� Return a new _HookCaller instance for the named method
        which manages calls to all registered plugins except the
        ones from remove_plugins. (RxRbthasattrRzR%Rtt_specmodule_or_classRjR�R�RR~RnRR.(	RR%tremove_pluginstorigtplugtplugins_to_removeR�R�R((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pytsubset_hook_caller3s(	
#N(RRRRRRtR�RwR�R�R�R�R�R�R�RuR�R�R�R|R�R�R�R�R�R�R�R�(((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyR4s2

	#	
												
						RicBs,eZdZid�Zd�Zd�ZRS(s8 execute a call into multiple python functions/methods. cCs,||_||_||jd<||_dS(Nt
__multicall__(RcRdtspecopts(RRcRdR�((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyRPs		
cCs|j}g|_}|jjd�}x�|jr|jj�}y$g|jD]}||^qP}WnGtk
r�x7|jD](}||kr�td|f��q�q�WnX|j	r�t
|j|�|j�S|j|�}|dk	r+|r�|S|j|�q+q+W|s|SdS(NR	s"hook call must provide argument %r(RdtresultsR�R&RcR�R�R7RRRQRRkRR.(Rt
all_kwargsR�R	t	hook_impltargnameR0R�((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyRkVs*	
$
	cCsPdt|j�f}t|d�r?dt|j�|}nd||jfS(Ns%d methsR�s%d results, s<_MultiCall %s, kwargs=%r>(R�RcR�R�Rd(Rtstatus((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyt__repr__os(RRRRRkR�(((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyRiGs	cCszt|di�}y|dSWntk
r1nXtj|�rly
|j}Wntk
rbdSXd}nrtj|�r�tj|�r�yt|d|�}Wq�tk
r�dSXn|dkr�t
tj|��}ny
|j}Wntk
r�dSXy|j||j
!}Wntk
r0d	}n$X|j}|rT|t|� }ny||d<Wntk
runX|S(
s$ return argument name tuple for a function, method, class or callable.

    In case of a class, its "__init__" method is considered.
    For methods the "self" parameter is not included unless you are passing
    an unbound method with Python3 (which has no supports for unbound methods)
    R�t	_varnamesiR((N(((RxR7tinspecttisclassRtAttributeErrort
isfunctiontismethodR�Rtintt__code__tco_varnamestco_argcountt__defaults__R�t	TypeError(Rt
startindextcachetrawcodetxtdefaults((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pytvarnamesvsD


	 




	
RqcBseZdZd�ZRS(sh hook holder object for performing 1:N hook calls where N is the number
    of registered plugins.

    cCs
||_dS(N(R�(RRp((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyR�s(RRRR(((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyRq�sRzcBsweZddd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
ddd�Zd	�Zd
�Z
RS(cCsY||_g|_g|_||_|dk	rU|dk	sBt�|j||�ndS(N(R%R�R�RtRR<R�(RR%thook_executetspecmodule_or_classRj((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyR�s				cCs
t|d�S(NR�(R�(R((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyR{�scCs�|j�st�||_t||j�}t|dtj|��}d|ks[t�dgt|�|_	||_
|jd�r�g|_ndS(NR�RR�R
(
R{R<R�RxR%R�R�R�R�R�RjR&t
_call_history(RR�RjtspecfuncR�((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyR��s		cCs
t|d�S(NR�(R�(R((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyR��scsV�fd�}||j�dkrR||j�dkrRtd�f��qRndS(Ncs;x4t|�D]&\}}|j�kr
||=tSq
WdS(N(t	enumerateRtTrue(twrapperstiR�(R(sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pytremove�ssplugin %r not found(R�RR�R(RRR�((RsQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyR��scCs�|jr|j}n	|j}|jr:|jd|�ng|jrS|j|�nNt|�d}x'|dkr�||jr�|d8}qfW|j|d|�dS(Nii(RR�R�RtinsertRR.R�(RR�RlR�((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyR~�s				cCsd|jfS(Ns<_HookCaller %r>(R%(R((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyR��scKs0|j�st�|j||j|j|�S(N(R�R<RtR�R�(RRd((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyR�scCs=|jj|pi|f�|j||j|j|�dS(N(R�R.RtR�R�(RtprocRd((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyt
call_historic�scCs�t|j�t|j�f}xK|D]C}tdtdtdt�}tdd||�}|j|�q%Wz||�SWd|\|_|_XdS(s} Call the hook with some additional temporarily participating
        methods using the specified kwargs as call parameters. RRRs<temp>N(R�R�R�R
RRyRR~(RRlRdtoldR�RR�((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyt
call_extra�s
cCsh|j�rdxU|jD]G\}}|j||g|�}|r|dk	r||d�qqWndS(Ni(R�R�RtR(RR�RdR�R�((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyR}�s
N(RRRRR{R�R�R�R~R�RR�R�R}(((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyRz�s					
				
RycBseZd�ZRS(cCsJ||_t|j�|_||_||_||_|jj|�dS(N(RR�R�RRR�R�tupdate(RRR�Rthook_impl_opts((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyRs				(RRR(((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyRyscBseZdZRS(s plugin failed validation. (RRR(((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyRscBseZdZRS(s Hook was called wrongly. (RRR(((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyRst	signaturecCs d|jttj|��fS(Ns%s%s(RR,R�R�(R((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyR�scCs#d|jtjtj|��fS(Ns%s%s(RR�t
formatargspect
getargspec(R((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyR�s(RRTR�t__version__t__all__tversion_infoRXRRRR R$RJRQRMR\tobjectRRiRR�RqRzRyR�RRR�R�(((sQ/opt/alt/python27/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.pyt<module>Bs:	&/	/		�/.
W