403Webshell
Server IP : 65.1.209.187  /  Your IP : 216.73.216.144
Web Server : nginx/1.24.0
System : Linux ip-172-31-5-206 6.14.0-1015-aws #15~24.04.1-Ubuntu SMP Tue Sep 23 22:44:48 UTC 2025 x86_64
User :  ( 1001)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/aiohttp/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/aiohttp/__pycache__/pytest_plugin.cpython-312.pyc
�

�wceU-���ddlZddlZddlZddlmZmZmZmZmZm	Z	m
Z
mZddlZddl
mZddlmZddlmZmZmZmZmZmZmZmZ	ddlZeeeefgeefZeegeefZeegeefZd�Z d�Z!ejDd	��Z#ejDd
��Z$ejJd��Z&ejJdd��Z'd
�Z(d�Z)d�Z*ejDd��Z+ejDd��Z,ejDdege-fdege-ffd��ZejDdege-ffd��Z.ejDdej^deefd��Z0ejDd��Z1ejDdej^deefd��Z2ejDd��Z3ejDdej^deefd��Z4ejDd��Z5y#e$rdZY���wxYw)�N)�Any�	Awaitable�Callable�Dict�Iterator�Optional�Type�Union)�isasyncgenfunction)�Application�)�BaseTestServer�
RawTestServer�
TestClient�
TestServer�loop_context�setup_test_loop�teardown_test_loop�unused_portc��|jdddd��|jdddd	��|jd
ddd��y)N�--aiohttp-fast�
store_trueFz*run tests faster by disabling extra checks)�action�default�helpz--aiohttp-loop�store�pyloopz3run tests with specific loop: pyloop, uvloop or all�--aiohttp-enable-loop-debugzenable event loop debug mode)�	addoption)�parsers �7/usr/lib/python3/dist-packages/aiohttp/pytest_plugin.py�pytest_addoptionr" sc��
������
9�	��������
B�	�����%���
+�	��c������|j�t��rd�ntj��rd�nyd�d|jvr|xjdz
c_d����fd�}||_y)zjSet up pytest fixture.

    Allow fixtures to be coroutines. Run coroutine fixtures in an event loop.
    TFN�request�r%c�����|d}�r|d=d|jvrtd��|jd���r>�|i|�����fd�}|j|��j	�j��S�j	�|i|���S)Nr%�loopz^Asynchronous fixtures must depend on the 'loop' fixture or be used in tests depending from it.c�b��	�j�j��S#t$rYywxYw�N)�run_until_complete�	__anext__�StopAsyncIteration)�_loop�gens��r!�	finalizerz8pytest_fixture_setup.<locals>.wrapper.<locals>.finalizer`s1���� �3�3�C�M�M�O�D�D��)����s�"�	.�.)�fixturenames�	Exception�getfixturevalue�addfinalizerr+r,)	�args�kwargsr%r0r.r/�func�is_async_gen�
strip_requests	    @@���r!�wrapperz%pytest_fixture_setup.<locals>.wrapperKs������#����y�!�
��-�-�-��6��
�
�'�'��/�����'��'�C�
�
� � ��+��+�+�C�M�M�O�<�<��+�+�D�$�,A�&�,A�B�Br#)r7r�asyncio�iscoroutinefunction�argnames)�
fixturedefr:r7r8r9s  @@@r!�pytest_fixture_setupr?5sl���
�?�?�D��$����	�	$�	$�T�	*���	��M��
�+�+�+����|�+���
�C�@�J�Or#c�8�|jjd�S)z--fast config optionr��config�	getoptionr&s r!�fastrDns���>�>�#�#�$4�5�5r#c�8�|jjd�S)z!--enable-loop-debug config optionrrAr&s r!�
loop_debugrFts���>�>�#�#�$A�B�Br#c
#�fK�tjd��5}d��|D�cgc]'}|jtk(rdj	|����)}}|rDtdj	t
|�t
|�dk(rdnd	d
j|����	ddd�ycc}w#1swYyxYw�w)z�Context manager which checks for RuntimeWarnings.

    This exists specifically to
    avoid "coroutine 'X' was never awaited" warnings being missed.

    If RuntimeWarnings occur in the context a RuntimeError is raised.
    T)�recordNz#{w.filename}:{w.lineno}:{w.message})�wz{} Runtime Warning{},
{}r
��s�
)�warnings�catch_warnings�category�RuntimeWarning�format�RuntimeError�len�join)�	_warningsrI�rws   r!�_runtime_warning_contextrWzs�����
�	 �	 ��	-���
��
���z�z�^�+�
2�8�8�1�8�=�
��
�
��+�2�2���G�3�r�7�a�<�R�S�$�)�)�B�-���
�����
���s.�B1�	B%�,B �AB%�	B1� B%�%B.�*B1c#�PK�|r|��yt�}|��t||��y�w)z�Passthrough loop context.

    Sets up and tears down a loop unless one is passed in via the loop
    argument when it's passed straight through.
    �rDN)rr)r(rDs  r!�_passthrough_loop_contextrZ�s)������
�� ���
��4�d�+�s�$&c��|j|�r1tj|�rt|j	||��Syy)z%Fix pytest collecting for coroutines.N)�funcnamefilterr;r<�list�
_genfunctions)�	collector�name�objs   r!�pytest_pycollect_makeitemrb�s>������%�'�*E�*E�c�*J��I�+�+�D�#�6�7�7�+K�%r#c	��|jjd�}tj|j�r�|j
j
d�xs|j
j
dd�}t�5t||��5}|jjD�cic]}||j
|��}}|j|jdi|���ddd�ddd�yycc}w#1swY�xYw#1swYyxYw)zBRun coroutines in an event loop instead of a normal function call.r�
proactor_loopr(NrYT�)
rBrCr;r<�function�funcargs�getrWrZ�_fixtureinfor=r+ra)�
pyfuncitemrD�
existing_loopr.�arg�testargss      r!�pytest_pyfunc_callrn�s�����&�&�'7�8�D��"�"�:�#6�#6�7�"�+�+�/�/��
�3�
�
 �
 �
$�
$�V�T�
2�	�&�
'�	E�*�=�t�D�
E�� *�6�6�?�?�����,�,�S�1�1�����(�(�����)C�(�)C�D�
E�	E��8���
E�
E��	E��s6�>D�C6�%C1�<#C6�D�1C6�6C?	�;D�Dc
�.�d|jvry|jjj}dtj
i}t�tj|d<|dk(rd}i}|jd�D]\}|jd�}|jd�}||vr+|r(td	|�d
t|j�������U||||<�^|jdt|j��t|j����y)N�loop_factoryr�uvloop�allzpyloop,uvloop?�,�?z ?zUnknown loop 'z', available loops: )�ids)r1rB�option�aiohttp_loopr;�DefaultEventLoopPolicyrq�EventLoopPolicy�split�endswith�strip�
ValueErrorr]�keys�parametrize�values)�metafunc�loops�avail_factories�	factoriesr`�requireds      r!�pytest_generate_testsr��s
���X�2�2�2���O�O�"�"�/�/�E���!?�!?�@�O�
��$*�$:�$:���!���~� ���I����C� �0���}�}�S�)�)���z�z�$�����&�� ��T�)�.�.�"2�3�5���
�)�$�/�	�$��0�
�����Y�-�-�/�0�d�9�>�>�;K�6L��r#c#��K�|�}tj|�t|��5}|r|jd�tj|�|��ddd�y#1swYyxYw�w)z%Return an instance of the event loop.rYTN)r;�set_event_loop_policyr�	set_debug�set_event_loop)rprDrF�policyr.s     r!r(r(�s]�����^�F��!�!�&�)�	�4�	 ��E���O�O�D�!����u�%���	���s�)A-�-A!�	A-�!A*�&A-c#��K�tj�}tj|�t|j�5}tj
|�|��ddd�y#1swYyxYw�wr*)r;�WindowsProactorEventLoopPolicyr�r�new_event_loopr�)r�r.s  r!rdrd�sY����
�
3�
3�
5�F��!�!�&�)�	�f�+�+�	,������u�%������s�?A0�A$�	A0�$A-�)A0�aiohttp_unused_port�returnc�>�tjdtd��|S)Nz3Deprecated, use aiohttp_unused_port fixture instead���
stacklevel�rM�warn�DeprecationWarning)r�s r!rr�s���M�M�=����
�r#c��tS)z1Return a port that is unused on the current host.)�_unused_portrer#r!r�r��s
���r#r(c#�f��K�g�dd���fd�
}|��d�fd�}�j|��y�w)z^Factory to create a TestServer instance, given an app.

    aiohttp_server(app, **kwargs)
    N��portc���K�t||��}|jdd�i|���d{����j|�|S7��w�Nr�r(re)r�start_server�append)�appr�r6�serverr(�serverss    ��r!�gozaiohttp_server.<locals>.go	sG������C�d�+��!�f�!�!�6�t�6�v�6�6�6����v���
�	7���%A�A�Ac��j�K��r*�j�j��d{����r�)yy7�	�wr*��pop�close�r�s�r!�finalizez aiohttp_server.<locals>.finalize�*�������+�+�-�%�%�'�'�'��'���$3�1�3�3�r�N�r+�r(r�r�r�s`  @r!�aiohttp_serverr�s4������G�"��
�H�(�	���H�J�'���-1c�>�tjdtd��|S)Nz.Deprecated, use aiohttp_server fixture insteadr�r�r�)r�s r!�test_serverr�����M�M�8����
�r#c#�f��K�g�dd���fd�
}|��d�fd�}�j|��y�w)zpFactory to create a RawTestServer instance, given a web handler.

    aiohttp_raw_server(handler, **kwargs)
    Nr�c���K�t||��}|jdd�i|���d{����j|�|S7��wr�)rr�r�)�handlerr�r6r�r(r�s    ��r!r�zaiohttp_raw_server.<locals>.go*sG������w�T�2��!�f�!�!�6�t�6�v�6�6�6����v���
�	7�r�c��j�K��r*�j�j��d{����r�)yy7�	�wr*r�r�s�r!r�z$aiohttp_raw_server.<locals>.finalize2r�r�r�r�r�s`  @r!�aiohttp_raw_serverr�"s4������G�"&��
�H�(�	���H�J�'�r�c�>�tjdtd��|S)Nz2Deprecated, use aiohttp_raw_server fixture insteadr�r�r�)r�s r!�raw_test_serverr�9s!��
�M�M�<����
�r#c#����K�g�dd�dtttfdtdtt
ttfdtdtf
��fd�}|��d
�fd	�}�j|��y�w)z�Factory to create a TestClient instance.

    aiohttp_client(app, **kwargs)
    aiohttp_client(server, **kwargs)
    aiohttp_client(raw_server, **kwargs)
    N)�
server_kwargs�__paramr5r�r6r�c���K�t|t�r%t|ttf�s|�g|��i|��}i}n	|rJd��t|t�r#|xsi}t	|fd�i|��}t|fd�i|��}n6t|t�rt|fd�i|��}nt
dt|�z��|j��d{����j|�|S7��w)Nzargs should be emptyr(zUnknown argument type: %r)
�
isinstancerrrrrr}�typer�r�)r�r�r5r6r��client�clientsr(s      ��r!r�zaiohttp_client.<locals>.goQs�������g�x�(���k�>�2�2
��d�4�T�4�V�4�G��F��3�3�3�8��g�{�+�)�/�R�M���D�d�D�m�D�F���<�T�<�V�<�F�
���
0���=�d�=�f�=�F��8�4��=�H�I�I��!�!�#�#�#����v���
�	$�s�B;C�>C�?Cc��j�K��r*�j�j��d{����r�)yy7�	�wr*r�)r�s�r!r�z aiohttp_client.<locals>.finalizeor�r�r�)	r
rrrrr�strrr+)r(r�r�r�s`  @r!�aiohttp_clientr�Es{������G�
37���{�N�2�3���� ��S�#�X��/���	�

��8
�H�(�	���H�J�'�s�A-A1c�>�tjdtd��|S)Nz.Deprecated, use aiohttp_client fixture insteadr�r�r�)r�s r!�test_clientr�vr�r#)F)6r;�
contextlibrM�typingrrrrrrr	r
�pytest�aiohttp.helpersr�aiohttp.webr�
test_utilsrrrrrrrrr�rq�ImportError�
AiohttpClient�AiohttpRawServer�
AiohttpServerr"r?�fixturerDrF�contextmanagerrWrZrbrnr�r(rd�intr��AbstractEventLoopr�r�r�r�r�r�rer#r!�<module>r�s������R�R�R�
�.�#�	�	�	����%��^� ;�<�=�y��?T�T�U�
��[�M�9�]�+C�C�D���+��	�*�(=�=�>�
��*6�r���6��6�
���C��C�
������.���
,��
,� 8��$�@����������������X�b�#�g�%6��8�B��G�;L��������X�b�#�g�.����
���(��2�2�(�x�
�7N�(��(�,���������(�W�6�6�(�8�DT�;U�(��(�,���������-(�
�
#�
#�-(�
�m��-(��-(�`�������
��
�F��s�G
�
G�G

Youez - 2016 - github.com/yon3zu
LinuXploit