%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3/dist-packages/twisted/test/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3/dist-packages/twisted/test/__pycache__/test_formmethod.cpython-312.pyc

�

Ϫ�f���ddlmZ	ddlmZmZddlmZmZddlmZddl	m
Z
ed�ZGd�de
j�Z
y	)
�)�annotations)�Callable�Iterable)�Concatenate�	ParamSpec)�
formmethod)�unittest�_Pc��eZdZ												dd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Z	dd�Z
dd	�Zdd
�Zdd�Z
dd�Zy
)�
ArgumentTestsc���|dg|��i|��}|D]&\}}|j|j|�|��(|D]-}|jtj|j|��/y)N�name)�assertEqual�coerce�assertRaisesr�
InputError)	�self�argKlass�	testPairs�	badValues�args�kwargs�arg�val�results	         �>/usr/lib/python3/dist-packages/twisted/test/test_formmethod.py�argTestzArgumentTests.argTestsp���v�/��/��/��$�	6�K�C�����S�Z�Z��_�f�5�	6��	F�C����j�3�3�S�Z�Z��E�	F�c�p�tjd�}|jt|jd�y)zG
        Test that corce correctly raises NotImplementedError.
        r�N)r�Argumentr�NotImplementedErrorr)rrs  r�
test_argumentzArgumentTests.test_argument"s+���!�!�&�)�����-�s�z�z�2�>rc�*�|jtjgd�d�|jtjddgdd��|jtjddgd	d
��|jtjddgd
dd
��y)N)��ar&)��1�r r ���abr,)�abcr-)�2r �)�minr%)�223213�345x�)�max)�addr5)r1�x�r0r4)rr�String�rs r�
testStringzArgumentTests.testString)s������Z�&�&�(H�"�M��������n�=�y�a�	�	
�	
�������j�9�;M�ST�	�	
�	
������
�>�*����	�	
rc��|jtjgd�d�|jtjddgdd��y)N)��3r3�z-2����r N)�q�2.3r<r>)rArBr r��	allowNone)rr�Integerr9s r�testIntzArgumentTests.testInt9sE�������� B�L�	
�	
�������:� 6�8H�TU�	�	
rc��|jtjgd�d�|jtjddgdd��y)N)�r=g@�z-2.3gffffff�r@)rA�2.3zrHrI)rArJr rrC)rr�Floatr9s r�	testFloatzArgumentTests.testFloatAsF��������F�
�	
�	
������
��(���		�	
rc�V�ddg}|jtjddgd|��y)N�r&�applezan apple��b�banana�ook)r&rO)rQrR)�cr')�choices)rr�Choice)rrUs  r�
testChoicezArgumentTests.testChoiceLs5��-�/E�F��������
�_�-���		�	
rc�t�ddg}|jtjdgdgfddgddgfgddgdgf|�	�y)
NrNrPr&rOrQrRrT�fdfs)�flags)rr�Flags)rrZs  r�	testFlagszArgumentTests.testFlagsUsW��+�-C�D���������e�g�Y�
�3��*�x��.A�!B�C��3�Z�&��"��		�	
rc�N�gd�}|jtj|d�y)N))�yesr')r r)�Falser)�norr*)rr�Boolean)r�testss  r�testBooleanzArgumentTests.testBoolean^s��>�����Z�'�'���3rc�4�tjdd��}|j|jd�d�|j	tj
|jd�tjd�}|j
|jd��y)z>
        Test the correctness of the coerce function.
        rrrC�	somethingN)r�Filerrrr�assertIsNone)rr�arg2s   r�	test_filezArgumentTests.test_filebsn���o�o�f��2��������K�0�+�>����*�/�/����T�B����v�&�����$�+�+�d�+�,rc�v�dddd�j�}gd�}|jtj||�y)N)i���)i�r/�))�2002�12�21)�1996r.�29)r r r ))rnr.rr)�xxr.r=)rn�13r()�1999ro�32)rnr()rnr.r=�4)�itemsrr�Date�r�	goodTests�badTestss   r�testDatezArgumentTests.testDatels;��"0�!.��
��%�'�		�

��	
���Z�_�_�i��:rc�z�dddd�j�}gd�}|jtj||dd�y)Nrrkr3)�0ror=)z-1r6rtz-2000z3.4)rxrr�IntegerRangerzs   r�testRangedIntegerzArgumentTests.testRangedInteger|s6���2�A�.�4�4�6�	�4�����Z�,�,�i��1�b�Irc�z�ddd�j�}gd�}|jtj||dd��y)N�foor,))r�r�r+))r,r&)�12345r�r)r%)r&)r&r&r&r/�r7)rxrr�VerifiedPasswordrzs   r�testVerifiedPasswordz"ArgumentTests.testVerifiedPassword�s;��%*�$�?�E�E�G�	�
��	
���Z�0�0�)�X�1�RS��TrN)rz3Callable[Concatenate[str, _P], formmethod.Argument]rzIterable[tuple[object, object]]rzIterable[object]rz_P.argsrz	_P.kwargs�return�None)r�r�)�__name__�
__module__�__qualname__rr#r:rFrLrWr\rcrir}r�r�r*rrrrs���F�E�F�3�F�$�	F�
�F��
F�
�F�?�
� 
�	
�
�
�4�-�;� J�

UrrN)�
__future__r�typingrrrr�twisted.pythonr�
twisted.trialr	r
�TestCaserr*rr�<module>r�s<��#��&�)�%�"��t�_��xU�H�%�%�xUr

Zerion Mini Shell 1.0