-
Notifications
You must be signed in to change notification settings - Fork 240
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
Close opened resource. #235
Close opened resource. #235
Conversation
It is possible to add a test for this? Essentially checking that we get the warning prior to the fix, and don't get it after the fix? @krzysztof-pawlik-gat |
Co-Authored-By: Bruno Rocha <[email protected]>
Sorry for the late response, but yes and it's actually quite easy - added modifications to tests in 05ac9a8 (checked with the fix reverted and tests fail due to warnings, with the fix tests pass as expected). |
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.
LGTM!
Close opened resource. (pytest-dev#235)
When using custom CSS file I'm getting following warning:
This fixes it by closing the opened file. If I'm understanding it correctly, the file is opened just to make sure it exists here, so it could be potentially replaced with
os.access
call, but it's entirely optional.