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

Support fakefs "pause and resume" #448

Closed
majuscule opened this issue Nov 6, 2018 · 5 comments
Closed

Support fakefs "pause and resume" #448

majuscule opened this issue Nov 6, 2018 · 5 comments

Comments

@majuscule
Copy link

Feature request to support "pausing" and "resuming" use of the fakefs, allowing for a test process to run code that the fakefs does not support, then adding new data to the fakefs from the real fs upon resumption.

@mrbean-bremen
Copy link
Member

@majuscule - please check if this works for you.

@mrbean-bremen
Copy link
Member

Functionality is implemented in the released version - closing.

@majuscule
Copy link
Author

Looks perfect! Thank you. I don't actually see a release out though? --pre or otherwise. Also while I'm here I'll add one more tiny idea - it'd be nice if this was supported as a context manager to be able to do:

with fs.pause():
     # my syscalls

@mrbean-bremen
Copy link
Member

This should be in the latest release (3.5.3), and had already been added in 3.5.2.
About the context manager - I have been thinking about this, but I wasn't sure where to add it (Patcher, UnitTest, or fake_filesystem). I can add this later...

@majuscule
Copy link
Author

Whoops, my mistake. Thanks!

mrbean-bremen added a commit that referenced this issue Dec 6, 2018
- added usage documentation
- see #448
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