]> granicus.if.org Git - python/commitdiff
Merged revisions 80869 via svnmerge from
authorAntoine Pitrou <solipsis@pitrou.net>
Thu, 6 May 2010 14:15:10 +0000 (14:15 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Thu, 6 May 2010 14:15:10 +0000 (14:15 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r80869 | antoine.pitrou | 2010-05-06 16:11:23 +0200 (jeu., 06 mai 2010) | 3 lines

  `self` doesn't exist here
........

Lib/test/test_ssl.py

index a82a7842fc863bf157088eacce79d99a6f211462..7895b4afcc2a4b3f07f377c39f41dbd8b650d4b8 100644 (file)
@@ -659,7 +659,7 @@ else:
                 if 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()
@@ -704,7 +704,7 @@ else:
                     if support.verbose:
                         sys.stdout.write(" client:  read %r\n" % outdata)
                 if outdata != indata.lower():
-                    self.fail(
+                    raise AssertionError(
                         "bad data <<%r>> (%d) received; expected <<%r>> (%d)\n"
                         % (outdata[:20], len(outdata),
                            indata[:20].lower(), len(indata)))
@@ -752,7 +752,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)))