Skip to content

Commit

Permalink
bpo-37322: Fix test_ssl.test_pha_required_nocert() ResourceWarning (p…
Browse files Browse the repository at this point in the history
…ythonGH-14662)

Close the TLS connection in test_pha_required_nocert() of test_ssl to
fix a ResourceWarning.
  • Loading branch information
vstinner authored Jul 9, 2019
1 parent 110a47c commit cf9c41c
Showing 1 changed file with 1 addition and 0 deletions.
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 comments on commit cf9c41c

Please sign in to comment.