Kaydet (Commit) 1bbb68d3 authored tarafından Antoine Pitrou's avatar Antoine Pitrou

`self` doesn't exist here

üst a14f2d11
...@@ -665,7 +665,7 @@ else: ...@@ -665,7 +665,7 @@ else:
if test_support.verbose: if test_support.verbose:
sys.stdout.write("\nsocket.error is %s\n" % x[1]) sys.stdout.write("\nsocket.error is %s\n" % x[1])
else: else:
self.fail("Use of invalid cert should have failed!") raise AssertionError("Use of invalid cert should have failed!")
finally: finally:
server.stop() server.stop()
server.join() server.join()
...@@ -712,7 +712,7 @@ else: ...@@ -712,7 +712,7 @@ else:
if test_support.verbose: if test_support.verbose:
sys.stdout.write(" client: read %s\n" % repr(outdata)) sys.stdout.write(" client: read %s\n" % repr(outdata))
if outdata != indata.lower(): if outdata != indata.lower():
self.fail( raise AssertionError(
"bad data <<%s>> (%d) received; expected <<%s>> (%d)\n" "bad data <<%s>> (%d) received; expected <<%s>> (%d)\n"
% (outdata[:min(len(outdata),20)], len(outdata), % (outdata[:min(len(outdata),20)], len(outdata),
indata[:min(len(indata),20)].lower(), len(indata))) indata[:min(len(indata),20)].lower(), len(indata)))
...@@ -759,7 +759,7 @@ else: ...@@ -759,7 +759,7 @@ else:
raise raise
else: else:
if not expect_success: if not expect_success:
self.fail( raise AssertionError(
"Client protocol %s succeeded with server protocol %s!" "Client protocol %s succeeded with server protocol %s!"
% (ssl.get_protocol_name(client_protocol), % (ssl.get_protocol_name(client_protocol),
ssl.get_protocol_name(server_protocol))) ssl.get_protocol_name(server_protocol)))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment