-
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
[4.6.2] KeyError: '/' in fake_filesystem.FakeDirectory.get_entry() #692
Comments
Thanks for the report! Looks like that release was premature, next time we should consider a pre-release for changes that may create this kind of regressions. At a first glance, this looks like the problem is in changing the os enviroment in the test. Due to some internal changes, it might not be suffcient to just change the values as is done in the code: def setUp(self):
self.setUpPyfakefs()
self.fs.is_windows_fs = True
self.fs.path_separator = "\\"
self.fs.is_case_sensitive = False This now probably needs an additional def setUp(self):
self.setUpPyfakefs()
self.fs.os = OSType.WINDOWS I will check if this is the only problem here with your repo (if you have the time, you can try it yourself). If it is, I shall at least update the documentation and the release notes, and try to make this upwards-compatible, for example by automatically resetting the fs if setting |
Ok, this only fixes some of your tests (10 of 30 failing). I will check the rest - this may take some time... |
The rest of the tests failed due to a regression, that let to |
Hm, I couldn't get it to work completely without changing the test code - some tests (4 of them) are still failing, and I'm not sure why yet. I may have another look tomorrow evening... |
Thanks for the quick response, much appreciated! |
- was always detected as existing - caused part of pytest-dev#692
- was always detected as existing - caused part of #692
…xisting - caused part of #692
Ok, I'm not sure what the problem was yesterday - not sure if the build used the latest version of pyfakefs. It seems now to work, so I will merge this to master and probably make a new patch release shortly afterwards. |
Release 4.6.3 is out - setting this to fixed. Feel free to reopen if you still have problems. |
Confirmed all ✔! Thanks for the quick fix! |
Recent changes in pyfakefs resulted in test failures in sabnzbd, discussed at sabnzbd/sabnzbd#2242. The failures go away when limiting pyfakefs to
< 4.6.0
in the test requirements so this appears to be a regression, possibly related to #676.Example of a unittest that triggers the issue: https://github.com/sabnzbd/sabnzbd/blob/3acfe194996aa8e2409644a9135ccb37b76dc0c9/tests/test_filesystem.py#L623
Environment: github CI, Linux and Mac; Python 3.7 through 3.10; pyfakefs 4.6.2
Traceback:
And the rather similar:
The text was updated successfully, but these errors were encountered: