관리-도구
편집 파일: pytest_plugin.cpython-311.pyc
� �܋f� � �� � d Z ddlZddlZddlmZ ddlmZ ddlmZ n # e$ r dZY nw xY wej � e� � ej � e� � ej � e� � e�ej � e� � ej d� � � Z ej d�� � d � � � Z ej d �� � d� � � Z ej d�� � d � � � ZdS )z�A pytest plugin for using pyfakefs as a fixture When pyfakefs is installed, the "fs" fixture becomes available. :Usage: def my_fakefs_test(fs): fs.create_file('/var/data/xx1.txt') assert os.path.exists('/var/data/xx1.txt') � N)�capture)�Patcher)�pathlibc # �� K � t | d� � rt | j � }nt � � }|� � � |j V � |� � � dS )zFake filesystem.�paramN��hasattrr r �setUp�fs�tearDown��request�patchers �g/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/pyfakefs/pytest_plugin.pyr r sd � � � � �w�� � � ��7�=�)����)�)���M�M�O�O�O� �*������������ �class)�scopec # �� K � t | d� � rt | j � }nt � � }|� � � |j V � |� � � dS )z%Class-scoped fake filesystem fixture.r Nr r s r �fs_classr * �d � � � � �w�� � � ��7�=�)����)�)���M�M�O�O�O� �*�����������r �modulec # �� K � t | d� � rt | j � }nt � � }|� � � |j V � |� � � dS )z&Module-scoped fake filesystem fixture.r Nr r s r � fs_moduler 6 r r �sessionc # �� K � t | d� � rt | j � }nt � � }|� � � |j V � |� � � dS )z'Session-scoped fake filesystem fixture.r Nr r s r � fs_sessionr B r r )�__doc__�py�pytest�_pytestr �!pyfakefs.fake_filesystem_unittestr r �ImportError�SKIPMODULES�add�fixturer r r r � r r �<module>r'