a
    (ñ»j-  ã                   @  s¸   d dl mZ d dlZd dlmZ d dlZddlmZmZ da	da
dd	d
œdd„Zdd	dœdd„Zejddœdd„ƒZejddœdd„ƒZejdd�dd	dœdd„ƒZdddœdd „ZdS )!é    )ÚannotationsN)ÚNoReturné   )Ú	MockClockÚ	trio_testTFzpytest.ParserÚNone)ÚparserÚreturnc                 C  s$   | j dddd� | j dddd� d S )Nú
--run-slowÚ
store_truezrun slow tests)ÚactionÚhelpú--skip-optional-importsz=skip tests that rely on libraries not required by trio itself)Z	addoption)r   © r   ú?E:\soccer\ml_env\Lib\site-packages\trio/_tests/pytest_plugin.pyÚpytest_addoption   s    ýr   zpytest.Config)Úconfigr	   c                 C  s    | j ddd�a| j ddd�ad S )Nr
   T)Údefaultr   F)Z	getoptionÚRUN_SLOWÚSKIP_OPTIONAL_IMPORTS)r   r   r   r   Úpytest_configure   s    r   r   )r	   c                   C  s   t ƒ S ©N©r   r   r   r   r   Ú
mock_clock   s    r   c                   C  s
   t dd�S )Nr   )Zautojump_thresholdr   r   r   r   r   Úautojump_clock#   s    r   )Ztryfirstzpytest.Function)Ú
pyfuncitemr	   c                 C  s   t  | j¡rt| jƒ| _d S r   )ÚinspectÚiscoroutinefunctionÚobjr   )r   r   r   r   Úpytest_pyfunc_call,   s    r   ÚImportErrorr   )Úerrorr	   c                 C  s   t rtj| jdd� n| ‚d S )NT)Zallow_module_level)r   ÚpytestÚskipÚmsg)r!   r   r   r   Úskip_if_optional_else_raise2   s    r%   )Ú
__future__r   r   Útypingr   r"   Ztestingr   r   r   r   r   r   Zfixturer   r   Zhookimplr   r%   r   r   r   r   Ú<module>   s   	
