
    F-Pha                       d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlm	Z	 ddlm
Z
 ddlmZ d	d
lmZ e
rddlZddlmZ ddlZddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z  ddl!m"Z" ddl#m$Z$ ddl#m%Z% ddl&m'Z' ddl(m)Z) ddl(m*Z* ddl(m+Z+ ddl(m,Z, ddl-m.Z. dd l-m/Z/ dd!l0m1Z1 dd"l2m3Z3 dd#l2m4Z4  ed$          Z5 e5d%&          dd+            Z6 e5d%&          dd1            Z7 e5d%&          dd4            Z8 e5d%&          dd7            Z9 e5d%8          dd<            Z:dd>Z; e5d%8          dd@            Z< e5d%8          ddD            Z=ddGZ>ddHZ? e5d%dI ej@        dIdJK          iL          ddP            ZA e5d%8          ddT            ZB e5dI ej@        dIdUK          iV          ddW            ZCddYZDdd\ZEdd_ZFddaZG e5d%8          ddc            ZH e5d%dI ej@        dIddK          iL          ddf            ZI e5d%8          ddl            ZJ e5d%8          ddo            ZKddrZL e5d%8          ddv            ZM e5d%8          ddw            ZN e5d%8          ddz            ZOdd~ZPddZQddZRddZSddZT e5d%8          dd            ZUddZV e5d%8          dd            ZW e5d%8          dd            ZX e5d%8          dd            ZYddZZddZ[ddZ\ddZ]ddZ^ddZ_ e5d ej@        ddK          iV          dd            Z` e5d ej@        ddK          iV          dd            Za e5d%8          dd            ZbddZc e5d%&          dd            ZdddZeddZfddZgddZhddĄZiddńZjdS )zaHook specifications for pytest plugins which are invoked by pytest itself
and by builtin plugins.    )annotations)Mapping)Sequence)Path)Any)TYPE_CHECKING)HookspecMarker   )HOOK_LEGACY_PATH_ARGN)Literal)ExceptionInfo)ExceptionRepr)LEGACY_PATH)_PluggyPlugin)Config)ExitCode)PytestPluginManager)Parser)
FixtureDef)
SubRequest)Session)	Collector)Item)Exit)Class)Function)Metafunc)Module)CollectReport)
TestReport)CallInfo)TerminalReporter)TestShortLogReportpytestT)historicpluginmanagerr   returnNonec                    dS )a  Called at plugin registration time to allow adding new hooks via a call to
    :func:`pluginmanager.add_hookspecs(module_or_class, prefix) <pytest.PytestPluginManager.add_hookspecs>`.

    :param pluginmanager: The pytest plugin manager.

    .. note::
        This hook is incompatible with hook wrappers.

    Use in conftest plugins
    =======================

    If a conftest plugin implements this hook, it will be called immediately
    when the conftest is registered.
    N )r&   s    P/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/_pytest/hookspec.pypytest_addhooksr,   8             pluginr   plugin_namestrmanagerc                    dS )a>  A new pytest plugin got registered.

    :param plugin: The plugin module or instance.
    :param plugin_name: The name by which the plugin is registered.
    :param manager: The pytest plugin manager.

    .. note::
        This hook is incompatible with hook wrappers.

    Use in conftest plugins
    =======================

    If a conftest plugin implements this hook, it will be called immediately
    when the conftest is registered, once for each plugin registered thus far
    (including itself!), and for all plugins thereafter when they are
    registered.
    Nr*   )r/   r0   r2   s      r+   pytest_plugin_registeredr4   J   r-   r.   parserr   c                    dS )a  Register argparse-style options and ini-style config values,
    called once at the beginning of a test run.

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

    :param pluginmanager:
        The pytest plugin manager, which can be used to install :py:func:`~pytest.hookspec`'s
        or :py:func:`~pytest.hookimpl`'s and allow one plugin to call another plugin's hooks
        to change how command line options are added.

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

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

    - :py:func:`config.getini(name) <pytest.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.

    .. note::
        This hook is incompatible with hook wrappers.

    Use in conftest plugins
    =======================

    If a conftest plugin implements this hook, it will be called immediately
    when the conftest is registered.

    This hook is only called for :ref:`initial conftests <pluginorder>`.
    Nr*   )r5   r&   s     r+   pytest_addoptionr7   c   r-   r.   configr   c                    dS )a  Allow plugins and conftest files to perform initial configuration.

    .. note::
        This hook is incompatible with hook wrappers.

    :param config: The pytest config object.

    Use in conftest plugins
    =======================

    This hook is called for every :ref:`initial conftest <pluginorder>` file
    after command line options have been parsed. After that, the hook is called
    for other conftest files as they are registered.
    Nr*   r8   s    r+   pytest_configurer;      r-   r.   )firstresultargs	list[str]Config | Nonec                    dS )a?  Return an initialized :class:`~pytest.Config`, parsing the specified args.

    Stops at first non-None result, see :ref:`firstresult`.

    .. note::
        This hook is only called for plugin classes passed to the
        ``plugins`` arg when using `pytest.main`_ to perform an in-process
        test run.

    :param pluginmanager: The pytest plugin manager.
    :param args: List of arguments passed on the command line.
    :returns: A pytest config object.

    Use in conftest plugins
    =======================

    This hook is not called for conftest files.
    Nr*   )r&   r=   s     r+   pytest_cmdline_parserA      r-   r.   early_configc                    dS )a  Called to implement the loading of :ref:`initial conftest files
    <pluginorder>` ahead of command line option parsing.

    :param early_config: The pytest config object.
    :param args: Arguments passed on the command line.
    :param parser: To add command line options.

    Use in conftest plugins
    =======================

    This hook is not called for conftest files.
    Nr*   )rB   r5   r=   s      r+   pytest_load_initial_conftestsrD      r-   r.   ExitCode | int | Nonec                    dS )a  Called for performing the main command line action.

    The default implementation will invoke the configure hooks and
    :hook:`pytest_runtestloop`.

    Stops at first non-None result, see :ref:`firstresult`.

    :param config: The pytest config object.
    :returns: The exit code.

    Use in conftest plugins
    =======================

    This hook is only called for :ref:`initial conftests <pluginorder>`.
    Nr*   r:   s    r+   pytest_cmdline_mainrG      r-   r.   sessionr   object | Nonec                    dS )a  Perform the collection phase for the given session.

    Stops at first non-None result, see :ref:`firstresult`.
    The return value is not used, but only stops further processing.

    The default collection phase is this (see individual hooks for full details):

    1. Starting from ``session`` as the initial collector:

      1. ``pytest_collectstart(collector)``
      2. ``report = pytest_make_collect_report(collector)``
      3. ``pytest_exception_interact(collector, call, report)`` if an interactive exception occurred
      4. For each collected node:

        1. If an item, ``pytest_itemcollected(item)``
        2. If a collector, recurse into it.

      5. ``pytest_collectreport(report)``

    2. ``pytest_collection_modifyitems(session, config, items)``

      1. ``pytest_deselected(items)`` for any deselected items (may be called multiple times)

    3. ``pytest_collection_finish(session)``
    4. Set ``session.items`` to the list of collected items
    5. Set ``session.testscollected`` to the number of collected items

    You can implement this hook to only perform some action before collection,
    for example the terminal plugin uses it to start displaying the collection
    counter (and returns `None`).

    :param session: The pytest session object.

    Use in conftest plugins
    =======================

    This hook is only called for :ref:`initial conftests <pluginorder>`.
    Nr*   rH   s    r+   pytest_collectionrL      r-   r.   items
list[Item]c                    dS )aW  Called after collection has been performed. May filter or re-order
    the items in-place.

    When items are deselected (filtered out from ``items``),
    the hook :hook:`pytest_deselected` must be called explicitly
    with the deselected items to properly notify other plugins,
    e.g. with ``config.hook.pytest_deselected(items=deselected_items)``.

    :param session: The pytest session object.
    :param config: The pytest config object.
    :param items: List of item objects.

    Use in conftest plugins
    =======================

    Any conftest plugin can implement this hook.
    Nr*   )rH   r8   rM   s      r+   pytest_collection_modifyitemsrP     r-   r.   c                    dS )zCalled after collection has been performed and modified.

    :param session: The pytest session object.

    Use in conftest plugins
    =======================

    Any conftest plugin can implement this hook.
    Nr*   rK   s    r+   pytest_collection_finishrR   %  r-   r.   pathcollection_path)pylib_path_argpathlib_path_arg)r<   warn_on_impl_argsr   r   bool | Nonec                    dS )a  Return ``True`` to ignore this path for collection.

    Return ``None`` to let other plugins ignore the path for collection.

    Returning ``False`` will forcefully *not* ignore this path for collection,
    without giving a chance for other plugins to ignore this path.

    This hook is consulted for all files and directories prior to calling
    more specific hooks.

    Stops at first non-None result, see :ref:`firstresult`.

    :param collection_path: The path to analyze.
    :type collection_path: pathlib.Path
    :param path: The path to analyze (deprecated).
    :param config: The pytest config object.

    .. versionchanged:: 7.0.0
        The ``collection_path`` parameter was added as a :class:`pathlib.Path`
        equivalent of the ``path`` parameter. The ``path`` parameter
        has been deprecated.

    Use in conftest plugins
    =======================

    Any conftest file can implement this hook. For a given collection path, only
    conftest files in parent directories of the collection path are consulted
    (if the path is a directory, its own conftest file is *not* consulted - a
    directory cannot ignore itself!).
    Nr*   )rT   rS   r8   s      r+   pytest_ignore_collectrZ   1  r-   r.   parentr   Collector | Nonec                    dS )ah  Create a :class:`~pytest.Collector` for the given directory, or None if
    not relevant.

    .. versionadded:: 8.0

    For best results, the returned collector should be a subclass of
    :class:`~pytest.Directory`, but this is not required.

    The new node needs to have the specified ``parent`` as a parent.

    Stops at first non-None result, see :ref:`firstresult`.

    :param path: The path to analyze.
    :type path: pathlib.Path

    See :ref:`custom directory collectors` for a simple example of use of this
    hook.

    Use in conftest plugins
    =======================

    Any conftest file can implement this hook. For a given collection path, only
    conftest files in parent directories of the collection path are consulted
    (if the path is a directory, its own conftest file is *not* consulted - a
    directory cannot collect itself!).
    Nr*   )rS   r[   s     r+   pytest_collect_directoryr^   \  r-   r.   	file_path)rW   c                    dS )a/  Create a :class:`~pytest.Collector` for the given path, or None if not relevant.

    For best results, the returned collector should be a subclass of
    :class:`~pytest.File`, but this is not required.

    The new node needs to have the specified ``parent`` as a parent.

    :param file_path: The path to analyze.
    :type file_path: pathlib.Path
    :param path: The path to collect (deprecated).

    .. versionchanged:: 7.0.0
        The ``file_path`` parameter was added as a :class:`pathlib.Path`
        equivalent of the ``path`` parameter. The ``path`` parameter
        has been deprecated.

    Use in conftest plugins
    =======================

    Any conftest file can implement this hook. For a given file path, only
    conftest files in parent directories of the file path are consulted.
    Nr*   )r_   rS   r[   s      r+   pytest_collect_filera   z  r-   r.   	collectorc                    dS )a2  Collector starts collecting.

    :param collector:
        The collector.

    Use in conftest plugins
    =======================

    Any conftest file can implement this hook. For a given collector, only
    conftest files in the collector's directory and its parent directories are
    consulted.
    Nr*   rb   s    r+   pytest_collectstartre     r-   r.   itemr   c                    dS )a  We just collected a test item.

    :param item:
        The item.

    Use in conftest plugins
    =======================

    Any conftest file can implement this hook. For a given item, only conftest
    files in the item's directory and its parent directories are consulted.
    Nr*   rf   s    r+   pytest_itemcollectedri     r-   r.   reportr   c                    dS )a6  Collector finished collecting.

    :param report:
        The collect report.

    Use in conftest plugins
    =======================

    Any conftest file can implement this hook. For a given collector, only
    conftest files in the collector's directory and its parent directories are
    consulted.
    Nr*   rj   s    r+   pytest_collectreportrm     r-   r.   Sequence[Item]c                    dS )a  Called for deselected test items, e.g. by keyword.

    Note that this hook has two integration aspects for plugins:

    - it can be *implemented* to be notified of deselected items
    - it must be *called* from :hook:`pytest_collection_modifyitems`
      implementations when items are deselected (to properly notify other plugins).

    May be called multiple times.

    :param items:
        The items.

    Use in conftest plugins
    =======================

    Any conftest file can implement this hook.
    Nr*   )rM   s    r+   pytest_deselectedrp     r-   r.   CollectReport | Nonec                    dS )a  Perform :func:`collector.collect() <pytest.Collector.collect>` and return
    a :class:`~pytest.CollectReport`.

    Stops at first non-None result, see :ref:`firstresult`.

    :param collector:
        The collector.

    Use in conftest plugins
    =======================

    Any conftest file can implement this hook. For a given collector, only
    conftest files in the collector's directory and its parent directories are
    consulted.
    Nr*   rd   s    r+   pytest_make_collect_reportrs     r-   r.   module_pathModule | Nonec                    dS )a  Return a :class:`pytest.Module` collector or None for the given path.

    This hook will be called for each matching test module path.
    The :hook:`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`.

    :param module_path: The path of the module to collect.
    :type module_path: pathlib.Path
    :param path: The path of the module to collect (deprecated).

    .. versionchanged:: 7.0.0
        The ``module_path`` parameter was added as a :class:`pathlib.Path`
        equivalent of the ``path`` parameter.

        The ``path`` parameter has been deprecated in favor of ``fspath``.

    Use in conftest plugins
    =======================

    Any conftest file can implement this hook. For a given parent collector,
    only conftest files in the collector's directory and its parent directories
    are consulted.
    Nr*   )rt   rS   r[   s      r+   pytest_pycollect_makemodulerw     r-   r.   Module | Classnameobjobject0None | Item | Collector | list[Item | Collector]c                    dS )aE  Return a custom item/collector for a Python object in a module, or None.

    Stops at first non-None result, see :ref:`firstresult`.

    :param collector:
        The module/class collector.
    :param name:
        The name of the object in the module/class.
    :param obj:
        The object.
    :returns:
        The created items/collectors.

    Use in conftest plugins
    =======================

    Any conftest file can implement this hook. For a given collector, only
    conftest files in the collector's directory and its parent directories
    are consulted.
    Nr*   )rb   ry   rz   s      r+   pytest_pycollect_makeitemr~     r-   r.   
pyfuncitemr   c                    dS )al  Call underlying test function.

    Stops at first non-None result, see :ref:`firstresult`.

    :param pyfuncitem:
        The function item.

    Use in conftest plugins
    =======================

    Any conftest file can implement this hook. For a given item, only
    conftest files in the item's directory and its parent directories
    are consulted.
    Nr*   )r   s    r+   pytest_pyfunc_callr   8  r-   r.   metafuncr   c                    dS )a  Generate (multiple) parametrized calls to a test function.

    :param metafunc:
        The :class:`~pytest.Metafunc` helper for the test function.

    Use in conftest plugins
    =======================

    Any conftest file can implement this hook. For a given function definition,
    only conftest files in the functions's directory and its parent directories
    are consulted.
    Nr*   )r   s    r+   pytest_generate_testsr   J  r-   r.   valargname
str | Nonec                    dS )a6  Return a user-friendly string representation of the given ``val``
    that will be used by @pytest.mark.parametrize calls, or 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`.

    :param config: The pytest config object.
    :param val: The parametrized value.
    :param argname: The automatic parameter name produced by pytest.

    Use in conftest plugins
    =======================

    Any conftest file can implement this hook.
    Nr*   )r8   r   r   s      r+   pytest_make_parametrize_idr   Y  r-   r.   c                    dS )a1  Perform the main runtest loop (after collection finished).

    The default hook implementation performs the runtest protocol for all items
    collected in the session (``session.items``), unless the collection failed
    or the ``collectonly`` pytest option is set.

    If at any point :py:func:`pytest.exit` is called, the loop is
    terminated immediately.

    If at any point ``session.shouldfail`` or ``session.shouldstop`` are set, the
    loop is terminated after the runtest protocol for the current item is finished.

    :param session: The pytest session object.

    Stops at first non-None result, see :ref:`firstresult`.
    The return value is not used, but only stops further processing.

    Use in conftest plugins
    =======================

    Any conftest file can implement this hook.
    Nr*   rK   s    r+   pytest_runtestloopr   s  r-   r.   nextitemItem | Nonec                    dS )ax  Perform the runtest protocol for a single test item.

    The default runtest protocol is this (see individual hooks for full details):

    - ``pytest_runtest_logstart(nodeid, location)``

    - Setup phase:
        - ``call = pytest_runtest_setup(item)`` (wrapped in ``CallInfo(when="setup")``)
        - ``report = pytest_runtest_makereport(item, call)``
        - ``pytest_runtest_logreport(report)``
        - ``pytest_exception_interact(call, report)`` if an interactive exception occurred

    - Call phase, if the setup passed and the ``setuponly`` pytest option is not set:
        - ``call = pytest_runtest_call(item)`` (wrapped in ``CallInfo(when="call")``)
        - ``report = pytest_runtest_makereport(item, call)``
        - ``pytest_runtest_logreport(report)``
        - ``pytest_exception_interact(call, report)`` if an interactive exception occurred

    - Teardown phase:
        - ``call = pytest_runtest_teardown(item, nextitem)`` (wrapped in ``CallInfo(when="teardown")``)
        - ``report = pytest_runtest_makereport(item, call)``
        - ``pytest_runtest_logreport(report)``
        - ``pytest_exception_interact(call, report)`` if an interactive exception occurred

    - ``pytest_runtest_logfinish(nodeid, location)``

    :param item: Test item for which the runtest protocol is performed.
    :param nextitem: The scheduled-to-be-next test item (or None if this is the end my friend).

    Stops at first non-None result, see :ref:`firstresult`.
    The return value is not used, but only stops further processing.

    Use in conftest plugins
    =======================

    Any conftest file can implement this hook.
    Nr*   rf   r   s     r+   pytest_runtest_protocolr     r-   r.   nodeidlocationtuple[str, int | None, str]c                    dS )aP  Called at the start of running the runtest protocol for a single item.

    See :hook:`pytest_runtest_protocol` for a description of the runtest protocol.

    :param nodeid: Full node ID of the item.
    :param location: A tuple of ``(filename, lineno, testname)``
        where ``filename`` is a file path relative to ``config.rootpath``
        and ``lineno`` is 0-based.

    Use in conftest plugins
    =======================

    Any conftest file can implement this hook. For a given item, only conftest
    files in the item's directory and its parent directories are consulted.
    Nr*   r   r   s     r+   pytest_runtest_logstartr     r-   r.   c                    dS )aN  Called at the end of running the runtest protocol for a single item.

    See :hook:`pytest_runtest_protocol` for a description of the runtest protocol.

    :param nodeid: Full node ID of the item.
    :param location: A tuple of ``(filename, lineno, testname)``
        where ``filename`` is a file path relative to ``config.rootpath``
        and ``lineno`` is 0-based.

    Use in conftest plugins
    =======================

    Any conftest file can implement this hook. For a given item, only conftest
    files in the item's directory and its parent directories are consulted.
    Nr*   r   s     r+   pytest_runtest_logfinishr     r-   r.   c                    dS )a  Called to perform the setup phase for a test item.

    The default implementation runs ``setup()`` on ``item`` and all of its
    parents (which haven't been setup yet). This includes obtaining the
    values of fixtures required by the item (which haven't been obtained
    yet).

    :param item:
        The item.

    Use in conftest plugins
    =======================

    Any conftest file can implement this hook. For a given item, only conftest
    files in the item's directory and its parent directories are consulted.
    Nr*   rh   s    r+   pytest_runtest_setupr     r-   r.   c                    dS )an  Called to run the test for test item (the call phase).

    The default implementation calls ``item.runtest()``.

    :param item:
        The item.

    Use in conftest plugins
    =======================

    Any conftest file can implement this hook. For a given item, only conftest
    files in the item's directory and its parent directories are consulted.
    Nr*   rh   s    r+   pytest_runtest_callr     r-   r.   c                    dS )aB  Called to perform the teardown phase for a test item.

    The default implementation runs the finalizers and calls ``teardown()``
    on ``item`` and all of its parents (which need to be torn down). This
    includes running the teardown phase of fixtures required by the item (if
    they go out of scope).

    :param item:
        The item.
    :param nextitem:
        The scheduled-to-be-next test item (None if no further test item is
        scheduled). This argument is used to perform exact teardowns, i.e.
        calling just enough finalizers so that nextitem only needs to call
        setup functions.

    Use in conftest plugins
    =======================

    Any conftest file can implement this hook. For a given item, only conftest
    files in the item's directory and its parent directories are consulted.
    Nr*   r   s     r+   pytest_runtest_teardownr     r-   r.   callCallInfo[None]TestReport | Nonec                    dS )a?  Called to create a :class:`~pytest.TestReport` for each of
    the setup, call and teardown runtest phases of a test item.

    See :hook:`pytest_runtest_protocol` for a description of the runtest protocol.

    :param item: The item.
    :param call: The :class:`~pytest.CallInfo` for the phase.

    Stops at first non-None result, see :ref:`firstresult`.

    Use in conftest plugins
    =======================

    Any conftest file can implement this hook. For a given item, only conftest
    files in the item's directory and its parent directories are consulted.
    Nr*   )rf   r   s     r+   pytest_runtest_makereportr     r-   r.   r    c                    dS )a  Process the :class:`~pytest.TestReport` produced for each
    of the setup, call and teardown runtest phases of an item.

    See :hook:`pytest_runtest_protocol` for a description of the runtest protocol.

    Use in conftest plugins
    =======================

    Any conftest file can implement this hook. For a given item, only conftest
    files in the item's directory and its parent directories are consulted.
    Nr*   rl   s    r+   pytest_runtest_logreportr   +  r-   r.   CollectReport | TestReportdict[str, Any] | Nonec                    dS )aw  Serialize the given report object into a data structure suitable for
    sending over the wire, e.g. converted to JSON.

    :param config: The pytest config object.
    :param report: The report.

    Use in conftest plugins
    =======================

    Any conftest file can implement this hook. The exact details may depend
    on the plugin which calls the hook.
    Nr*   )r8   rj   s     r+   pytest_report_to_serializabler   9  r-   r.   datadict[str, Any]!CollectReport | TestReport | Nonec                    dS )a>  Restore a report object previously serialized with
    :hook:`pytest_report_to_serializable`.

    :param config: The pytest config object.

    Use in conftest plugins
    =======================

    Any conftest file can implement this hook. The exact details may depend
    on the plugin which calls the hook.
    Nr*   )r8   r   s     r+   pytest_report_from_serializabler   L  r-   r.   
fixturedefFixtureDef[Any]requestr   c                    dS )a  Perform fixture setup execution.

    :param fixturedef:
        The fixture definition object.
    :param request:
        The fixture request object.
    :returns:
        The return value of the call to the fixture function.

    Stops at first non-None result, see :ref:`firstresult`.

    .. note::
        If the fixture function returns None, other implementations of
        this hook function will continue to be called, according to the
        behavior of the :ref:`firstresult` option.

    Use in conftest plugins
    =======================

    Any conftest file can implement this hook. For a given fixture, only
    conftest files in the fixture scope's directory and its parent directories
    are consulted.
    Nr*   r   r   s     r+   pytest_fixture_setupr   c  r-   r.   c                    dS )a  Called after fixture teardown, but before the cache is cleared, so
    the fixture result ``fixturedef.cached_result`` is still available (not
    ``None``).

    :param fixturedef:
        The fixture definition object.
    :param request:
        The fixture request object.

    Use in conftest plugins
    =======================

    Any conftest file can implement this hook. For a given fixture, only
    conftest files in the fixture scope's directory and its parent directories
    are consulted.
    Nr*   r   s     r+   pytest_fixture_post_finalizerr     r-   r.   c                    dS )a1  Called after the ``Session`` object has been created and before performing collection
    and entering the run test loop.

    :param session: The pytest session object.

    Use in conftest plugins
    =======================

    This hook is only called for :ref:`initial conftests <pluginorder>`.
    Nr*   rK   s    r+   pytest_sessionstartr     r-   r.   
