File tree 5 files changed +20
-0
lines changed
pytest_tests/ns_package/test
5 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,10 @@ jobs:
116
116
run : |
117
117
echo "$(python -m pytest pyfakefs/pytest_tests/pytest_plugin_failing_helper.py)" > ./testresult.txt
118
118
python -m pytest pyfakefs/pytest_tests
119
+ if [[ '${{ matrix.pytest-version }}' > '3.0.0' ]]; then
120
+ cd pyfakefs/pytest_tests/ns_package
121
+ python -m pytest --log-cli-level=INFO test
122
+ fi
119
123
shell : bash
120
124
121
125
dependency-check :
Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ The released versions correspond to PyPI releases.
6
6
### Fixes
7
7
* Re-create temp directory if it had been created before on resetting file system
8
8
(see [#814](../../issues/814)).
9
+ * Exclude pytest `pathlib` modules from patching to avoid mixup of patched/unpatched
10
+ code (see [#814](../../issues/814)).
9
11
10
12
### Infrastructure
11
13
* Added pytype check for non-test modules in CI (see [#599](../../issues/599)).
Original file line number Diff line number Diff line change @@ -13,8 +13,15 @@ def my_fakefs_test(fs):
13
13
14
14
from pyfakefs .fake_filesystem_unittest import Patcher
15
15
16
+ try :
17
+ from _pytest import pathlib
18
+ except ImportError :
19
+ pathlib = None
20
+
16
21
Patcher .SKIPMODULES .add (py )
17
22
Patcher .SKIPMODULES .add (pytest )
23
+ if pathlib is not None :
24
+ Patcher .SKIPMODULES .add (pathlib )
18
25
19
26
20
27
@pytest .fixture
Original file line number Diff line number Diff line change
1
+ import pyfakefs .fake_filesystem
2
+
3
+
4
+ def test_foo (fs ):
5
+ """Regression test for #814 - must run in namespace package with cli logging."""
6
+ fs .os = pyfakefs .fake_filesystem .OSType .WINDOWS
7
+ assert True
You can’t perform that action at this time.
0 commit comments