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

Close subprocess STDOUT pipes in the test suite #633

Merged
merged 1 commit into from
Jun 25, 2024

Conversation

kurtmckee
Copy link
Contributor

Spotted this while attempting to run the test suite locally with warnings enabled.

tests/test_cli.py::test_cli_fails_to_start_given_an_invalid_broker_name
tests/test_cli.py::test_cli_fails_to_start_given_an_invalid_broker_instance
tests/test_cli.py::test_cli_fails_to_start_given_an_invalid_nested_broker_instance
  /home/kurt/dev/pr-dramatiq/.venv/lib/python3.12/site-packages/_pytest/runner.py:141:
ResourceWarning: unclosed file <_io.FileIO name=12 mode='rb' closefd=True>

The three tests listed are the only ones that read from STDOUT pipes; closing the pipe in the pytest fixture is the most reliable way to address this.

@Bogdanp Bogdanp merged commit be8e211 into Bogdanp:master Jun 25, 2024
10 of 11 checks passed
@kurtmckee kurtmckee deleted the close-stdout-pipes branch June 25, 2024 12:07
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