Skip to content

Commit

Permalink
Only skip _pytest.pathlib if it is actually present
Browse files Browse the repository at this point in the history
- see #669
  • Loading branch information
mrbean-bremen committed Mar 15, 2022
1 parent 72940b9 commit d81cd56
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ The released versions correspond to PyPi releases.

## Unreleased

### Fixes
* only skip `_pytest.pathlib` in pytest versions where it is actually present
(see [#669](../../issues/669))

## [Version 4.5.5](https://pypi.python.org/pypi/pyfakefs/4.5.5) (2022-02-14)
Bugfix release, needed for compatibility with pytest 7.0.

Expand Down
3 changes: 2 additions & 1 deletion pyfakefs/pytest_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ def my_fakefs_test(fs):

Patcher.SKIPMODULES.add(py)
Patcher.SKIPMODULES.add(pytest)
Patcher.SKIPMODULES.add(_pytest.pathlib)
if hasattr(_pytest, "pathlib"):
Patcher.SKIPMODULES.add(_pytest.pathlib)


@pytest.fixture
Expand Down

0 comments on commit d81cd56

Please sign in to comment.