
^Yc           @   s)  d  Z  d d l m Z e d  Z e d e  d    Z e d e  d    Z e d e  d    Z e d e  d    Z e d e  d	    Z	 e d
 e  d    Z
 d   Z e d
 e  d    Z d   Z e d
 e  d    Z d   Z d   Z e d
 e  d    Z e d
 e  d    Z d   Z d   Z d   Z d   Z d   Z e d
 e  d    Z e d
 e  d    Z e d
 e  d    Z e d
 e  d    Z d   Z e d
 e  d    Z e d
 e  d    Z d    Z e d
 e  d!    Z  d"   Z! d#   Z" d$   Z# d%   Z$ e d
 e  d&    Z% d'   Z& e d
 e  d(    Z' d)   Z( d*   Z) d+   Z* d,   Z+ d-   Z, d.   Z- e d
 e  d/    Z. d0   Z/ e d e  d1    Z0 e d
 e  d2    Z1 d3   Z2 d4   Z3 d5   Z4 d6   Z5 d7 S(8   sT    hook specifications for pytest plugins, invoked from main.py and builtin plugins.  i(   t   HookspecMarkert   pytestt   historicc         C   s   d S(   s   called at plugin registration time to allow adding new hooks via a call to
    pluginmanager.add_hookspecs(module_or_class, prefix).N(    (   t   pluginmanager(    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_addhooks   s    c           C   s   d S(   s   
    DEPRECATED: this hook causes direct monkeypatching on pytest, its use is strongly discouraged
    return dict of name->object to be made globally available in
    the pytest namespace.  This hook is called at plugin registration
    time.
    N(    (    (    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_namespace   s    c         C   s   d S(   s%    a new pytest plugin got registered. N(    (   t   plugint   manager(    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_plugin_registered   s    c         C   s   d S(   sz  register argparse-style options and ini-style config values,
    called once at the beginning of a test run.

    .. note::

        This function should be implemented only in plugins or ``conftest.py``
        files situated at the tests root directory due to how pytest
        :ref:`discovers plugins during startup <pluginorder>`.

    :arg parser: To add command line options, call
        :py:func:`parser.addoption(...) <_pytest.config.Parser.addoption>`.
        To add ini-file values call :py:func:`parser.addini(...)
        <_pytest.config.Parser.addini>`.

    Options can later be accessed through the
    :py:class:`config <_pytest.config.Config>` object, respectively:

    - :py:func:`config.getoption(name) <_pytest.config.Config.getoption>` to
      retrieve the value of a command line option.

    - :py:func:`config.getini(name) <_pytest.config.Config.getini>` to retrieve
      a value read from an ini-style file.

    The config object is passed around on many internal objects via the ``.config``
    attribute or can be retrieved as the ``pytestconfig`` fixture or accessed
    via (deprecated) ``pytest.config``.
    N(    (   t   parser(    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_addoption   s    c         C   s   d S(   s    called after command line options have been parsed
    and all plugins and initial conftest files been loaded.
    This hook is called for every plugin.
    N(    (   t   config(    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_configure=   s    t   firstresultc         C   s   d S(   sz   return initialized config object, parsing the specified args.

    Stops at first non-None result, see :ref:`firstresult` N(    (   R   t   args(    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_cmdline_parseJ   s    c         C   s   d S(   sB   (deprecated) modify command line arguments before option parsing. N(    (   R   R   (    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_cmdline_preparseP   s    c         C   s   d S(   s    called for performing the main command line action. The default
    implementation will invoke the configure hooks and runtest_mainloop.

    Stops at first non-None result, see :ref:`firstresult` N(    (   R   (    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_cmdline_mainS   s    c         C   s   d S(   s\    implements the loading of initial conftest files ahead
    of command line option parsing. N(    (   t   early_configR	   R   (    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_load_initial_conftestsZ   s    c         C   s   d S(   st    perform the collection protocol for the given session.

    Stops at first non-None result, see :ref:`firstresult` N(    (   t   session(    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_collectionc   s    c         C   s   d S(   s[    called after collection has been performed, may filter or re-order
    the items in-place.N(    (   R   R   t   items(    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_collection_modifyitemsi   s    c         C   s   d S(   s:    called after collection has been performed and modified. N(    (   R   (    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_collection_finishm   s    c         C   s   d S(   s    return True to prevent considering this path for collection.
    This hook is consulted for all files and directories prior to calling
    more specific hooks.

    Stops at first non-None result, see :ref:`firstresult`
    N(    (   t   pathR   (    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_ignore_collectp   s    c         C   s   d S(   sx    called before traversing a directory for collection files.

    Stops at first non-None result, see :ref:`firstresult` N(    (   R   t   parent(    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_collect_directoryy   s    c         C   s   d S(   sx    return collection Node or None for the given path. Any new node
    needs to have the specified ``parent`` as a parent.N(    (   R   R   (    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_collect_file   s    c         C   s   d S(   s    collector starts collecting. N(    (   t	   collector(    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_collectstart   s    c         C   s   d S(   s     we just collected a test item. N(    (   t   item(    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_itemcollected   s    c         C   s   d S(   s     collector finished collecting. N(    (   t   report(    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_collectreport   s    c         C   s   d S(   s.    called for test items deselected by keyword. N(    (   R   (    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_deselected   s    c         C   s   d S(   sy    perform ``collector.collect()`` and return a CollectReport.

    Stops at first non-None result, see :ref:`firstresult` N(    (   R   (    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_make_collect_report   s    c         C   s   d S(   s;   return a Module collector or None for the given path.
    This hook will be called for each matching test module path.
    The pytest_collect_file hook needs to be used if you want to
    create test modules for files that do not match as a test module.

    Stops at first non-None result, see :ref:`firstresult` N(    (   R   R   (    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_pycollect_makemodule   s    c         C   s   d S(   s    return custom item/collector for a python object in a module, or None.

    Stops at first non-None result, see :ref:`firstresult` N(    (   R   t   namet   obj(    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_pycollect_makeitem   s    c         C   s   d S(   s\    call underlying test function.

    Stops at first non-None result, see :ref:`firstresult` N(    (   t
   pyfuncitem(    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_pyfunc_call   s    c         C   s   d S(   s;    generate (multiple) parametrized calls to a test function.N(    (   t   metafunc(    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_generate_tests   s    c         C   s   d S(   s,  Return a user-friendly string representation of the given ``val`` that will be used
    by @pytest.mark.parametrize calls. Return None if the hook doesn't know about ``val``.
    The parameter name is available as ``argname``, if required.

    Stops at first non-None result, see :ref:`firstresult` N(    (   R   t   valt   argname(    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_make_parametrize_id   s    c         C   s   d S(   s    called for performing the main runtest loop
    (after collection finished).

    Stops at first non-None result, see :ref:`firstresult` N(    (   R   (    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_runtestloop   s    c         C   s   d S(   s,    (deprecated, use pytest_runtest_logstart). N(    (   R    t   node(    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_itemstart   s    c         C   s   d S(   s/   implements the runtest_setup/call/teardown protocol for
    the given test item, including capturing exceptions and calling
    reporting hooks.

    :arg item: test item for which the runtest protocol is performed.

    :arg nextitem: the scheduled-to-be-next test item (or None if this
                   is the end my friend).  This argument is passed on to
                   :py:func:`pytest_runtest_teardown`.

    :return boolean: True if no further hook implementations should be invoked.


    Stops at first non-None result, see :ref:`firstresult` N(    (   R    t   nextitem(    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_runtest_protocol   s    c         C   s   d S(   s1    signal the start of running a single test item. N(    (   t   nodeidt   location(    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_runtest_logstart   s    c         C   s   d S(   s.    called before ``pytest_runtest_call(item)``. N(    (   R    (    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_runtest_setup   s    c         C   s   d S(   s&    called to execute the test ``item``. N(    (   R    (    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_runtest_call   s    c         C   s   d S(   sX   called after ``pytest_runtest_call``.

    :arg nextitem: the scheduled-to-be-next test item (None if no further
                   test item is scheduled).  This argument can be used to
                   perform exact teardowns, i.e. calling just enough finalizers
                   so that nextitem only needs to call setup-functions.
    N(    (   R    R4   (    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_runtest_teardown   s    c         C   s   d S(   s    return a :py:class:`_pytest.runner.TestReport` object
    for the given :py:class:`pytest.Item <_pytest.main.Item>` and
    :py:class:`_pytest.runner.CallInfo`.

    Stops at first non-None result, see :ref:`firstresult` N(    (   R    t   call(    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_runtest_makereport   s    c         C   s   d S(   se    process a test setup/call/teardown report relating to
    the respective phase of executing a test. N(    (   R"   (    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_runtest_logreport   s    c         C   s   d S(   s_    performs fixture setup execution.

    Stops at first non-None result, see :ref:`firstresult` N(    (   t
   fixturedeft   request(    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_fixture_setup   s    c         C   s   d S(   s    called after fixture teardown, but before the cache is cleared so
    the fixture result cache ``fixturedef.cached_result`` can
    still be accessed.N(    (   R?   (    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_fixture_post_finalizer  s    c         C   s   d S(   s"    before session.main() is called. N(    (   R   (    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_sessionstart
  s    c         C   s   d S(   s    whole test run finishes. N(    (   R   t
   exitstatus(    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_sessionfinish  s    c         C   s   d S(   s(    called before test process is exited.  N(    (   R   (    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_unconfigure  s    c         C   s   d S(   sl  return explanation for comparisons in failing assert expressions.

    Return None for no custom explanation, otherwise return a list
    of strings.  The strings will be joined by newlines but any newlines
    *in* a string will be escaped.  Note that all but the first line will
    be indented slightly, the intention is for the first line to be a summary.
    N(    (   R   t   opt   leftt   right(    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_assertrepr_compare  s    c         C   s   d S(   s/   return a string to be displayed as header info for terminal reporting.

    .. note::

        This function should be implemented only in plugins or ``conftest.py``
        files situated at the tests root directory due to how pytest
        :ref:`discovers plugins during startup <pluginorder>`.
    N(    (   R   t   startdir(    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_report_header%  s    c         C   s   d S(   s    return result-category, shortletter and verbose word for reporting.

    Stops at first non-None result, see :ref:`firstresult` N(    (   R"   (    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_report_teststatus/  s    c         C   s   d S(   s8    add additional section in terminal summary reporting.  N(    (   t   terminalreporterRD   (    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_terminal_summary5  s    c         C   s   d S(   s    process a warning specified by a message, a code string,
    a nodeid and fslocation (both of which may be None
    if the warning is not tied to a partilar node/location).N(    (   t   messaget   codeR6   t
   fslocation(    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_logwarning9  s    c         C   s   d S(   sj    return processed content for a given doctest

    Stops at first non-None result, see :ref:`firstresult` N(    (   t   content(    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_doctest_prepare_contentC  s    c         C   s   d S(   s    called for internal errors. N(    (   t   excreprt   excinfo(    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_internalerrorM  s    c         C   s   d S(   s     called for keyboard interrupt. N(    (   RW   (    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_keyboard_interruptP  s    c         C   s   d S(   s   called when an exception was raised which can potentially be
    interactively handled.

    This hook is only called if an exception was raised
    that is not an internal exception like ``skip.Exception``.
    N(    (   R2   R<   R"   (    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_exception_interactS  s    c         C   s   d S(   s    called upon pdb.set_trace(), can be used by plugins to take special
    action just before the python debugger enters in interactive mode.

    :arg config: pytest config object
    :type config: _pytest.config.Config
    N(    (   R   (    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   pytest_enter_pdb[  s    N(6   t   __doc__t   _pytest._pluggyR    t   hookspect   TrueR   R   R   R
   R   R   R   R   R   R   R   R   R   R   R   R   R!   R#   R$   R%   R&   R)   R+   R-   R0   R1   R3   R5   R8   R9   R:   R;   R=   R>   RA   RB   RC   RE   RF   RJ   RL   RM   RO   RS   RU   RX   RY   RZ   R[   (    (    (    s0   /tmp/pip-build-hU8Cw8/pytest/_pytest/hookspec.pyt   <module>   sf   												
																
	

			