]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Get tests passing on latest version of pypy3
authorBen Darnell <ben@bendarnell.com>
Mon, 28 Aug 2017 02:38:14 +0000 (22:38 -0400)
committerBen Darnell <ben@bendarnell.com>
Sat, 6 Jan 2018 17:10:34 +0000 (12:10 -0500)
tornado/test/iostream_test.py
tornado/test/util.py

index 91bc7bf6add6bcd948834a86053ca225ed918e97..56fffe60395c7fb6fa6d4ecf916b6725cf063396 100644 (file)
@@ -9,7 +9,7 @@ from tornado.netutil import ssl_wrap_socket
 from tornado.stack_context import NullContext
 from tornado.tcpserver import TCPServer
 from tornado.testing import AsyncHTTPTestCase, AsyncHTTPSTestCase, AsyncTestCase, bind_unused_port, ExpectLog, gen_test
-from tornado.test.util import unittest, skipIfNonUnix, refusing_port
+from tornado.test.util import unittest, skipIfNonUnix, refusing_port, skipPypy3V58
 from tornado.web import RequestHandler, Application
 import errno
 import logging
@@ -539,6 +539,7 @@ class TestIOStreamMixin(object):
             client.close()
 
     @skipIfNonUnix
+    @skipPypy3V58
     def test_inline_read_error(self):
         # An error on an inline read is raised without logging (on the
         # assumption that it will eventually be noticed or logged further
@@ -557,6 +558,7 @@ class TestIOStreamMixin(object):
             server.close()
             client.close()
 
+    @skipPypy3V58
     def test_async_read_error_logging(self):
         # Socket errors on asynchronous reads should be logged (but only
         # once).
@@ -993,7 +995,7 @@ class TestIOStreamStartTLS(AsyncTestCase):
         server_future = self.server_start_tls(_server_ssl_options())
         client_future = self.client_start_tls(
             ssl.create_default_context(),
-            server_hostname=b'127.0.0.1')
+            server_hostname='127.0.0.1')
         with ExpectLog(gen_log, "SSL Error"):
             with self.assertRaises(ssl.SSLError):
                 # The client fails to connect with an SSL error.
index 7958d92b26a8b35d06ebc312ac8740890830375e..90a9c7b8935c6dc28a7ae5e0ae06664d98b0e2a5 100644 (file)
@@ -40,6 +40,14 @@ skipBefore35 = unittest.skipIf(sys.version_info < (3, 5), 'PEP 492 (async/await)
 skipNotCPython = unittest.skipIf(platform.python_implementation() != 'CPython',
                                  'Not CPython implementation')
 
+# Used for tests affected by
+# https://bitbucket.org/pypy/pypy/issues/2616/incomplete-error-handling-in
+# TODO: remove this after pypy3 5.8 is obsolete.
+skipPypy3V58 = unittest.skipIf(platform.python_implementation() == 'PyPy' and
+                               sys.version_info > (3,) and
+                               sys.pypy_version_info < (5, 9),
+                               'pypy3 5.8 has buggy ssl module')
+
 
 def _detect_ipv6():
     if not socket.has_ipv6: