diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-05-06 14:11:23 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-05-06 14:11:23 (GMT) |
commit | 1bbb68d37c7077ffe3b188b8856eacd37e1c40dc (patch) | |
tree | 15ba2e82865450e5c6f4a82d2b0b56e0360e386c /Lib/test/test_ssl.py | |
parent | a14f2d1147899b8ba46829198857030bb4910560 (diff) | |
download | cpython-1bbb68d37c7077ffe3b188b8856eacd37e1c40dc.zip cpython-1bbb68d37c7077ffe3b188b8856eacd37e1c40dc.tar.gz cpython-1bbb68d37c7077ffe3b188b8856eacd37e1c40dc.tar.bz2 |
`self` doesn't exist here
Diffstat (limited to 'Lib/test/test_ssl.py')
-rw-r--r-- | Lib/test/test_ssl.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py index 13baeae..813968e 100644 --- a/Lib/test/test_ssl.py +++ b/Lib/test/test_ssl.py @@ -665,7 +665,7 @@ else: if test_support.verbose: sys.stdout.write("\nsocket.error is %s\n" % x[1]) else: - self.fail("Use of invalid cert should have failed!") + raise AssertionError("Use of invalid cert should have failed!") finally: server.stop() server.join() @@ -712,7 +712,7 @@ else: if test_support.verbose: sys.stdout.write(" client: read %s\n" % repr(outdata)) if outdata != indata.lower(): - self.fail( + raise AssertionError( "bad data <<%s>> (%d) received; expected <<%s>> (%d)\n" % (outdata[:min(len(outdata),20)], len(outdata), indata[:min(len(indata),20)].lower(), len(indata))) @@ -759,7 +759,7 @@ else: raise else: if not expect_success: - self.fail( + raise AssertionError( "Client protocol %s succeeded with server protocol %s!" % (ssl.get_protocol_name(client_protocol), ssl.get_protocol_name(server_protocol))) |