U
    g-                     @  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   =/tmp/pip-unpacked-wheel-ks04xdmi/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   	
