-
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
testTmpExists fails if TMPDIR != /tmp on Linux #810
Comments
Thanks! Are you aware if there is always a |
According to FHS, (of course, using |
Ok, thanks - in this case I will just add that link also under linux. Will probably do that tonight... |
Thanks! |
- TMPDIR may point elsewhere - fixes pytest-dev#810
- TMPDIR may point elsewhere - fixes pytest-dev#810
- TMPDIR may point elsewhere - fixes #810
Thank you! |
Thanks for the report! I will make a new patch release in a moment (because of a regression), so this will also be in the release. |
I think that adding new behaviors like this should be introduced through a feature flag first. There are existing unit tests and fake filesystem libraries that subclass pyfakefs that assume an empty fake file system. |
Describe the bug
When
TMPDIR
is not/tmp
(or a subdirectory of/tmp
), the following test failure occurs:I think this is because https://github.com/pytest-dev/pyfakefs/blob/main/pyfakefs/fake_filesystem_unittest.py#L894-L903 only creates
/tmp
symlink on Darwin (and onlyTMPDIR
on Linux) but https://github.com/pytest-dev/pyfakefs/blob/main/pyfakefs/tests/fake_filesystem_unittest_test.py#L663-L666 assumes/tmp
on all non-win32 platforms.How To Reproduce
Your environment
Please run the following in the environment where the problem happened and
paste the output.
(git 1906fde)
The text was updated successfully, but these errors were encountered: