Description: CPython throws errno 0 in wrapped SSL socket shutdown, so don't expect pypy to do otherwise
Author: Stefano Rivera <stefanor@debian.org>
Forwarded: https://bitbucket.org/pypy/pypy/changeset/b907a1252c68
Last-Update: 2011-12-11

--- a/pypy/module/_ssl/test/test_ssl.py
+++ b/pypy/module/_ssl/test/test_ssl.py
@@ -161,11 +161,15 @@
 
     def test_shutdown(self):
         import socket, ssl, sys, gc
-        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
+        try:
+            result = ss.shutdown()
+        except socket.error, e:
+            if e.errno == 0:
+                skip("Shutdown raised errno 0. CPython does this too")
+            raise
+        assert result is self.s._sock
         raises(ssl.SSLError, ss.write, "hello\n")
         del ss; gc.collect()
 
