[Python-checkins] r80871 - in python/branches/py3k: Lib/test/test_ssl.py

antoine.pitrou python-checkins at python.org
Thu May 6 16:15:10 CEST 2010


Author: antoine.pitrou
Date: Thu May  6 16:15:10 2010
New Revision: 80871

Log:
Merged revisions 80869 via svnmerge from 
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
........


Modified:
   python/branches/py3k/   (props changed)
   python/branches/py3k/Lib/test/test_ssl.py

Modified: python/branches/py3k/Lib/test/test_ssl.py
==============================================================================
--- python/branches/py3k/Lib/test/test_ssl.py	(original)
+++ python/branches/py3k/Lib/test/test_ssl.py	Thu May  6 16:15:10 2010
@@ -659,7 +659,7 @@
                 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 @@
                     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 @@
                 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)))


More information about the Python-checkins mailing list