B
    |?Xc'
                 @   s   d Z ddl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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   s   dS )z(called before any remote node is set up.N )configZspecsr   r   -lib/python3.7/site-packages/xdist/newhooks.pypytest_xdist_setupnodes   s    r   c             C   s   dS )z#called on new raw gateway creation.Nr   )Zgatewayr   r   r   pytest_xdist_newgateway   s    r   zCrsync feature is deprecated and will be removed in pytest-xdist 4.0)Zwarn_on_implc             C   s   dS )zBcalled before rsyncing a directory to remote gateways takes place.Nr   )sourcegatewaysr   r   r   pytest_xdist_rsyncstart   s    r	   c             C   s   dS )zAcalled after rsyncing a directory to remote gateways takes place.Nr   )r   r   r   r   r   pytest_xdist_rsyncfinish"   s    r
   T)Zfirstresultc               C   s   dS )z called when creating remote nodeNr   r   r   r   r   pytest_xdist_getremotemodule)   s    r   c             C   s   dS )z7configure node information before it gets instantiated.Nr   )noder   r   r   pytest_configure_node.   s    r   c             C   s   dS )zTest Node is ready to operate.Nr   )r   r   r   r   pytest_testnodeready3   s    r   c             C   s   dS )zTest Node is down.Nr   )r   errorr   r   r   pytest_testnodedown8   s    r   c             C   s   dS )zEcalled by the controller node when a worker node finishes collecting.Nr   )r   Zidsr   r   r   %pytest_xdist_node_collection_finished=   s    r   c             C   s   dS )z&return a node scheduler implementationNr   )r   logr   r   r   pytest_xdist_make_schedulerB   s    r   c             C   s   dS )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_workersG   s    r   c             C   s   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   )Z	crashitemZreportZschedr   r   r   pytest_handlecrashitemQ   s    r   )__doc__ZpytestZhookspecr   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   <module>   s   
