Armin Rigo committed 8972cfb

"Fix" the tests on OSX -- actually skip some that give nonsensical
results, as long as they get the same nonsensical results on top
of CPython 2.7.

Comments (0)

Files changed (1)


         assert isinstance(_ssl.SSL_ERROR_EOF, int)
         assert isinstance(_ssl.SSL_ERROR_INVALID_ERROR_CODE, int)
-        assert isinstance(_ssl.OPENSSL_VERSION_NUMBER, int)
+        assert isinstance(_ssl.OPENSSL_VERSION_NUMBER, (int, long))
         assert isinstance(_ssl.OPENSSL_VERSION_INFO, tuple)
         assert len(_ssl.OPENSSL_VERSION_INFO) == 5
         assert isinstance(_ssl.OPENSSL_VERSION, str)
     def test_sslwrap(self):
         import _ssl, _socket, sys
+        if sys.platform == 'darwin':
+            skip("hangs indefinitely on OSX (also on CPython)")
         s = _socket.socket()
         ss = _ssl.sslwrap(s, 0)
         exc = raises(_socket.error, ss.do_handshake)
     def test_shutdown(self):
-        import socket, ssl
+        import socket, ssl, sys
+        if sys.platform == 'darwin':
+            skip("get also on CPython: error: [Errno 0]")
         ss = socket.ssl(self.s)
         assert ss.shutdown() is self.s._sock