Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ The released versions correspond to PyPI releases.
### Fixes
* fixes a problem with `Path` type hints using the pipe symbol in wrapped functions
inside an `fs` dependent fixture (see [#1242](../../issues/1242))
* fixes problem with new `coverage` in Python 3.14 using the fake filesystem
(see [#1245](../../issues/1245))

## [Version 5.10.2](https://pypi.python.org/pypi/pyfakefs/5.10.2) (2025-11-04)
Fixes a problem with `pathlib.glob` in Python 3.14.
Expand Down
7 changes: 6 additions & 1 deletion pyfakefs/fake_filesystem_unittest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,12 @@ def _refresh(self) -> None:
for name in self._fake_module_classes:
self.fake_modules[name] = self._fake_module_classes[name](self.fs)
if hasattr(self.fake_modules[name], "skip_names"):
self.fake_modules[name].skip_names = self.skip_names
self.fake_modules[name].skip_names = self.skip_names | {
# also skip non-build-in skipped modules
m.__name__
for m in self.SKIPMODULES
if m and "." in m.__name__
}
self.fake_modules[PATH_MODULE] = self.fake_modules["os"].path
for name in self._unfaked_module_classes:
self.unfaked_modules[name] = self._unfaked_module_classes[name]()
Expand Down
13 changes: 10 additions & 3 deletions pyfakefs/pytest_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,21 @@ def my_fakefs_test(fs):

try:
from _pytest import pathlib

Patcher.SKIPMODULES.add(pathlib)
except ImportError:
pathlib = None # type:ignore[assignment]
pass

try:
from coverage import python # type:ignore[import]

Patcher.SKIPMODULES.add(python)
except ImportError:
pass

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


@pytest.fixture
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ xdist = [

[tool.setuptools]
include-package-data = true
py-modules = ["pyfakefs"]

[tool.setuptools.package-data]
where = ["pyfakefs"]
Expand Down
Loading