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

Need to move back to the original directory before cleaning up the tempdir #309

Merged
merged 2 commits into from
Jan 19, 2023

Conversation

Bachmann1234
Copy link
Owner

@Bachmann1234 Bachmann1234 commented Jan 18, 2023

This switches from mocker to vanilla patch as a context decorator.

Also handles moving out the the temporary decorator before that context manager cleans up said tempdir. This ensures the test passes in platforms that are unable to delete the directory you are currently inside of. (Solaris)

… try and ensure the patch is cleaned up before the tempdir is cleaned up
@Bachmann1234 Bachmann1234 changed the title Mocking os path and using TEMPDIR has interacting effects. Need to move back to the original directory before cleaning up the tempdir Jan 19, 2023
@Bachmann1234
Copy link
Owner Author

Based on @mtelka's testing in #308 2595bc4 is the only required fix.

Merging the PR as is because I prefer the context manager in this case. Updating the title and description of the PR to reflect the actual problem

@Bachmann1234 Bachmann1234 merged commit 9cd857a into main Jan 19, 2023
@Bachmann1234 Bachmann1234 deleted the 308-solaris branch January 19, 2023 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant