Hacked By AnonymousFox

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__/sybil.cpython-311.pyc

�

�܋f	����ddlZddlZddlZddlmZmZmZddlmZej	dej
��Zej	d��Zej	d��Z
Gd�de��ZGd	�d
e��ZdS)�N)�Region�Example�Document)�diffz^\.\.\s*topic::?\s*(.+)\bz(\n\Z|\n(?=\S))z\s+:class:\s*(read|write)-filec��eZdZd�ZdS)�	FileBlockc�2�|||c|_|_|_dS�N��path�content�action)�selfrr
rs    �c/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/testfixtures/sybil.py�__init__zFileBlock.__init__s��/3�W�f�,��	�4�<�����N)�__name__�
__module__�__qualname__r�rrrr
s(������E�E�E�E�Errc�6�eZdZdZdefd�Zdefd�Zdefd�Z	dS)	�
FileParsera9
    A `Sybil <http://sybil.readthedocs.io>`__ parser that
    parses certain ReST sections to read and write files in the
    configured :class:`~testfixtures.TempDirectory`.

    :param name: This is the name of the :class:`~testfixtures.TempDirectory` to use
                 in the Sybil test namespace.

    �namec��||_dSr
)r)rrs  rrzFileParser.__init__s
����	�	�	r�documentc#�K�|�tt��D�]*\}}}|���}t�|d��}|s�>d}||���dkr|dz
}tjd�	||d������
��}|ddkr|dz
}t|�d��||�d�����}t|���|���||j��V���,dS)N��z::�
���r)�find_region_sources�FILEBLOCK_START�
FILEBLOCK_END�
splitlines�CLASS�match�strip�textwrap�dedent�join�lstripr�groupr�start�end�evaluate)	rr�start_match�	end_match�source�lines�class_�index�parseds	         r�__call__zFileParser.__call__sX����.6�.J�.J��]�/
�/
�	�	�*�K��F��%�%�'�'�E��[�[��q��*�*�F��
���E��U�|�!�!�#�#�t�+�+���
���_�T�Y�Y�u�U�V�V�}�%=�%=�>�>�E�E�G�G�F��b�z�T�!�!��$���� �&�&�q�)�)���|�|�A������F���!�!�#�#��
�
�����
�	��
�
�
�
�)	�	r�examplec	��|j}|j|j}|jdkr�|�|jd���tjd��}||j	krAt|j	|d|j|jfzd|�|j��z��S|jdkr#|�
|j|j	d��dSdS)N�read�asciirzFile %r, line %i:zReading from "%s":�write)r6�	namespacerrr:r�replace�os�linesepr
r�line�	as_stringr<)rr8�block�dir�actuals     rr/zFileParser.evaluate;s���"�>�����	�*���<�6�!�!��X�X�e�j�'�2�2�:�:�2�:�t�L�L�F����&�&���M��'�7�<���*F�F�(�3�=�=���+D�+D�D�	����<�7�"�"��I�I�e�j�%�-��9�9�9�9�9�#�"rN)
rrr�__doc__�strrrr7rr/rrrrrso���������S�����������8
:��
:�
:�
:�
:�
:�
:rr)r?�rer(�sybilrrr�testfixturesr�compile�	MULTILINEr"r#r%�objectrrrrr�<module>rNs���	�	�	�	�	�	�	�	�����+�+�+�+�+�+�+�+�+�+��������"�*�9�2�<�H�H����
�-�.�.�
���
�4�5�5��E�E�E�E�E��E�E�E�
6:�6:�6:�6:�6:��6:�6:�6:�6:�6:r

Hacked By AnonymousFox1.0, Coded By AnonymousFox