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

Pyfakefs usage scenarios #189

Closed
mrbean-bremen opened this issue May 27, 2017 · 8 comments
Closed

Pyfakefs usage scenarios #189

mrbean-bremen opened this issue May 27, 2017 · 8 comments

Comments

@mrbean-bremen
Copy link
Member

mrbean-bremen commented May 27, 2017

This is more of a discussion point than an issue, and also for a later release.

I wonder if there is really the need to use pyfakefs via mock (the third scenario), given that you always can use Patcher directly if not using unittest or pytest. From what I have seen from contributors so far, none of them seems to be using the mock scenario.

Anyway, I doubt the usefulness of mocking glob, tempfile or shutil separately, but maybe I'm wrong here. On the other hand, if removing that scenario for these modules, fake_filesystem_glob and probably fake_tempfile (which is implemented incompletely anyway) can be removed, and most from fake_filesystem_shutil implementation also (though this needs some additions in FakeOsModule).

Edit: I moved some of the points into separate issues that can be implemented independently (#191, #192, #193 and #194).

What remains for this issue:

  • adapt the documentation (replace mock scenario with Patcher scenario)
  • remove fake glob and tempfile implementation
@jmcgeheeiv
Copy link
Contributor

Thank you for thinking so deeply about this.

I generally understand and agree. Could I ask you to separate these into two or three paragraphs or perhaps even separate issues? Also, please specify "one" in "...none seems to be using that one."

@mrbean-bremen
Copy link
Member Author

Okay, I created a few more issues that can be handled separately.

Do you think this is something for the next release? And thanks for the 3.2 release, by the way - you have done a lot of documentation cleanup, I liked that.

@jmcgeheeiv
Copy link
Contributor

Sure, this is an excellent target for 3.3.

@mrbean-bremen
Copy link
Member Author

Great!

Note I won't have access to a computer for a couple of weeks - I will finish the nanosecond time related issues afterwards.

@jmcgeheeiv
Copy link
Contributor

Bon voyage.

@mrbean-bremen
Copy link
Member Author

Thanks, having that!

mrbean-bremen added a commit to mrbean-bremen/pyfakefs that referenced this issue Jul 1, 2017
- changed test to test the real glob with the fake filesystem
- see pytest-dev#189
mrbean-bremen added a commit to mrbean-bremen/pyfakefs that referenced this issue Jul 1, 2017
- changed test to test the real glob with the fake filesystem
- see pytest-dev#189
mrbean-bremen added a commit that referenced this issue Jul 2, 2017
- removed tempfile and glob modules from module list
- moved temp dir generation code from TestCase into Patcher
- see #189
@mrbean-bremen
Copy link
Member Author

Remaining task: adapt README.MD.

@mrbean-bremen mrbean-bremen modified the milestone: v3.3 Jul 9, 2017
mrbean-bremen added a commit to mrbean-bremen/pyfakefs that referenced this issue Jul 11, 2017
mrbean-bremen added a commit that referenced this issue Aug 9, 2017
@mrbean-bremen
Copy link
Member Author

All done - closing.
@jmcgeheeiv - when you will be available again, you may prepare a 3.3 release. The bugs coming from TSTL are ongoing stuff, but nothing really important for the release, I think. I think the next major change would be to pep8tify the API.

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