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

Enable all Python warnings in the test suite #638

Merged
merged 1 commit into from
Jun 27, 2024

Conversation

kurtmckee
Copy link
Contributor

This PR enables all warnings in the test suite when run in tox.

With this change, additional ResourceWarning warnings display. For example:

sys:1: ResourceWarning: unclosed file <_io.BufferedRandom name='/tmp/dramatiq-prometheus/gauge_all_2653069.db'>
sys:1: ResourceWarning: unclosed file <_io.BufferedRandom name='/tmp/dramatiq-prometheus/gauge_livesum_2653069.db'>
sys:1: ResourceWarning: unclosed file <_io.BufferedRandom name='/tmp/dramatiq-prometheus/histogram_2653069.db'>
sys:1: ResourceWarning: unclosed file <_io.BufferedRandom name='/tmp/dramatiq-prometheus/counter_2653069.db'>

Through trial and error I was able to isolate these four open files to the following test (other tests in that file only trigger warnings about three or fewer unclosed files):

tox -e py38 -- tests/test_actors.py::test_actors_can_delay_messages_independent_of_each_other

I've not yet identified how these files are getting opened, but with the changes in this PR, it'll be obvious when this issue is resolved.

@Bogdanp Bogdanp merged commit 4b6ad18 into Bogdanp:master Jun 27, 2024
11 checks passed
@kurtmckee kurtmckee deleted the enable-all-python-warnings branch June 27, 2024 11:04
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.

2 participants