o
    Zhk
                     @   s   d Z ddlZe dd Ze dd Zejeddd	d
 Zejedddd Zejdddd Ze dd Z	e dd Z
e dd Ze dd Zejdddd Zejdddd Zejdddd ZdS )a  
xdist hooks.

Additionally, pytest-xdist will also decorate a few other hooks
with the worker instance that executed the hook originally:

``pytest_runtest_logreport``: ``rep`` parameter has a ``node`` attribute.

You can use this hooks just as you would use normal pytest hooks, but some care
must be taken in plugins in case ``xdist`` is not installed. Please see:

    http://pytest.org/en/latest/writing_plugins.html#optionally-using-hooks-from-3rd-party-plugins
    Nc                 C      dS )z(called before any remote node is set up.N )configspecsr   r   E/var/www/html/lang_env/lib/python3.10/site-packages/xdist/newhooks.pypytest_xdist_setupnodes       r   c                 C   r   )z#called on new raw gateway creation.Nr   )Zgatewayr   r   r   pytest_xdist_newgateway   r   r	   zCrsync feature is deprecated and will be removed in pytest-xdist 4.0)Zwarn_on_implc                 C   r   )zBcalled before rsyncing a directory to remote gateways takes place.Nr   sourceZgatewaysr   r   r   pytest_xdist_rsyncstart   r   r   c                 C   r   )zAcalled after rsyncing a directory to remote gateways takes place.Nr   r
   r   r   r   pytest_xdist_rsyncfinish$   r   r   T)Zfirstresultc                   C   r   )z called when creating remote nodeNr   r   r   r   r   pytest_xdist_getremotemodule-   r   r   c                 C   r   )z7configure node information before it gets instantiated.Nr   noder   r   r   pytest_configure_node2   r   r   c                 C   r   )zTest Node is ready to operate.Nr   r   r   r   r   pytest_testnodeready7   r   r   c                 C   r   )zTest Node is down.Nr   )r   errorr   r   r   pytest_testnodedown<   r   r   c                 C   r   )zEcalled by the controller node when a worker node finishes collecting.Nr   )r   Zidsr   r   r   %pytest_xdist_node_collection_finishedA   r   r   c                 C   r   )z&return a node scheduler implementationNr   )r   logr   r   r   pytest_xdist_make_schedulerF   r   r   c                 C   r   )z
    Return the number of workers to spawn when ``--numprocesses=auto`` is given in the
    command-line.

    .. versionadded:: 2.1
    Nr   )r   r   r   r   pytest_xdist_auto_num_workersK   r   r   c                 C   r   )a  
    Handle a crashitem, modifying the report if necessary.

    The scheduler is provided as a parameter to reschedule the test if desired with
    `sched.mark_test_pending`.

    def pytest_handlecrashitem(crashitem, report, sched):
        if should_rerun(crashitem):
            sched.mark_test_pending(crashitem)
            report.outcome = "rerun"

    .. versionadded:: 2.2.1
    Nr   )Z	crashitemreportZschedr   r   r   pytest_handlecrashitemU   r   r   )__doc__ZpytestZhookspecr   r	   DeprecationWarningr   r   r   r   r   r   r   r   r   r   r   r   r   r   <module>   sD    














	