You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I noticed additional_skip_names works for builtin open, io.open and os.open but it doesn't work for Path().open unless I add pathlib to additional_skip_names too. I guess it is because Path.open itself is not monitored and io.open is monitored instead as Path.open uses io.open internally.
Sorry, I first mis-read the issue (deleted that answer, in case you saw it).
additional_skip_names is indeed tricky, and I remember having problems to get it to work with pathlib. I will have a closer look later, hopefully there is an easy fix (though I doubt it).
…text and write_bytes (#1022)
* Add more regression tests for #1012
* Resolve pytype errors by adding __enter__, __exit__, read and write to file wrappers
Describe the bug
I noticed
additional_skip_names
works for builtinopen
,io.open
andos.open
but it doesn't work forPath().open
unless I addpathlib
toadditional_skip_names
too. I guess it is becausePath.open
itself is not monitored andio.open
is monitored instead asPath.open
usesio.open
internally.How To Reproduce
This works:
x.py
But this doesn't work:
x.py
Your environment
macOS-14.4.1-arm64-arm-64bit
Python 3.11.9 (main, Apr 2 2024, 08:25:04) [Clang 15.0.0 (clang-1500.3.9.4)]
pyfakefs 5.4.1
pytest 8.2.0
The text was updated successfully, but these errors were encountered: