a
    nf
                     @   sj   d dl Z d dlZd dlZddlmZmZmZmZ dd Zdd Z	dd	 Z
ejjejd
kdddd ZdS )    N   )current_async_libraryAsyncLibraryNotFoundErrorcurrent_async_library_cvarthread_localc               	   C   s   t t t  W d    n1 s&0    Y  td} zt dksJJ W t|  nt|  0 t t t  W d    n1 s0    Y  d S Nzgeneric-lib)pytestraisesr   r   r   setreset)token r   Q/var/www/html/bot/venv/lib/python3.9/site-packages/sniffio/_tests/test_sniffio.pytest_basics_cvar   s    $
r   c                  C   s   t t t  W d    n1 s&0    Y  tjd } t_zt dksNJ W | t_n| t_0 t t t  W d    n1 s0    Y  d S r   )r   r	   r   r   r   name)Zold_namer   r   r   test_basics_tlocal   s    $r   c                     s   dd l } tt t  W d    n1 s.0    Y  g   fdd}| |   dgksbJ tt t  W d    n1 s0    Y  d S )Nr   c                      s*   t  dksJ t  dksJ  d d S )NasyncioTr   appendr   Zranr   r   this_is_asyncio0   s    z%test_asyncio.<locals>.this_is_asyncioT)r   r   r	   r   r   run)r   r   r   r   r   test_asyncio(   s    $r   )      zEcurio broken on 3.12 (https://github.com/python-trio/sniffio/pull/42))reasonc                     s   dd l } tt t  W d    n1 s.0    Y  g   fdd}| |  dgks`J tt t  W d    n1 s0    Y  d S )Nr   c                      s*   t  dksJ t  dksJ  d d S )NcurioTr   r   r   r   r   this_is_curioJ   s    z!test_curio.<locals>.this_is_curioT)r   r   r	   r   r   r   )r   r   r   r   r   
test_curio=   s    $
r   )ossysr    r   r   r   r   r   r   r   markZskipifversion_infor   r   r   r   r   <module>   s   