403Webshell
Server IP : 192.158.238.246  /  Your IP : 3.129.253.54
Web Server : LiteSpeed
System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64
User : jenniferflocom ( 1321)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/cloudlinux/venv/lib/python3.11/site-packages/aiohttp/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/cloudlinux/venv/lib/python3.11/site-packages/aiohttp/__pycache__/pytest_plugin.cpython-311.pyc
�

��bgU-���ddlZddlZddlZddlmZmZmZmZmZm	Z	m
Z
mZddlZddl
mZddlmZddlmZmZmZmZmZmZmZmZ	ddlZn
#e$rdZYnwxYweeeefgeefZeegeefZeegeefZd�Z d�Z!ej"d	���Z#ej"d
���Z$ej%d���Z&ej%dd
���Z'd�Z(d�Z)d�Z*ej"d���Z+ej"d���Z,ej"dege-fdege-ffd���Zej"dege-ffd���Z.ej"dej/deefd���Z0ej"d���Z1ej"dej/deefd���Z2ej"d���Z3ej"dej/deefd���Z4ej"d���Z5dS)�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��|�dddd���|�dddd	���|�d
ddd���dS)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 �h/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib64/python3.11/site-packages/aiohttp/pytest_plugin.py�pytest_addoptionr" s���
������
9�	����������
B�	�������%���
+�	������c������|j�t���rd�ntj���rd�ndSd�d|jvr|xjdz
c_d����fd�}||_dS)zjSet up pytest fixture.

    Allow fixtures to be coroutines. Run coroutine fixtures in an event loop.
    TFN�request�r%c�J����|d}�r|d=d|jvrtd���|�d����rJ�|i|�����fd�}|�|����������S���|i|����S)Nr%�loopz^Asynchronous fixtures must depend on the 'loop' fixture or be used in tests depending from it.c�v��	��������S#t$rYdSwxYw�N)�run_until_complete�	__anext__�StopAsyncIteration)�_loop�gens��r!�	finalizerz8pytest_fixture_setup.<locals>.wrapper.<locals>.finalizer`sF���� �3�3�C�M�M�O�O�D�D�D��)�����D�D����s�&*�
8�8)�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�
�
�
�
�
�
�
� � ��+�+�+��+�+�C�M�M�O�O�<�<�<��+�+�D�D�$�,A�&�,A�,A�B�B�Br#)r7r�asyncio�iscoroutinefunction�argnames)�
fixturedefr:r7r8r9s  @@@r!�pytest_fixture_setupr?5s������
�?�D��$�������	�	$�T�	*�	*�����	���M��
�+�+�+����|�+����
�C�C�C�C�C�C�C�@�J�O�O�Or#c�6�|j�d��S)z--fast config optionr��config�	getoptionr&s r!�fastrDns���>�#�#�$4�5�5�5r#c�6�|j�d��S)z!--enable-loop-debug config optionrrAr&s r!�
loop_debugrFts���>�#�#�$A�B�B�Br#c
#�>K�tjd���5}dV�d�|D��}|rYtd�t	|��t	|��dkrdndd	�|�������	ddd��dS#1swxYwYdS)
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)�recordNc�Z�g|](}|jtk�d�|�����)S)z#{w.filename}:{w.lineno}:{w.message})�w)�category�RuntimeWarning�format)�.0rJs  r!�
<listcomp>z,_runtime_warning_context.<locals>.<listcomp>�s@��
�
�
���z�^�+�+�
2�8�8�1�8�=�=�+�+�+r#z{} Runtime Warning{},
{}r
��s�
)�warnings�catch_warnings�RuntimeErrorrM�len�join)�	_warnings�rws  r!�_runtime_warning_contextrZzs����
�	 ��	-�	-�	-���
����
�
��
�
�
��
�	��+�2�2���G�G�3�r�7�7�a�<�<�R�R�S�$�)�)�B�-�-�����
�	���������������������s�A,B�B�BFc#�`K�|r|V�dSt��}|V�t||���dS)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_contextr]�sL�����,��
�
�
�
�
�� � ���
�
�
��4�d�+�+�+�+�+�+r#c��|�|��r7tj|��r%t|�||����SdSdS)z%Fix pytest collecting for coroutines.N)�funcnamefilterr;r<�list�
_genfunctions)�	collector�name�objs   r!�pytest_pycollect_makeitemre�s\������%�%�8�'�*E�c�*J�*J�8��I�+�+�D�#�6�6�7�7�7�8�8�8�8r#c	�����j�d��}tj�j��r��j�d��p�j�dd��}t��5t||���5}�fd��j	j
D��}|��jdi|����ddd��n#1swxYwYddd��n#1swxYwYdSdS)	zBRun coroutines in an event loop instead of a normal function call.r�
proactor_loopr(Nr\c�,��i|]}|�j|��S�)�funcargs)rN�arg�
pyfuncitems  �r!�
<dictcomp>z&pytest_pyfunc_call.<locals>.<dictcomp>�s3���������,�S�1���r#Tri)
rBrCr;r<�functionrj�getrZr]�_fixtureinfor=r+rd)rlrD�
existing_loopr.�testargss`    r!�pytest_pyfunc_callrs�s������&�&�'7�8�8�D��"�:�#6�7�7��"�+�/�/��
�
�3�
�
 �
$�
$�V�T�
2�
2�	�&�
'�
'�	E�	E�*�=�t�D�D�D�
E������)�6�?������(�(����)C�)C�(�)C�)C�D�D�D�
E�
E�
E�
E�
E�
E�
E�
E�
E�
E�
E����
E�
E�
E�
E�	E�	E�	E�	E�	E�	E�	E�	E�	E�	E�	E����	E�	E�	E�	E��t��s6�8C&�
9C�C&�C	�C&�C	�C&�&C*�-C*c
�X�d|jvrdS|jjj}dtji}t�tj|d<|dkrd}i}|�d��D]s}|�	d��}|�
d��}||vr7|r4td	|�d
t|�
����������h||||<�t|�dt|�����t|�
�������dS)N�loop_factoryr�uvloop�allzpyloop,uvloop?�,�?z ?zUnknown loop 'z', available loops: )�ids)r1rB�option�aiohttp_loopr;�DefaultEventLoopPolicyrv�EventLoopPolicy�split�endswith�strip�
ValueErrorr`�keys�parametrize�values)�metafunc�loops�avail_factories�	factoriesrc�requireds      r!�pytest_generate_testsr��sH���X�2�2�2����O�"�/�E���!?�@�O�
��$*�$:���!���~�~� ���I����C� � �0�0���}�}�S�)�)�)���z�z�$������&�&��
� �j��t�t�T�)�.�.�"2�"2�3�3�3�5����
�)�$�/�	�$��������Y�-�-�/�/�0�0�d�9�>�>�;K�;K�6L�6L������r#c#�K�|��}tj|��t|���5}|r|�d��tj|��|V�ddd��dS#1swxYwYdS)z%Return an instance of the event loop.r\TN)r;�set_event_loop_policyr�	set_debug�set_event_loop)rurDrF�policyr.s     r!r(r(�s������\�^�^�F��!�&�)�)�)�	�4�	 �	 �	 ��E��	"��O�O�D�!�!�!���u�%�%�%�����	��������������������s�0A.�.A2�5A2c#��K�tj��}tj|��t|j��5}tj|��|V�ddd��dS#1swxYwYdSr*)r;�WindowsProactorEventLoopPolicyr�r�new_event_loopr�)r�r.s  r!rgrg�s�����
�
3�
5�
5�F��!�&�)�)�)�	�f�+�	,�	,�����u�%�%�%�������������������������s�A$�$A(�+A(�aiohttp_unused_port�returnc�>�tjdtd���|S)Nz3Deprecated, use aiohttp_unused_port fixture instead���
stacklevel�rS�warn�DeprecationWarning)r�s r!rr�s,���M�=�������
�r#c��tS)z1Return a port that is unused on the current host.)�_unused_portrir#r!r�r��s
���r#r(c#�r��K�g�dd���fd�
}|V�d�fd�}��|����dS)z^Factory to create a TestServer instance, given an app.

    aiohttp_server(app, **kwargs)
    N��portc���K�t||���}|jdd�i|���d{V����|��|S�Nr�r(ri)r�start_server�append)�appr�r6�serverr(�serverss    ��r!�gozaiohttp_server.<locals>.go	s`������C�d�+�+�+��!�f�!�6�6�t�6�v�6�6�6�6�6�6�6�6�6����v�����
r#r�c��p�K��r0��������d{V����.dSdSr*��pop�close�r�s�r!�finalizez aiohttp_server.<locals>.finalize�Y������	(��+�+�-�-�%�%�'�'�'�'�'�'�'�'�'��	(�	(�	(�	(�	(r#�r�N�r+�r(r�r�r�s`  @r!�aiohttp_serverr�s��������G�"���������
�H�H�H�(�(�(�(�(�(�	���H�H�J�J�'�'�'�'�'r#c�>�tjdtd���|S)Nz.Deprecated, use aiohttp_server fixture insteadr�r�r�)r�s r!�test_serverr��,���M�8�������
�r#c#�r��K�g�dd���fd�
}|V�d�fd�}��|����dS)zpFactory to create a RawTestServer instance, given a web handler.

    aiohttp_raw_server(handler, **kwargs)
    Nr�c���K�t||���}|jdd�i|���d{V����|��|Sr�)rr�r�)�handlerr�r6r�r(r�s    ��r!r�zaiohttp_raw_server.<locals>.go*s`������w�T�2�2�2��!�f�!�6�6�t�6�v�6�6�6�6�6�6�6�6�6����v�����
r#r�c��p�K��r0��������d{V����.dSdSr*r�r�s�r!r�z$aiohttp_raw_server.<locals>.finalize2r�r#r�r�r�s`  @r!�aiohttp_raw_serverr�"s��������G�"&���������
�H�H�H�(�(�(�(�(�(�	���H�H�J�J�'�'�'�'�'r#c�>�tjdtd���|S)Nz2Deprecated, use aiohttp_raw_server fixture insteadr�r�r�)r�s r!�raw_test_serverr�9s.��
�M�<�������
�r#c#���K�g�dd�dtttfdtdtt
ttfdtdtf
��fd�}|V�d
�fd	�}��|����dS)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|�Ri|��}i}n|r
Jd���t|t��r#|pi}t	|fd�i|��}t|fd�i|��}nDt|t��rt|fd�i|��}nt
dt|��z���|����d{V����	|��|S)Nzargs should be emptyr(zUnknown argument type: %r)
�
isinstancerrrrrr��typer�r�)r�r�r5r6r��client�clientsr(s      ��r!r�zaiohttp_client.<locals>.goQsI������g�x�(�(�	4���k�>�2�2
�2
�	4��g�d�4�T�4�4�4�V�4�4�G��F�F��3�3�3�3�3�8��g�{�+�+�	J�)�/�R�M���D�D�d�D�m�D�D�F���<�<�T�<�V�<�<�F�F�
���
0�
0�	J���=�=�d�=�f�=�=�F�F��8�4��=�=�H�I�I�I��!�!�#�#�#�#�#�#�#�#�#����v�����
r#c��p�K��r0��������d{V����.dSdSr*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�H�(�(�(�(�(�(�	���H�H�J�J�'�'�'�'�'r#c�>�tjdtd���|S)Nz.Deprecated, use aiohttp_client fixture insteadr�r�r�)r�s r!�test_clientr�vr�r#)F)6r;�
contextlibrS�typingrrrrrrr	r
�pytest�aiohttp.helpersr�aiohttp.webr�
test_utilsrrrrrrrrr�rv�ImportError�
AiohttpClient�AiohttpRawServer�
AiohttpServerr"r?�fixturerDrF�contextmanagerrZr]rersr�r(rg�intr��AbstractEventLoopr�r�r�r�r�r�rir#r!�<module>r�s���������������R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R�
�
�
�
�.�.�.�.�.�.�#�#�#�#�#�#�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	�	���M�M�M�M������
�F�F�F������%��^� ;�<�=�y��?T�T�U�
��[�M�9�]�+C�C�D���+��	�*�(=�=�>�
����*6�6�6�r��6�6���6�
��C�C���C�
�������.��
,�
,�
,���
,� 8�8�8����$���@�����������������X�b�#�g�%6��8�B��G�;L����������X�b�#�g�.�������
��(��2�(�x�
�7N�(�(�(���(�,���������(�W�6�(�8�DT�;U�(�(�(���(�,���������-(�
�
#�-(�
�m��-(�-(�-(���-(�`��������s�A�A�A

Youez - 2016 - github.com/yon3zu
LinuXploit