[pypy-commit] pypy default: remove poll from windows, add skip to test

mattip noreply at buildbot.pypy.org
Mon Apr 30 18:38:02 CEST 2012


Author: Matti Picus <matti.picus at gmail.com>
Branch: 
Changeset: r54835:67d53ef201a6
Date: 2012-04-30 19:36 +0300
http://bitbucket.org/pypy/pypy/changeset/67d53ef201a6/

Log:	remove poll from windows, add skip to test

diff --git a/pypy/module/select/__init__.py b/pypy/module/select/__init__.py
--- a/pypy/module/select/__init__.py
+++ b/pypy/module/select/__init__.py
@@ -2,6 +2,7 @@
 from pypy.interpreter.mixedmodule import MixedModule
 
 import sys
+import os
 
 
 class Module(MixedModule):
@@ -9,11 +10,13 @@
     }
 
     interpleveldefs = {
-        'poll'  : 'interp_select.poll',
         'select': 'interp_select.select',
         'error' : 'space.fromcache(interp_select.Cache).w_error'
     }
 
+    if os.name =='posix':
+        interpleveldefs['poll'] = 'interp_select.poll'
+
     if sys.platform.startswith('linux'):
         interpleveldefs['epoll'] = 'interp_epoll.W_Epoll'
         from pypy.module.select.interp_epoll import cconfig, public_symbols
diff --git a/pypy/module/select/test/test_select.py b/pypy/module/select/test/test_select.py
--- a/pypy/module/select/test/test_select.py
+++ b/pypy/module/select/test/test_select.py
@@ -214,6 +214,8 @@
 
     def test_poll(self):
         import select
+        if not hasattr(select, 'poll'):
+            skip("no select.poll() on this platform")
         readend, writeend = self.getpair()
         try:
             class A(object):


More information about the pypy-commit mailing list