관리-도구
편집 파일: fake_io.cpython-311.pyc
� �܋f� � � � d Z ddlZddlZddlZddlZddlmZ ddlmZm Z m Z mZmZm Z mZmZ ddlmZ ddlmZ ddlmZ erddlmZ G d � d e� � Z G d� d� � Zej d k rddlZ G d� d� � ZdS dS )zP Uses :py:class:`FakeIoModule` to provide a fake ``io`` module replacement. � N)�Enum)�List�Optional�Callable�Union�Any�AnyStr�IO� TYPE_CHECKING)�AnyFileWrapper)�FakeFileOpen)�IS_PYPY)�FakeFilesystemc � � e Zd ZdZdZdZdZdS )� PatchModezvDefines if patching shall be on, off, or in automatic mode. Currently only used for `patch_open_code` option. � � � N)�__name__� __module__�__qualname__�__doc__�OFF�AUTO�ON� � �a/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib/python3.11/site-packages/pyfakefs/fake_io.pyr r * s) � � � � � �� � �C��D� �B�B�Br r c � � e Zd ZdZedee fd�� � Zdd�Z dde e ef ded edee dee dee de dee de eee f fd�Zej dk rd� Zd� Zd S )�FakeIoModulez�Uses FakeFilesystem to provide a fake io module replacement. You need a fake_filesystem to use this: filesystem = fake_filesystem.FakeFilesystem() my_io_module = fake_io.FakeIoModule(filesystem) �returnc �V � dg} t j dk r| � d� � | S )zqReturn the list of patched function names. Used for patching functions imported from the module. �open�r � � open_code)�sys�version_info�append)�_dirs r �dirzFakeIoModule.dir<