exitstatusint | ExitCodec                    dS )aC  Called after whole test run finished, right before returning the exit status to the system.

    :param session: The pytest session object.
    :param exitstatus: The status which pytest will return to the system.

    Use in conftest plugins
    =======================

    Any conftest file can implement this hook.
    Nr*   )rH   r   s     r+   pytest_sessionfinishr     r-   r.   c                    dS )zCalled before test process is exited.

    :param config: The pytest config object.

    Use in conftest plugins
    =======================

    Any conftest file can implement this hook.
    Nr*   r:   s    r+   pytest_unconfigurer     r-   r.   opleftrightlist[str] | Nonec                    dS )a  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.

    :param config: The pytest config object.
    :param op: The operator, e.g. `"=="`, `"!="`, `"not in"`.
    :param left: The left operand.
    :param right: The right operand.

    Use in conftest plugins
    =======================

    Any conftest file can implement this hook. For a given item, only conftest
    files in the item's directory and its parent directories are consulted.
    Nr*   )r8   r   r   r   s       r+   pytest_assertrepr_comparer     r-   r.   linenointorigexplc                    dS )a=  Called whenever an assertion passes.

    .. versionadded:: 5.0

    Use this hook to do some processing after a passing assertion.
    The original assertion information is available in the `orig` string
    and the pytest introspected assertion information is available in the
    `expl` string.

    This hook must be explicitly enabled by the ``enable_assertion_pass_hook``
    ini-file option:

    .. code-block:: ini

        [pytest]
        enable_assertion_pass_hook=true

    You need to **clean the .pyc** files in your project directory and interpreter libraries
    when enabling this option, as assertions will require to be re-written.

    :param item: pytest item object of current test.
    :param lineno: Line number of the assert statement.
    :param orig: String with the original assertion.
    :param expl: String with the assert explanation.

    Use in conftest plugins
    =======================

    Any conftest file can implement this hook. For a given item, only conftest
    files in the item's directory and its parent directories are consulted.
    Nr*   )rf   r   r   r   s       r+   pytest_assertion_passr     r-   r.   startdir
