8000 bpo-37322: Fix test_ssl.test_pha_required_nocert() ResourceWarning by vstinner · Pull Request #14662 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-37322: Fix test_ssl.test_pha_required_nocert() ResourceWarning #14662

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 1 commit into from
Jul 9, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
bpo-37322: Fix test_ssl.test_pha_required_nocert() ResourceWarning
Close the TLS connection in test_pha_required_nocert() of test_ssl to
fix a ResourceWarning.
  • Loading branch information
vstinner committed Jul 9, 2019
commit 5c69a694aa2bcc1d6046a865aad9b25850da98a0
1 change: 1 addition & 0 deletions Lib/test/test_ssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -2382,6 +2382,7 @@ def run(self):
if self.server.chatty and support.verbose:
sys.stdout.write(err.args[1])
# test_pha_required_nocert is expecting this exception
self.close()
raise ssl.SSLError('tlsv13 alert certificate required')
except OSError:
if self.server.chatty:
Expand Down
0