Skip to content

"atexit" module: PyFakeFS not active anymore at application exit #1110

Discussion options

You must be logged in to vote

Out of the box I don't have a solution for this, and it is certainly not possible with the current pyfakefs usage. pyfakefs has to make sure that the filesystem functions are restored after the test ends, and this is certainly before the atexit hook is triggered. Just not resetting the filesystem would most probably have other unwanted side effects.

You could test this by patching/overwriting Patcher.tearDown to do nothing and check how that will behave, though that would also mean that you have to make sure to run this test separately. Generally, I don't think that this is a good idea.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by buhtz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants