Skip to content
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

Mock out xattr calls #423

Closed
dtangster opened this issue Aug 20, 2018 · 3 comments
Closed

Mock out xattr calls #423

dtangster opened this issue Aug 20, 2018 · 3 comments

Comments

@dtangster
Copy link

pyfakefs doesn't seem mock out calls like os.getxattr, os.listxattr, os.setxattr, etc.

Are there plans to support this in the future?

@mrbean-bremen
Copy link
Member

mrbean-bremen commented Aug 21, 2018

There has been no need for these so far, it seems, but if needed, we can add support for that, of course.
There is an empty implementation of fake listxattr, and we could easily add empty implementations for the rest. The better way is probably to keep track of the extended attributes, defaulting to the attributes not set, so that the user would be responsible to set the attributes in the test setup if needed.

I may have a look at this sometime later - I don't have much free time at the moment.

mrbean-bremen added a commit to mrbean-bremen/pyfakefs that referenced this issue Sep 1, 2018
- added support for reading/writing arbitrary extended attributes
  (Linux / Python 3 only)
- Note: support for extended fs attributes is assumed, not checked
- see pytest-dev#423
jmcgeheeiv pushed a commit that referenced this issue Sep 3, 2018
- added support for reading/writing arbitrary extended attributes
  (Linux / Python 3 only)
- Note: support for extended fs attributes is assumed, not checked
- see #423
@mrbean-bremen
Copy link
Member

@dtangster - can you please check if the implementation in master works for you?

@mrbean-bremen
Copy link
Member

Closing as fixed with #426 - please reopen if this is not sufficient.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants