-
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
AttributeError: '_FakeAccessor' object has no attribute 'owner' #629
Comments
Thanks for the report and the investigation! As we heavily rely on the |
Both |
- return the current user/group name under Posix - raises NotImplementedError under Windows - fixes pytest-dev#629
- return the current user/group name under Posix - raises NotImplementedError under Windows - fixes pytest-dev#629
- return the current user/group name under Posix - raises NotImplementedError under Windows - fixes #629
@saxocellphone - shall be fixed in master now, please check! |
…rent user/group name under Posix - raises NotImplementedError under Windows - fixes #629
Describe the bug
Getting
E AttributeError: '_FakeAccessor' object has no attribute 'owner'
when running with pytest. More specifically, happens in this function in pathlib.pyHow To Reproduce
Run a pytest with code containing this line
I have tried running on python 3.9.6, python 3.6.14. It works with the ladder, but not the former.
macOS-10.16-x86_64-i386-64bit
Python 3.9.6 (v3.9.6:db3ff76da1, Jun 28 2021, 11:49:53)
[Clang 6.0 (clang-600.0.57)]
pyfakefs-4.5.0
EDIT:
Dug a bit deeper, seems like somewhere in time Pathlib changed the implementation of the
owner
function. This is the old implementation:The new implementation have the owner attribute in the accessor, so a mock is needed for that
The text was updated successfully, but these errors were encountered: