Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.12/test/test_asyncio/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.12/test/test_asyncio/__pycache__/test_futures2.cpython-312.opt-1.pyc

�

(Μg��4�ddlZddlZddlZddlZddlmZd�ZGd�d�Zejeed�d�Gd�d	eej��Z
Gd
�deej�ZGd�d
ej�Ze
dk(rej�yy)�N)�tasksc�.�tjd�y�N)�asyncio�set_event_loop_policy���</usr/local/lib/python3.12/test/test_asyncio/test_futures2.py�tearDownModuler	s���!�!�$�'r	c��eZdZd�Zd�Zd�Zy)�FutureTestsc��dK�d�}|j|��}td�D]}	|�d{���|jd�� y7�#t$rY}dj	tj|j��}|j|jd�d�Yd}~��d}~wwxYw�w)Nc�� K�td���w)N�*)�	TypeErrorrr	r
�	raise_excz4FutureTests.test_future_traceback.<locals>.raise_excs�����B�-��s��zTypeError was not raised�zawait future�)
�cls�range�failr�join�	traceback�	format_tb�
__traceback__�assertEqual�count)�selfr�future�_�e�tbs      r
�test_future_tracebackz!FutureTests.test_future_tracebacks�����	 ����)�+�&���q��A�
6����
�	�	�4�5�����
>��W�W�Y�0�0����A�B��� � ����.�!9�1�=�=��
>�s>�(B0�A�A	�A�B0�	A�	B-�AB(�#B0�(B-�-B0c��2���K�tjdd���d����fd�}�fd�}tj�}|j	|��j|��tjd��d{����j��y7��w)N�name�foo��defaultFc�J���j�j�d�d�y�N�barT�r�get��args�exc_handler_calledr&rs ���r
�exc_handlerzFFutureTests.test_task_exc_handler_correct_context.<locals>.exc_handler$�������T�X�X�Z��/�!%�r	c��:�K��jd�ddzy�w�Nr,rr��set�r&s�r
�taskz?FutureTests.test_task_exc_handler_correct_context.<locals>.task)s������H�H�U�O�
�a�C�s�r)�contextvars�
ContextVarr�get_running_loop�set_exception_handlerr�sleep�
assertTrue)rr2r9�loopr1r&s`   @@r
�%test_task_exc_handler_correct_contextz1FutureTests.test_task_exc_handler_correct_contextsy������%�%�f�e�<��"��	&�
	��'�'�)���"�"�;�/��������m�m�A�������*�+�	�s�A9B�>B�?Bc��(���K�tjdd���d����fd�}�fd�}tj�}|j	|�|j|�tjd��d{����j��y7��w)Nr&r'r(Fc�J���j�j�d�d�yr+r-r/s ���r
r2zHFutureTests.test_handle_exc_handler_correct_context.<locals>.exc_handler8r3r	c�2���jd�ddzyr5r6r8s�r
�callbackzEFutureTests.test_handle_exc_handler_correct_context.<locals>.callback=s����H�H�U�O�
�a�Cr	r)r:r;rr<r=�	call_soonr>r?)rr2rEr@r1r&s`   @@r
�'test_handle_exc_handler_correct_contextz3FutureTests.test_handle_exc_handler_correct_context3sw������%�%�f�e�<��"��	&�
	��'�'�)���"�"�;�/����x� ��m�m�A�������*�+�	�s�A4B�9B�:BN)�__name__�
__module__�__qualname__r$rArGrr	r
r
r

s��6� ,�(,r	r
�_CTaskzrequires the C _asyncio modulec�$�eZdZejZy)�CFutureTestsN)rHrIrJrrKrrr	r
rMrMGs
���,�,�Cr	rMc�$�eZdZejZy)�
PyFutureTestsN)rHrIrJr�_PyTaskrrr	r
rOrOLs��
�-�-�Cr	rOc��eZdZd�Zy)�FutureReprTestsc��K�d�}tjtj|��d���d{���}|jdt	|��y7� �w)Nc��2K�tj�S�wr)r�	all_tasksrr	r
�funczCFutureReprTests.test_recursive_repr_for_pending_tasks.<locals>.funcVs�����$�$�&�&�s��
)�timeoutz...)r�wait_for�Task�assertIn�repr)rrV�waiters   r
�%test_recursive_repr_for_pending_tasksz5FutureReprTests.test_recursive_repr_for_pending_tasksQsE����
	'��'�'����T�V�(<�R�H�H���
�
�e�T�&�\�*�I�s�6A�A�!AN)rHrIrJr^rr	r
rRrROs��
+r	rR�__main__)rr:r�unittestrrr
�
skipUnless�hasattr�IsolatedAsyncioTestCaserMrOrRrH�mainrr	r
�<module>res��������(�8,�8,�t����W�U�H�-�7�9��;�� @� @��9���K��!A�!A��+�h�6�6�+��z���H�M�M�O�r	

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists