-
-
Notifications
You must be signed in to change notification settings - Fork 30k
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
bpo-30693: Fix tarfile test cleanup on MSWindows #5557
Conversation
This makes the test passing. But mocking os.listdir which is used in a cleaning up code looks unsafe to me. This can left files when really something prevented from deleting them immediately (this is happened on Windows with an antivirus detector). It would be better to restore the original os.listdir before starting the cleaning up. |
74e3592
to
5c18489
Compare
it was using our mocked listdir to check when the files were gone
updated to only have the mocked version for tar.add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this LGTM!
@serhiy-storchaka: Please replace |
Thanks @bmwiedemann for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7. |
it was using our mocked listdir to check when the files were gone. (cherry picked from commit 4ad703b) Co-authored-by: Bernhard M. Wiedemann <githubbmw@lsmod.de>
GH-5567 is a backport of this pull request to the 3.7 branch. |
Lib/test/support/__init__.py#L334
was using our mocked listdir to check when the deleted files were gone - and thus it thought they remained therenote: someone with MSWindows needs to test this fix
https://bugs.python.org/issue30693