start_pathstr | list[str]c                    dS )aF  Return a string or list of strings to be displayed as header info for terminal reporting.

    :param config: The pytest config object.
    :param start_path: The starting dir.
    :type start_path: pathlib.Path
    :param startdir: The starting dir (deprecated).

    .. note::

        Lines returned by a plugin are displayed before those of plugins which
        ran before it.
        If you want to have your line(s) displayed first, use
        :ref:`trylast=True <plugin-hookorder>`.

    .. versionchanged:: 7.0.0
        The ``start_path`` parameter was added as a :class:`pathlib.Path`
        equivalent of the ``startdir`` parameter. The ``startdir`` parameter
        has been deprecated.

    Use in conftest plugins
    =======================

    This hook is only called for :ref:`initial conftests <pluginorder>`.
    Nr*   )r8   r   r   s      r+   pytest_report_headerr     r-   r.   c                    dS )a  Return a string or list of strings to be displayed after collection
    has finished successfully.

    These strings will be displayed after the standard "collected X items" message.

    .. versionadded:: 3.2

    :param config: The pytest config object.
    :param start_path: The starting dir.
    :type start_path: pathlib.Path
    :param startdir: The starting dir (deprecated).
    :param items: List of pytest items that are going to be executed; this list should not be modified.

    .. note::

        Lines returned by a plugin are displayed before those of plugins which
        ran before it.
        If you want to have your line(s) displayed first, use
        :ref:`trylast=True <plugin-hookorder>`.

    .. versionchanged:: 7.0.0
        The ``start_path`` parameter was added as a :class:`pathlib.Path`
        equivalent of the ``startdir`` parameter. The ``startdir`` parameter
        has been deprecated.

    Use in conftest plugins
    =======================

    Any conftest plugin can implement this hook.
    Nr*   )r8   r   r   rM   s       r+   pytest_report_collectionfinishr   *  r-   r.   JTestShortLogReport | tuple[str, str, str | tuple[str, Mapping[str, bool]]]c                    dS )a  Return result-category, shortletter and verbose word for status
    reporting.

    The result-category is a category in which to count the result, for
    example "passed", "skipped", "error" or the empty string.

    The shortletter is shown as testing progresses, for example ".", "s",
    "E" or the empty string.

    The verbose word is shown as testing progresses in verbose mode, for
    example "PASSED", "SKIPPED", "ERROR" or the empty string.

    pytest may style these implicitly according to the report outcome.
    To provide explicit styling, return a tuple for the verbose word,
    for example ``"rerun", "R", ("RERUN", {"yellow": True})``.

    :param report: The report object whose status is to be returned.
    :param config: The pytest config object.
    :returns: The test status.

    Stops at first non-None result, see :ref:`firstresult`.

    Use in conftest plugins
    =======================

    Any conftest plugin can implement this hook.
    Nr*   )rj   r8   s     r+   pytest_report_teststatusr   W  r-   r.   terminalreporterr"   r   c                    dS )a  Add a section to terminal summary reporting.

    :param terminalreporter: The internal terminal reporter object.
    :param exitstatus: The exit status that will be reported back to the OS.
    :param config: The pytest config object.

    .. versionadded:: 4.2
        The ``config`` parameter.

    Use in conftest plugins
    =======================

    Any conftest plugin can implement this hook.
    Nr*   )r   r   r8   s      r+   pytest_terminal_summaryr   x  r-   r.   warning_messagewarnings.WarningMessagewhen'Literal['config', 'collect', 'runtest']tuple[str, int, str] | Nonec                    dS )a  Process a warning captured by the internal pytest warnings plugin.

    :param warning_message:
        The captured warning. This is the same object produced by :class:`warnings.catch_warnings`,
        and contains the same attributes as the parameters of :py:func:`warnings.showwarning`.

    :param when:
        Indicates when the warning was captured. Possible values:

        * ``"config"``: during pytest configuration/initialization stage.
        * ``"collect"``: during test collection.
        * ``"runtest"``: during test execution.

    :param nodeid:
        Full id of the item. Empty string for warnings that are not specific to
        a particular node.

    :param location:
        When available, holds information about the execution context of the captured
        warning (filename, linenumber, function). ``function`` evaluates to <module>
        when the execution context is at the module level.

    .. versionadded:: 6.0

    Use in conftest plugins
    =======================

    Any conftest file can implement this hook. If the warning is specific to a
    particular node, only conftest files in parent directories of the node are
    consulted.
    Nr*   )r   r   r   r   s       r+   pytest_warning_recordedr     r-   r.   c                    dS )a  Called when constructing the globals dictionary used for
    evaluating string conditions in xfail/skipif markers.

    This is useful when the condition for a marker requires
    objects that are expensive or impossible to obtain during
    collection time, which is required by normal boolean
    conditions.

    .. versionadded:: 6.2

    :param config: The pytest config object.
    :returns: A dictionary of additional globals to add.

    Use in conftest plugins
    =======================

    Any conftest file can implement this hook. For a given item, only conftest
    files in parent directories of the item are consulted.
    Nr*   r:   s    r+   pytest_markeval_namespacer     r-   r.   excreprr   excinfoExceptionInfo[BaseException]c                    dS )aW  Called for internal errors.

    Return True to suppress the fallback handling of printing an
    INTERNALERROR message directly to sys.stderr.

    :param excrepr: The exception repr object.
    :param excinfo: The exception info.

    Use in conftest plugins
    =======================

    Any conftest plugin can implement this hook.
    Nr*   )r   r   s     r+   pytest_internalerrorr     r-   r.   'ExceptionInfo[KeyboardInterrupt | Exit]c                    dS )zCalled for keyboard interrupt.

    :param excinfo: The exception info.

    Use in conftest plugins
    =======================

    Any conftest plugin can implement this hook.
    Nr*   )r   s    r+   pytest_keyboard_interruptr     r-   r.   nodeItem | CollectorCallInfo[Any]c                    dS )aj  Called when an exception was raised which can potentially be
    interactively handled.

    May be called during collection (see :hook:`pytest_make_collect_report`),
    in which case ``report`` is a :class:`~pytest.CollectReport`.

    May be called during runtest of an item (see :hook:`pytest_runtest_protocol`),
    in which case ``report`` is a :class:`~pytest.TestReport`.

    This hook is not called if the exception that was raised is an internal
    exception like ``skip.Exception``.

    :param node:
        The item or collector.
    :param call:
        The call information. Contains the exception.
    :param report:
        The collection or test report.

    Use in conftest plugins
    =======================

    Any conftest file can implement this hook. For a given node, only conftest
    files in parent directories of the node are consulted.
    Nr*   )r   r   rj   s      r+   pytest_exception_interactr     r-   r.   pdbpdb.Pdbc                    dS )aL  Called upon pdb.set_trace().

    Can be used by plugins to take special action just before the python
    debugger enters interactive mode.

    :param config: The pytest config object.
    :param pdb: The Pdb instance.

    Use in conftest plugins
    =======================

    Any conftest plugin can implement this hook.
    Nr*   r8   r   s     r+   pytest_enter_pdbr     r-   r.   c                    dS )ar  Called when leaving pdb (e.g. with continue after pdb.set_trace()).

    Can be used by plugins to take special action just after the python
    debugger leaves interactive mode.

    :param config: The pytest config object.
    :param pdb: The Pdb instance.

    Use in conftest plugins
    =======================

    Any conftest plugin can implement this hook.
    Nr*   r   s     r+   pytest_leave_pdbr   (  r-   r.   )r&   r   r'   r(   )r/   r   r0   r1   r2   r   r'   r(   )r5   r   r&   r   r'   r(   )r8   r   r'   r(   )r&   r   r=   r>   r'   r?   )rB   r   r5   r   r=   r>   r'   r(   )r8   r   r'   rE   )rH   r   r'   rI   )rH   r   r8   r   rM   rN   r'   r(   )rH   r   r'   r(   )rT   r   rS   r   r8   r   r'   rX   )rS   r   r[   r   r'   r\   )r_   r   rS   r   r[   r   r'   r\   )rb   r   r'   r(   )rf   r   r'   r(   )rj   r   r'   r(   )rM   rn   r'   r(   )rb   r   r'   rq   )rt   r   rS   r   r'   ru   )rb   rx   ry   r1   rz   r{   r'   r|   )r   r   r'   rI   )r   r   r'   r(   )r8   r   r   r{   r   r1   r'   r   )rf   r   r   r   r'   rI   )r   r1   r   r   r'   r(   )rf   r   r   r   r'   r(   )rf   r   r   r   r'   r   )rj   r    r'   r(   )r8   r   rj   r   r'   r   )r8   r   r   r   r'   r   )r   r   r   r   r'   rI   )r   r   r   r   r'   r(   )rH   r   r   r   r'   r(   )
