AlkantarClanX12

Your IP : 3.21.21.209


Current Path : /opt/cloudlinux/venv/lib64/python3.11/site-packages/testfixtures/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib64/python3.11/site-packages/testfixtures/__pycache__/utils.cpython-311.pyc

�

�܋f�
��2�ddlZddlmZddlmZddlmZddlmZm	Z	m
Z
ddlmZed��Z
e
gZ	dd	lm
Z
e�e
��n#e$rYnwxYwd
�ZGd�d��Zdd
ege
fdege
ffd�Zdede	fd�Zddedefd�ZdS)�N)�wraps)�dedent)�getfullargspec)�Callable�Sequence�Any�)�	singleton�DEFAULT)rc'�K�|D]}|V��dS)za
    A utility function for creating a generator that will yield the
    supplied arguments.
    N�)�args�is  �c/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/testfixtures/utils.py�	generatorrs,����
�����������c�T�eZdZdZeZdegdfdegdffd�Zd�Zdd�Z	dS)�WrappingN�before�afterc�$�||c|_|_dS�N)rr)�selfrrs   r�__init__zWrapping.__init__$s��"(�%����T�Z�Z�Zrc�*�|���Sr)r)rs r�	__enter__zWrapping.__enter__'s���{�{�}�}�rc�@�|j�|���dSdSr)r)r�exc_type�exc_val�exc_tbs    r�__exit__zWrapping.__exit__*s#���:�!��J�J�L�L�L�L�L�"�!r�NNN)
�__name__�
__module__�__qualname__�attribute_namer�newrrrr!r
rrrrsu�������N�
�C�0�x��D��1�0�(�2�t�8�:L�0�0�0�0���������rrrrc�2��t||����fd�}|S)z
    A decorator that causes the supplied callables to be called before
    or after the wrapped callable, as appropriate.
    c�����t�d��r�j�����St�����fd�����g�_�S)N�	patchingsc�^��g}g}tt�	��jt|��d���}d}d}	�
jD]v}|���}|�|��|j�|�|���H|jtvr ||kr|�|��|dz
}�w|t|��z
}�	|i|��t|��D]}|j|��
S#tj��}�xYw#t|��D]}|j|��
wxYw)Nrr"r	)�lenrrr*r�appendr&�updater'�defaults�tuple�reversedr!�sys�exc_info)r�keywargs�
extra_args�entered_patchers�to_add�addedr3�patching�arg�func�patcheds         ��rr<z&wrap.<locals>.wrapper.<locals>.patched<sm����J�!�����-�-�2�3�t�9�9�:�:�>�?�?�F��E�)�H�
1� '� 1�#�#�H�"�,�,�.�.�C�$�+�+�H�5�5�5��.�:� ����,�,�,�,�!���1�1�e�f�n�n�"�)�)�#�.�.�.���
�����j�)�)�)���t�T�.�X�.�.�!)�)9� :� :�1�1�H�%�H�%�x�0�0�0�1��

��<�>�>������� (�)9� :� :�1�1�H�%�H�%�x�0�0�0�1���s�BC5�5D�D�D,)�hasattrr*r-r)r;r<�wrappings`@�r�wrapperzwrap.<locals>.wrapper7sq������4��%�%�	��N�!�!�(�+�+�+��K�	�t���	1�	1�	1�	1�	1�
��	1�:&�J����r)r)rrr?r>s   @r�wrapr@/s5������&�&�H�$�$�$�$�$�L�Nr�	docstring�objsc�H�|D]}t|j��|z|_�dSr)r�__doc__)rArB�objs   r�extend_docstringrF`s3���6�6���S�[�)�)�I�5����6�6r��text�indent_sizec��g}t|�d����D]$\}}|rd|z|z}|�|���%d�|��S)NT� �)�	enumerate�
splitlinesr-�join)rHrI�indented�	do_indent�lines     r�indentrSesk���H�$�T�_�_�T�%:�%:�;�;����	�4��	*��{�?�T�)�D���������
�7�7�8���rr)rG)r2�	functoolsr�textwrapr�inspectr�typingrrrrLr
rr/�mockr-�ImportErrorrrr@�strrF�intrSr
rr�<module>r\s���
�
�
�
�������������"�"�"�"�"�"�*�*�*�*�*�*�*�*�*�*�������
�)�I�
�
���9���������
�O�O�G�������	�	�	��D�	�������
�
�
�
�
�
�
�
� .�.��"�c�'�"�.�8�B��G�+<�.�.�.�.�b6��6�8�6�6�6�6�
����3������s�A�A�A