[pypy-svn] pypy default: "Fix" the tests on OSX -- actually skip some that give nonsensical

arigo commits-noreply at bitbucket.org
Thu Apr 28 19:59:37 CEST 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r43741:8972cfbb1712
Date: 2011-04-28 19:59 +0200
http://bitbucket.org/pypy/pypy/changeset/8972cfbb1712/

Log:	"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.

diff --git a/pypy/module/_ssl/test/test_ssl.py b/pypy/module/_ssl/test/test_ssl.py
--- a/pypy/module/_ssl/test/test_ssl.py
+++ b/pypy/module/_ssl/test/test_ssl.py
@@ -29,7 +29,7 @@
         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)
@@ -64,6 +64,8 @@
 
     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)
@@ -147,7 +149,9 @@
         self.s.close()
 
     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)
         ss.write("hello\n")
         assert ss.shutdown() is self.s._sock


More information about the Pypy-commit mailing list