PATH:
opt
/
cloudlinux
/
venv
/
lib
/
python3.11
/
site-packages
/
pyfakefs
/
__pycache__
� �����[� �. � d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddlZddlZddl Z ddlZddlmZ ddlmZmZ ddlmZ ddlmZmZ ddlmZmZmZ ddlmZmZm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z* dd l m+Z+ dd l,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2 ddl,m3Z3 ddl,m4Z4 dd l,m5Z5 ddl,m6Z6 ddl7m8Z8m9Z9m:Z:m;Z;m<Z< ddl=m>Z> ddl?m@Z@mAZA ddlBmCZCmDZD ddlEmFZF e jG dk rdndZHe jG dk rdndZI G d� d� � ZJ G d� d� � ZK d;ddddde;jL dddd� d e$e d!e$e!e%eMef d"e$e!e d#e$e eMef d$eNd%eNd&e;d'eNd(eNd)eNd*efd+�ZOdZPddddde;jL ddfd,ed-e+d.ed/ed!e$e!e%eMef d"e$e!e d#e$e eMef d$eNd%eNd&e;d'eNd)eNd*e+fd0�ZQ G d1� d2� � ZR G d3� d4e jS eR� � ZS G d5� d6� � ZT G d7� d8� � ZU G d9� d:ee� � ZVdS )<a� This module provides a base class derived from `unittest.TestClass` for unit tests using the :py:class:`pyfakefs` module. `fake_filesystem_unittest.TestCase` searches `sys.modules` for modules that import the `os`, `io`, `path` `shutil`, and `pathlib` modules. The `setUpPyfakefs()` method binds these modules to the corresponding fake modules from `pyfakefs`. Further, the `open()` built-in is bound to a fake `open()`. It is expected that `setUpPyfakefs()` be invoked at the beginning of the derived class' `setUp()` method. There is no need to add anything to the derived class' `tearDown()` method. During the test, everything uses the fake file system and modules. This means that even in your test fixture, familiar functions like `open()` and `os.makedirs()` manipulate the fake file system. Existing unit tests that use the real file system can be retrofitted to use pyfakefs by simply changing their base class from `:py:class`unittest.TestCase` to `:py:class`pyfakefs.fake_filesystem_unittest.TestCase`. � N)�reload)�Loader�MetaPathFinder)� ModuleSpec)�spec_from_file_location�module_from_spec)� ModuleType� TracebackType�FunctionType) �Any�Callable�Dict�List�Set�Tuple�Optional�Union�Type�Iterator�cast� ItemsView�Sequence)� TestSuite)�fake_filesystem�fake_io�fake_os� fake_open� fake_path� fake_file)�fake_filesystem_shutil)�fake_legacy_modules)�fake_pathlib)�mox3_stubout)�set_uid�set_gid� reset_ids� PatchMode�FakeFilesystem)�use_original_os)�IS_PYPY�IS_WIN)�pathlib2�scandir)�StubOutForTesting�win32�nt�posix�ntpath� posixpathc �$ � e Zd ZdZd� Zd� Zd� ZdS )�TempfilePatcherz,Handles tempfile patching for Posix systems.c �"