[pypy-svn] r75428 - pypy/trunk/pypy/rlib/test

arigo at codespeak.net arigo at codespeak.net
Wed Jun 16 17:13:50 CEST 2010


Author: arigo
Date: Wed Jun 16 17:13:49 2010
New Revision: 75428

Modified:
   pypy/trunk/pypy/rlib/test/test_rpoll.py
Log:
Fix test.


Modified: pypy/trunk/pypy/rlib/test/test_rpoll.py
==============================================================================
--- pypy/trunk/pypy/rlib/test/test_rpoll.py	(original)
+++ pypy/trunk/pypy/rlib/test/test_rpoll.py	Wed Jun 16 17:13:49 2010
@@ -1,4 +1,4 @@
-import thread
+import thread, errno
 from pypy.rlib.rsocket import *
 from pypy.rlib.rpoll import *
 from pypy.rpython.test.test_llinterp import interpret
@@ -34,8 +34,10 @@
     assert events[0][1] & POLLOUT
 
     err = cli.connect_ex(servaddr)
-    # win32 oddity: returns WSAEISCONN when the connection finally succeed.
-    assert err == 0 or err == 10056
+    # win32: returns WSAEISCONN when the connection finally succeed.
+    # Mac OS/X: returns EISCONN.
+    assert (err == 0 or err == 10056 or
+            err == getattr(errno, 'EISCONN', '???'))
 
     events = poll({servconn.fileno(): POLLIN,
                    cli.fileno(): POLLIN}, timeout=100)



More information about the Pypy-commit mailing list