관리-도구
편집 파일: pytest_doctest_test.cpython-311.pyc
� �.C�R�� �� � d Z d� Z eddd�� � Z eddd�� � Zej � dd� � e_ ed dd�� � Z ed dd�� � Z eddd�� � ZdS ) a This is a test case for pyfakefs issue #45. This problem is resolved by using PyTest version 2.8.6 or above. To run these doctests, install pytest and run: $ pytest --doctest-modules pytest_doctest_test.py Add `-s` option to enable print statements. c �P � dd�}d� |rdnd| |�� � |_ |S )z3Return a simple function with parametrized doctest.� c � � t | d� � 5 }|� |� � d d d � � d S # 1 swxY w Y d S )N�w)�open�write)�name�content�fs �{/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/pyfakefs/pytest_tests/pytest_doctest_test.py� make_filez$make_file_factory.<locals>.make_file s� � � �$��_�_� �� �G�G�G���� � � � � � � � � � � � ���� � � � � � s �4�8�8z� >>> import os >>> {command} >>> name, content = 'foo', 'bar' >>> {func_name}(name, content) >>> open(name).read() == content {result} >>> os.remove(name) # Cleanup zgetfixture('fs')�pass)�command� func_name�result)r )�format�__doc__)r �faker r s r �make_file_factoryr sU � �� � � �� �F�&*�6�"�"���� � � � �� �� �passesFT)r r � passes_tooz>>> os.remove(name)z>>> pass�fails�crashesz ) SyntaxErrorN)r r r r �replacer r �crashes_too� r r �<module>r s� �� � �� � �0 � �8�%�� =� =� =�� � �|�$�t� D� D� D� ��'�/�/�0E�z�R�R� � ���'��e�<�<�<�� � �I�D�� ?� ?� ?�����d�5�I�I�I���r