o
    i                     @   sj   d dl Z d dlmZmZ d dlmZmZ d dlmZm	Z	m
Z
mZmZmZmZ edZG dd dedZdS )	    N)ABCMetaabstractmethod)AsyncGeneratorIterable)AnyCallable	CoroutineDictOptionalTypeTypeVar_Tc                	   @   s   e Zd ZdZdddZdeee  dee deej	 dee
 fdd	ZedddZeded deeef ddfddZededeeeef f deeef defddZededeeeef f deeef dd
fddZd
S )
TestRunnerzr
    Encapsulates a running event loop. Every call made through this object will use the same event
    loop.
    returnc                 C   s   | S N selfr   r   M/var/www/edux/Edux_v2/venv/lib/python3.10/site-packages/anyio/abc/_testing.py	__enter__   s   zTestRunner.__enter__exc_typeexc_valexc_tbc                 C   s   |    d S r   )close)r   r   r   r   r   r   r   __exit__   s   zTestRunner.__exit__Nc                 C      dS )zClose the event loop.Nr   r   r   r   r   r          zTestRunner.closefixture_func).zAsyncGenerator[_T, Any]kwargszIterable[_T]c                 C   r   )a   
        Run an async generator fixture.

        :param fixture_func: the fixture function
        :param kwargs: keyword arguments to call the fixture function with
        :return: an iterator yielding the value yielded from the async generator
        Nr   r   r   r   r   r   r   run_asyncgen_fixture   r   zTestRunner.run_asyncgen_fixture.c                 C   r   )z
        Run an async fixture.

        :param fixture_func: the fixture function
        :param kwargs: keyword arguments to call the fixture function with
        :return: the return value of the fixture function
        Nr   r   r   r   r   run_fixture-   r   zTestRunner.run_fixture	test_funcc                 C   r   )z
        Run an async test function.

        :param test_func: the test function
        :param kwargs: keyword arguments to call the test function with
        Nr   )r   r"   r   r   r   r   run_test;   r   zTestRunner.run_test)r   r   )r   N)__name__
__module____qualname____doc__r   r
   r   BaseExceptiontypesTracebackTypeboolr   r   r   r   r	   strr   r    r   r   r!   r#   r   r   r   r   r   	   sL    


	


r   )	metaclass)r)   abcr   r   collections.abcr   r   typingr   r   r   r	   r
   r   r   r   r   r   r   r   r   <module>   s    $