🔐 Sid Gifari File Manager Pro
v8.0.5 | 2026-06-15 01:31:09 | PHP 8.1.34
📂
/ (Root)
/
opt
/
cloudlinux
/
venv
/
lib
/
python3.11
/
site-packages
/
pyfakefs
/
pytest_tests
📍 /opt/cloudlinux/venv/lib/python3.11/site-packages/pyfakefs/pytest_tests
🔄 Refresh
✏️
Editing: test_reload_local_import.py
Read Only
import pytest from pyfakefs.fake_filesystem_unittest import Patcher from pyfakefs.fake_pathlib import FakePathlibModule from pyfakefs.helpers import reload_cleanup_handler from pyfakefs.pytest_tests import local_import @pytest.fixture def test_fs(): with Patcher() as patcher: patcher.cleanup_handlers["pyfakefs.pytest_tests.lib_using_pathlib"] = ( reload_cleanup_handler ) yield patcher.fs class TestReloadCleanupHandler: def test1(self, test_fs): path = local_import.load("some_path") assert isinstance(path, FakePathlibModule.Path) def test2(self): path = local_import.load("some_path") # will fail without reload handler assert not isinstance(path, FakePathlibModule.Path)
💾 Save Changes
❌ Cancel