-
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
Support for st_blocks field #722
Labels
Comments
I guess it would be enough if the result would just be something like |
Result should be int so I would suggest |
Of course, that was what I meant - ok, I will see what I can do, maybe I will get to it over the weekend. |
mrbean-bremen
added a commit
to mrbean-bremen/pyfakefs
that referenced
this issue
Oct 2, 2022
mrbean-bremen
added a commit
to mrbean-bremen/pyfakefs
that referenced
this issue
Oct 2, 2022
mrbean-bremen
added a commit
that referenced
this issue
Oct 2, 2022
Implemented in master now - please check! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
I have a code that crawls filesystem. One of most important field that I read from stat is
st_blocks
(see: https://docs.python.org/3/library/os.html#os.stat_result.st_blocks)Without that field my code fails with:
AttributeError: 'FakeStatResult' object has no attribute 'st_blocks'
I know that theoretically, it doesn't have to be there but I haven't met POSIX filesystem that wouldn't have that field yet.
Describe the solution you'd like
Add
st_blocks
field to FakeStatResult.Describe alternatives you've considered
The only alternative I see right now is not to use pyfakefs and mock os calls by myself.
The text was updated successfully, but these errors were encountered: