✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ premium290.web-hosting.com ​🇻​♯➤ 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP 🇾​♯➤ 2025

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 63.250.38.37 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.217.120
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ 𝗔𝗟𝗟 𝗪𝗢𝗥𝗞𝗜𝗡𝗚....

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /opt/cloudlinux/venv/lib/python3.11/site-packages/pyfakefs//pytest_plugin.py
"""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')
"""

import contextlib

import py
import pytest
from _pytest import capture

from pyfakefs.fake_filesystem_unittest import Patcher, Pause

try:
    from _pytest import pathlib
except ImportError:
    pathlib = None  # type:ignore[assignment]

Patcher.SKIPMODULES.add(py)
Patcher.SKIPMODULES.add(pytest)
Patcher.SKIPMODULES.add(capture)
if pathlib is not None:
    Patcher.SKIPMODULES.add(pathlib)


@pytest.fixture
def fs(request):
    """Fake filesystem."""
    if hasattr(request, "param"):
        # pass optional parameters via @pytest.mark.parametrize
        patcher = Patcher(*request.param)
    else:
        patcher = Patcher()
    patcher.setUp()
    yield patcher.fs
    patcher.tearDown()


@pytest.fixture(scope="class")
def fs_class(request):
    """Class-scoped fake filesystem fixture."""
    if hasattr(request, "param"):
        patcher = Patcher(*request.param)
    else:
        patcher = Patcher()
    patcher.setUp()
    yield patcher.fs
    patcher.tearDown()


@pytest.fixture(scope="module")
def fs_module(request):
    """Module-scoped fake filesystem fixture."""
    if hasattr(request, "param"):
        patcher = Patcher(*request.param)
    else:
        patcher = Patcher()
    patcher.setUp()
    yield patcher.fs
    patcher.tearDown()


@pytest.fixture(scope="session")
def fs_session(request):
    """Session-scoped fake filesystem fixture."""
    if hasattr(request, "param"):
        patcher = Patcher(*request.param)
    else:
        patcher = Patcher()
    patcher.setUp()
    yield patcher.fs
    patcher.tearDown()


@pytest.hookimpl(tryfirst=True)
def pytest_sessionfinish(session, exitstatus):
    """Make sure that the cache is cleared before the final test shutdown."""
    Patcher.clear_fs_cache()


@pytest.hookimpl(hookwrapper=True, tryfirst=True)
def pytest_runtest_logreport(report):
    """Make sure that patching is not active during reporting."""
    pause = Patcher.PATCHER is not None and Patcher.PATCHER.is_patching
    context_mgr = Pause(Patcher.PATCHER) if pause else contextlib.nullcontext()
    with context_mgr:
        yield
    if pause and report.when == "teardown":
        # if we get here, we are not in a function scope fixture
        # in this case, we still want to pause patching between the tests
        Patcher.PATCHER.pause()


@pytest.hookimpl(tryfirst=True)
def pytest_runtest_setup(item):
    # resume patcher if not in a function scope
    if Patcher.PATCHER is not None:
        Patcher.PATCHER.resume()


Current_dir [ 𝗡𝗢𝗧 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
8 Jul 2026 7.02 AM
root / root
0755
__pycache__
--
11 Feb 2026 8.05 AM
root / root
0755
pytest_tests
--
11 Feb 2026 8.04 AM
root / root
0755
tests
--
11 Feb 2026 8.04 AM
root / root
0755
__init__.py
0.055 KB
20 Jan 2026 1.01 PM
root / root
0644
_version.py
0.022 KB
20 Jan 2026 1.01 PM
root / root
0644
fake_file.py
49.826 KB
20 Jan 2026 1.01 PM
root / root
0644
fake_filesystem.py
127.073 KB
20 Jan 2026 1.01 PM
root / root
0644
fake_filesystem_shutil.py
6.636 KB
20 Jan 2026 1.01 PM
root / root
0644
fake_filesystem_unittest.py
52.166 KB
20 Jan 2026 1.01 PM
root / root
0644
fake_io.py
6.306 KB
20 Jan 2026 1.01 PM
root / root
0644
fake_legacy_modules.py
3.81 KB
20 Jan 2026 1.01 PM
root / root
0644
fake_open.py
14.952 KB
20 Jan 2026 1.01 PM
root / root
0644
fake_os.py
54.217 KB
20 Jan 2026 1.01 PM
root / root
0644
fake_path.py
20.329 KB
20 Jan 2026 1.01 PM
root / root
0644
fake_pathlib.py
41.795 KB
20 Jan 2026 1.01 PM
root / root
0644
fake_scandir.py
8.772 KB
20 Jan 2026 1.01 PM
root / root
0644
helpers.py
16.716 KB
20 Jan 2026 1.01 PM
root / root
0644
legacy_packages.py
0.877 KB
20 Jan 2026 1.01 PM
root / root
0644
mox3_stubout.py
5.267 KB
20 Jan 2026 1.01 PM
root / root
0644
patched_packages.py
6.439 KB
20 Jan 2026 1.01 PM
root / root
0644
py.typed
0.066 KB
20 Jan 2026 1.01 PM
root / root
0644
pytest_plugin.py
2.659 KB
20 Jan 2026 1.01 PM
root / root
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF