Hacked By AnonymousFox

Current Path : /opt/cloudlinux/venv/lib/python3.11/site-packages/pyfakefs/tests/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/pyfakefs/tests/__pycache__/example.cpython-311.pyc

�

�܋f���z�dZddlZddlZddlZ	ddlZdZn#e$rdZdZYnwxYwd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
dS)aL
Example module that is tested in :py:class`pyfakefs.example_test.TestExample`.
This demonstrates the usage of the
:py:class`pyfakefs.fake_filesystem_unittest.TestCase` base class.

The modules related to file handling are bound to the respective fake modules:

>>> os     #doctest: +ELLIPSIS
<pyfakefs.fake_os.FakeOsModule object...>
>>> os.path     #doctest: +ELLIPSIS
<pyfakefs.fake_path.FakePathModule object...>
>>> shutil     #doctest: +ELLIPSIS
<pyfakefs.fake_filesystem_shutil.FakeShutilModule object...>

`open()` is an alias for `io.open()` and is bound to `FakeIoModule.open`.
�NTFc���t|d��5}|�d�|����|�d��ddd��dS#1swxYwYdS)a�Create the specified file and add some content to it.  Use the `open()`
    built in function.

    For example, the following file operations occur in the fake file system.
    In the real file system, we would not even have permission
    to write `/test`:

    >>> os.path.isdir('/test')
    False
    >>> os.mkdir('/test')
    >>> os.path.isdir('/test')
    True
    >>> os.path.exists('/test/file.txt')
    False
    >>> create_file('/test/file.txt')
    >>> os.path.exists('/test/file.txt')
    True
    >>> with open('/test/file.txt') as f:
    ...     f.readlines()
    ["This is test file '/test/file.txt'.\n", 'It was created using open().\n']
    �wzThis is test file '{0}'.
zIt was created using open().
N)�open�write�format��path�fs  �g/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/pyfakefs/tests/example.py�create_filer.s���.
�d�C���2�A�	���,�3�3�D�9�9�:�:�:�	���0�1�1�1�2�2�2�2�2�2�2�2�2�2�2�2����2�2�2�2�2�2s�>A�A �#A c�.�tj|��dS)a0Delete the specified file.

    For example:

    >>> os.mkdir('/test')
    >>> os.path.exists('/test/file.txt')
    False
    >>> create_file('/test/file.txt')
    >>> os.path.exists('/test/file.txt')
    True
    >>> delete_file('/test/file.txt')
    >>> os.path.exists('/test/file.txt')
    False
    N)�os�remove�r	s r�delete_filerJs���I�d�O�O�O�O�O�c�@�tj�|��S)a5Return True if the specified file exists.

    For example:

    >>> path_exists('/test')
    False
    >>> os.mkdir('/test')
    >>> path_exists('/test')
    True
    >>>
    >>> path_exists('/test/file.txt')
    False
    >>> create_file('/test/file.txt')
    >>> path_exists('/test/file.txt')
    True
    )rr	�existsrs r�path_existsr\s��"�7�>�>�$���rc�*�tj|��S)aReturn the list of paths matching the specified glob expression.

    For example:

    >>> os.mkdir('/test')
    >>> create_file('/test/file1.txt')
    >>> create_file('/test/file2.txt')
    >>> file_names = sorted(get_glob('/test/file*.txt'))
    >>>
    >>> import sys
    >>> if sys.platform.startswith('win'):
    ...     # Windows style path
    ...     file_names == [r'/test\file1.txt', r'/test\file2.txt']
    ... else:
    ...     # UNIX style path
    ...     file_names == ['/test/file1.txt', '/test/file2.txt']
    True
    )�glob)�	glob_paths r�get_globrps��&�9�Y���rc�.�tj|��dS)z$Delete the specified file hierarchy.N)�shutil�rmtreers r�rm_treer�s��
�M�$�����rc��tr!ttj|����Sttj|����S)z6Return a list of directory entries for the given path.)�has_scandir�list�scandirrrs r�scan_dirr"�s:���+��G�O�D�)�)�*�*�*���
�4� � �!�!�!rc�~�t|d��5}|���cddd��S#1swxYwYdS)z4Return the contents of the given path as byte array.�rbN)r�readrs  r�
file_contentsr&�s~��	
�d�D�	�	��Q��v�v�x�x���������������������s�2�6�6)�__doc__rrrr!r�ImportErrorrrrrrr"r&�rr�<module>r*s��� ��"����	�	�	�	�
�
�
�
���N�N�N��K�K�������G��K�K�K�����
2�2�2�8���$ � � �( � � �,���
"�"�"�����s��	#�#

Hacked By AnonymousFox1.0, Coded By AnonymousFox