r8   r   r   r1   r   r{   r   r{   r'   r   )
rf   r   r   r   r   r1   r   r1   r'   r(   )r8   r   r   r   r   r   r'   r   )
r8   r   r   r   r   r   rM   rn   r'   r   )rj   r   r8   r   r'   r   )r   r"   r   r   r8   r   r'   r(   )
r   r   r   r   r   r1   r   r   r'   r(   )r8   r   r'   r   )r   r   r   r   r'   rX   )r   r   r'   r(   )r   r   r   r   rj   r   r'   r(   )r8   r   r   r   r'   r(   )k__doc__
__future__r   collections.abcr   r   pathlibr   typingr   r   pluggyr	   
deprecatedr   r   r   warnings_pytest._code.coder   r   _pytest.compatr   _pytest.configr   r   r   r   _pytest.config.argparsingr   _pytest.fixturesr   r   _pytest.mainr   _pytest.nodesr   r   _pytest.outcomesr   _pytest.pythonr   r   r   r   _pytest.reportsr   r    _pytest.runnerr!   _pytest.terminalr"   r#   hookspecr,   r4   r7   r;   rA   rD   rG   rL   rP   rR   formatrZ   r^   ra   re   ri   rm   rp   rs   rw   r~   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r*   r.   r+   <module>r     s	
    # " " " " " # # # # # # $ $ $ $ $ $                         ! ! ! ! ! ! , , , , , ,  4JJJOOO000000000000******,,,,,,%%%%%%''''''222222000000++++++++++++$$$$$$''''''""""""%%%%%%$$$$$$''''''''''''%%%%%%------******''''''111111333333 >(## 
4   " 
4   0 
4% % % %P 
4   . 
d   .   " 
d   . 
d& & & &R   ,	 	 	 	 
+$+!4E
 
 
         F 
d   : 
+$+!K
 
 
     <            * 
d   . 
+$+!M
 
 
     < 
d   2 
d   "    
d   2 
d   2 
d% % % %P   $   (   &       0 
d   &    
d   $ 
d   , 
d   8   4
 
 
 
    	 	 	 	"   .   N 
/(/%
 
 
     : 
/(/%
 
 
  # # # #L 
d   @   * 
4$ $ $ $X   :   &      @         r.   