Closed sassanh closed 1 month ago
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).
Thanks! It is working for me.
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