[pypy-commit] pypy win32-cleanup2: skip test if unable to run

mattip noreply at buildbot.pypy.org
Sun Apr 8 13:08:57 CEST 2012


Author: Matti Picus <matti.picus at gmail.com>
Branch: win32-cleanup2
Changeset: r54245:49cc32603e11
Date: 2012-04-08 13:21 +0300
http://bitbucket.org/pypy/pypy/changeset/49cc32603e11/

Log:	skip test if unable to run

diff --git a/pypy/module/_multiprocessing/test/test_connection.py b/pypy/module/_multiprocessing/test/test_connection.py
--- a/pypy/module/_multiprocessing/test/test_connection.py
+++ b/pypy/module/_multiprocessing/test/test_connection.py
@@ -157,13 +157,15 @@
         raises(IOError, _multiprocessing.Connection, -15)
 
     def test_byte_order(self):
+        import socket
+        if not 'fromfd' in dir(socket):
+            skip('No fromfd in socket')
         # The exact format of net strings (length in network byte
         # order) is important for interoperation with others
         # implementations.
         rhandle, whandle = self.make_pair()
         whandle.send_bytes("abc")
         whandle.send_bytes("defg")
-        import socket
         sock = socket.fromfd(rhandle.fileno(),
                              socket.AF_INET, socket.SOCK_STREAM)
         data1 = sock.recv(7)


More information about the pypy-commit mailing list