Skip to content

bpo-41919: Avoid resource leak in test_io module #22973

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

Merged
merged 2 commits into from
Oct 25, 2020

Conversation

shihai1991
Copy link
Member

@shihai1991 shihai1991 commented Oct 25, 2020

lookupTestDecoder function Split from StatefulIncrementalDecoder to avoid resource leak in test_io module.

https://bugs.python.org/issue41919

@shihai1991
Copy link
Member Author

Pls take a look if you have free time, Thanks. @pablogsal @vstinner
./python -m test test_io -R 3:3 -vv have passed in my local.

@pablogsal
Copy link
Member

Thanks for the investigation and for the quick fix, @shihai1991!

I can confirm that this PR indeed fixes the problem:

❯ ./python -m test test_io -R 3:3
0:00:00 load avg: 4.13 Run tests sequentially
0:00:00 load avg: 4.13 [1/1] test_io
beginning 6 repetitions
123456
......
test_io passed in 3 min 36 sec

== Tests result: SUCCESS ==

1 test OK.

Total duration: 3 min 36 sec
Tests result: SUCCESS

@pablogsal pablogsal merged commit 14cdc21 into python:master Oct 25, 2020
@shihai1991
Copy link
Member Author

Thanks palbo for review & merge.

adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants