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

Python tests: Close open files #2675

Merged
merged 1 commit into from
Sep 25, 2023

Conversation

encukou
Copy link
Contributor

@encukou encukou commented Sep 21, 2023

I dialed up my Python debug settings, and got complaints about unclosed files on stderr, whis caused tests to fail for me.

This properly closes all the files the Python tests open.

Debug builds/modes of Python will complain loudly about unclosed files,
making tests fail.
@encukou encukou marked this pull request as ready for review September 21, 2023 08:10
@ffesti ffesti merged commit 5802192 into rpm-software-management:master Sep 25, 2023
@ffesti
Copy link
Contributor

ffesti commented Sep 25, 2023

Over are the good old days when one could rely on the garbage collection to just close the files for you. Had to do something very similar recently in my own Python project.

Thanks for the patch!

@encukou encukou deleted the py-test-close-files branch September 25, 2023 10:57
@dmnks dmnks added the test Testsuite-related label Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Testsuite-related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants