-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Path.exists is not patched #1021
Comments
I also noticed |
Can you please show how you call that code? E.g. a reproducible example, if possible. |
For illustration - the following test passes: def test_fakefs(fs):
fs.os = OSType.LINUX
path = Path('/tmp/test')
path.parent.mkdir(exist_ok=True)
path.touch()
path.write_text('test')
assert path.exists()
assert os.path.exists('/tmp/test')
path.unlink()
assert not path.exists() So you must be doing something different. |
Thanks for investigating it! I probably did something wrong, I will check it when I get back to my desk. In the future I will add reproduction snippets with my reports. |
It was an issue on my side, I had |
@mrbean-bremen Quick question, are |
…y`/`except` instead of checking `Path().exists()` as `pyfakefs` doesn't seem to respect `skip_names` for `Path().exists()` relevant: pytest-dev/pyfakefs#1021 (comment)
…y`/`except` instead of checking `Path().exists()` as `pyfakefs` doesn't seem to respect `skip_names` for `Path().exists()` relevant: pytest-dev/pyfakefs#1021 (comment)
…y`/`except` instead of checking `Path().exists()` as `pyfakefs` doesn't seem to respect `skip_names` for `Path().exists()` relevant: pytest-dev/pyfakefs#1021 (comment)
Well... I had hoped you won't ask :) The truth is that I did want to implement a more generic solution for the handling of Feel free to write a new issue. Maybe you even have an idea on how to implement this in a better way... |
Describe the bug
I call
Path().exists
immediately aftershutil.copyfile
and it returnsFalse
whileos.path.exists
returnsTrue
.I guess
Path().exists
is using the real filesystem.How To Reproduce
Your environment
The text was updated successfully, but these errors were encountered: