§
    “¸Îiµ  ã                  ó(  — d Z ddlmZ ddlZddlmc mZ ddl	m
Z
 ddlZddlmZ ddlmZ ddlZddlZerddlmZ ddlmZ dd	lmZ  ej        ¦   «         d7d„¦   «         Z ej        ¦   «         d8d„¦   «         Z ej         ed¦  «        ¬¦  «        d9d„¦   «         Z ej         ed¦  «        ¬¦  «        d9d„¦   «         Z ej        d¬¦  «        d:d„¦   «         Z ej        ¦   «         d;d"„¦   «         Z ej        ¦   «         d;d#„¦   «         Z ej        ¦   «         d<d&„¦   «         Z  ej        ¦   «         d=d)„¦   «         Z! ej        d¬¦  «        d>d-„¦   «         Z" ej        d¬¦  «        d?d/„¦   «         Z# ej        d¬¦  «        d@d6„¦   «         Z$dS )AaÔ  
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
é    )ÚannotationsN)ÚSequence)ÚAny)ÚTYPE_CHECKING)ÚProducer)Ú
Scheduling)ÚWorkerControllerÚconfigúpytest.ConfigÚspecsúSequence[execnet.XSpec]ÚreturnÚNonec                ó   — dS )z(Called before any remote node is set up.N© )r
   r   s     úU/home/ubuntu/.hermes/hermes-agent/venv/lib/python3.11/site-packages/xdist/newhooks.pyÚpytest_xdist_setupnodesr       ó   € € € ó    Úgatewayúexecnet.Gatewayc                ó   — dS )z#Called on new raw gateway creation.Nr   )r   s    r   Úpytest_xdist_newgatewayr   '   r   r   zCrsync feature is deprecated and will be removed in pytest-xdist 4.0)Úwarn_on_implÚsourceústr | os.PathLike[str]ÚgatewaysúSequence[execnet.Gateway]c                ó   — dS )zBCalled before rsyncing a directory to remote gateways takes place.Nr   ©r   r   s     r   Úpytest_xdist_rsyncstartr!   ,   r   r   c                ó   — dS )zACalled after rsyncing a directory to remote gateways takes place.Nr   r    s     r   Úpytest_xdist_rsyncfinishr#   8   r   r   T)Úfirstresultr   c                 ó   — dS )z!Called when creating remote node.Nr   r   r   r   Úpytest_xdist_getremotemoduler&   D   r   r   Únoder	   c                ó   — dS )z7Configure node information before it gets instantiated.Nr   ©r'   s    r   Úpytest_configure_noder*   I   r   r   c                ó   — dS )zTest Node is ready to operate.Nr   r)   s    r   Úpytest_testnodereadyr,   N   r   r   Úerrorúobject | Nonec                ó   — dS )zTest Node is down.Nr   )r'   r-   s     r   Úpytest_testnodedownr0   S   r   r   ÚidsúSequence[str]c                ó   — dS )zECalled by the controller node when a worker node finishes collecting.Nr   )r'   r1   s     r   Ú%pytest_xdist_node_collection_finishedr4   X   r   r   Úlogr   úScheduling | Nonec                ó   — dS )z'Return a node scheduler implementation.Nr   )r
   r5   s     r   Úpytest_xdist_make_schedulerr8   _   r   r   Úintc                ó   — t          ¦   «         ‚)z‰
    Return the number of workers to spawn when ``--numprocesses=auto`` is given in the
    command-line.

    .. versionadded:: 2.1
    )ÚNotImplementedError)r
   s    r   Úpytest_xdist_auto_num_workersr<   f   s   € õ Ñ
Ô
Ðr   Ú	crashitemÚstrÚreportúpytest.TestReportÚschedr   c                ó   — dS )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   )r=   r?   rA   s      r   Úpytest_handlecrashitemrC   q   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	   r1   r2   r   r   )r
   r   r5   r   r   r6   )r
   r   r   r9   )r=   r>   r?   r@   rA   r   r   r   )%Ú__doc__Ú
__future__r   ÚbuiltinsÚ@py_builtinsÚ_pytest.assertion.rewriteÚ	assertionÚrewriteÚ
@pytest_arÚcollections.abcr   ÚosÚtypingr   r   ÚexecnetÚpytestÚxdist.remoter   Úxdist.scheduler.protocolr   Úxdist.workermanager	   Úhookspecr   r   ÚDeprecationWarningr!   r#   r&   r*   r,   r0   r4   r8   r<   rC   r   r   r   ú<module>rV      s=  ððð ð #Ð "Ð "Ð "Ð "Ð "à  € € € € € € € € € € € € Ð $Ð $Ð $Ð $Ð $Ð $Ø 	€	€	€	Ø Ð Ð Ð Ð Ð Ø  Ð  Ð  Ð  Ð  Ð  à €€€Ø €€€ð ð 4Ø%Ð%Ð%Ð%Ð%Ð%Ø3Ð3Ð3Ð3Ð3Ð3Ø3Ð3Ð3Ð3Ð3Ð3ð €„ÑÔð3ð 3ð 3ñ Ôð3ð €„ÑÔð.ð .ð .ñ Ôð.ð €„Ø#Ð#ØMñô ðñ ô ð
Mð Mð Mñô ð
Mð €„Ø#Ð#ØMñô ðñ ô ð
Lð Lð Lñô ð
Lð €„˜TÐ"Ñ"Ô"ð,ð ,ð ,ñ #Ô"ð,ð €„ÑÔðBð Bð Bñ ÔðBð €„ÑÔð)ð )ð )ñ Ôð)ð €„ÑÔðð ð ñ Ôðð €„ÑÔðPð Pð Pñ ÔðPð €„˜TÐ"Ñ"Ô"ð2ð 2ð 2ñ #Ô"ð2ð €„˜TÐ"Ñ"Ô"ð ð  ð  ñ #Ô"ð ð €„˜TÐ"Ñ"Ô"ðð ð ñ #Ô"ðð ð r   