Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 972d5bb

Browse files
committed
Use a subtest in test_ssl.test_echo
1 parent 22e162f commit 972d5bb

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

Lib/test/test_ssl.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,10 +1385,11 @@ def test_echo(self):
13851385
if support.verbose:
13861386
sys.stdout.write("\n")
13871387
for protocol in PROTOCOLS:
1388-
context = ssl.SSLContext(protocol)
1389-
context.load_cert_chain(CERTFILE)
1390-
server_params_test(context, context,
1391-
chatty=True, connectionchatty=True)
1388+
with self.subTest(protocol=ssl._PROTOCOL_NAMES[protocol]):
1389+
context = ssl.SSLContext(protocol)
1390+
context.load_cert_chain(CERTFILE)
1391+
server_params_test(context, context,
1392+
chatty=True, connectionchatty=True)
13921393

13931394
def test_getpeercert(self):
13941395
if support.verbose:

0 commit comments

Comments
 (0)