Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
test_throw.cpython-313.pyc21 linesDownload Raw Back to __pycache__
1�

2��j��@�SSKrSSKJr SSKJr Sr"SS\5rg)�N)�greenlet�)�TestCasec�Z�[R"5RR"U6$)N)r�3getcurrent�parent�switch)�argss �_D:\code\apps\devtools\python\user_packages\Python313\site-packages\greenlet/tests/test_throw.pyr	r	s"����� �'�'�.�.��5�5�c�>�\rSrSrSrSrSrSrSrSr	Sr4S	rg5)�6ThrowTests�c��Sn[U5nUR5nURUS5 UR[5nURUS5 g)Nc�h�[S5 [S5 g![a [S5 gf=f�N�ok�fail)r	�RuntimeError�rr�f� ThrowTests.test_class.<locals>.f
s2��
��t��
�6�N�� �
��t���
�s��1�1r�rr	�assertEqual�throwr��selfr�g�ress    r�7test_class�ThrowTests.test_classsK��	�
�Q�K���h�h�j������d�#��g�g�l�#������d�#rc�f�Sn[U5nUR5nURUS5 UR[	S55nURUS5 [U5nUR5nURUS5 UR[S5nURUS5 g)Nc��[S5 [S5 g![a7 [R"5Sn[	U5S:Xa
[S5 gNLf=f)Nrr�ciaor)r	r�sys�exc_info�str)�vals rr�ThrowTests.test_val.<locals>.fsS��
��t��
�6�N�� �
��l�l�n�Q�'���s�8�v�%��4�L��&�
�s��<A�Arr$rrs    r�test_val�ThrowTests.test_vals���	�
�Q�K���h�h�j������d�#��g�g�l�6�*�+������d�#��Q�K���h�h�j������d�#��g�g�l�F�+������d�#rc�~�Sn[U5nUR5nURUS5 UR5nUR	[U[R55 UR	UR5 UR5nUR	[U[R55 g)Nc�0�[S5 [S5 gr�r	rrrr�ThrowTests.test_kill.<locals>.f2s���4�L��6�Nrr)rr	rr�8assertTrue�9isinstance�GreenletExit�deadrs    r�	test_kill�ThrowTests.test_kill1s���	�
�Q�K���h�h�j������d�#��g�g�i�����10�3��(=�(=�>�?���������g�g�i�����11�3��(=�(=�>�?rc��^�[R"5mU4SjnU4Sjn[U5n[X#S9nUR[5 UR	[5 SSS5 URUR5 URUR5 [U5n[X#S9nUR5nURUS5 UR	[5nURUS5 URUR5 URUR5 [U5n[X#S9nUR5nURUS5 UR5nURUS5 UR	[5nURUS5 URUR5 URUR5 g!,(df   GN�=f)Nc�J>�TRS5 g![a gf=f)N�f1 ready to catch�caughtznormal exit)r	�12IndexError��mains�r�f1�9ThrowTests.test_throw_goes_to_original_parent.<locals>.f1As.���
 ����/�0�!���
 ��
 �s��13"�"c�(>�TRS5 g)N�from f2r.r;s�r�f2�9ThrowTests.test_throw_goes_to_original_parent.<locals>.f2Hs����K�K�	�"r)rr8r9r@)	rr�assertRaisesr:rr0r3r	r)rr=rA�g1�g2rr<s      @r�"test_throw_goes_to_original_parent�-ThrowTests.test_throw_goes_to_original_parent>sm����"�"�$��	!�	#��b�\��
�b�
$��
�
�
�z�
*��H�H�Z� �+������� ������� �
�b�\��
�b�
$���i�i�k������1�2��h�h�z�"������h�'������� ������� �
�b�\��
�b�
$���i�i�k������1�2��i�i�k������i�(��h�h�z�"������h�'������� ������� �/+�
*�s�G)�)14G8c��UR[5n[R"5R	[15[5U5 SSS5 UR
[WR5S5 g!,(df   N4=f)Nz1throw() third argument must be a traceback object)	rC�	TypeErrorrrr�	Exceptionrr'�	exception�r�excs  r�test_non_traceback_param�#ThrowTests.test_non_traceback_paramfsa��
�
�
�y�
)�S����!�'�'�����
�*�	
����S�]�]�+�L�	N�
*�
)�s�3A7�716Bc��UR[5n[R"5R	[5[
55 SSS5 UR[WR5S5 g!,(df   N4=f)Nz0instance exception may not have a separate value)17rCrIrrrrJ�
BaseExceptionrr'rKrLs  r�test_instance_of_wrong_type�&ThrowTests.test_instance_of_wrong_typeps`��
�
�
�y�
)�S����!�'�'�����
�*�	
����S�]�]�+�K�	M�
*�
)�s�6A:�:18Bc���UR[5n[R"5R	S5 SSS5 UR[
WR5S5 g!,(df   N4=f)N�abcz1exceptions must be classes, or instances, not str)rCrIrrrrr'rKrLs  r�test_not_throwable�ThrowTests.test_not_throwablezsY��
�
�
�y�
)�S����!�'�'��
�*�	
����S�]�]�+�L�	N�	*�
)�s�%A)�)19A7rN)�__name__�20__module__�__qualname__�__firstlineno__r r*r4rFrNrRrV�__static_attributes__rrrrrs*��$�$�.@�&!�PN�M�Nrr)r%r�rr	rrrr�<module>r^s%��21���6�uN��uNr
codekingpro/portable-devtools · Team Ai