Commit c37a1a90 authored by Jason Madden's avatar Jason Madden

Refactor test__all__ to make it easier to spot errors. PyPy 7.2 on Windows has...

Refactor test__all__ to make it easier to spot errors. PyPy 7.2 on Windows has a failure with it; this won't fix it but is the first step. Make PyPy on windows non-optional so we catch such failures easier.
parent 03874007
......@@ -90,9 +90,9 @@ environment:
# PYTHON_ARCH: "32"
# PYTHON_EXE: python
matrix:
allow_failures:
- PYTHON_ID: "pypy"
# matrix:
# allow_failures:
# - PYTHON_ID: "pypy"
install:
# If there is a newer build queued for the same PR, cancel this one.
......@@ -162,6 +162,7 @@ test_script:
# Run the project tests
- if not "%GWHEEL_ONLY%"=="true" %PYEXE% -c "import gevent.core; print(gevent.core.loop)"
- if not "%GWHEEL_ONLY%"=="true" %PYEXE% -c "import gevent; print(gevent.config.settings['resolver'].get_options())"
- if not "%GWHEEL_ONLY%"=="true" %PYEXE% -c "from gevent._compat import get_clock_info; print(get_clock_info('perf_counter'))"
- if not "%GWHEEL_ONLY%"=="true" %PYEXE% -mgevent.tests --config known_failures.py --quiet
after_test:
......
......@@ -5,6 +5,7 @@ Waiting for I/O completion.
from __future__ import absolute_import, division, print_function
import sys
import select as __select__
from gevent.event import Event
from gevent.hub import _get_hub_noargs as get_hub
......@@ -15,7 +16,7 @@ from gevent._util import copy_globals
from gevent._util import _NONE
from errno import EINTR
from select import select as _real_original_select
_real_original_select = __select__.select
if sys.platform.startswith('win32'):
def _original_select(r, w, x, t):
# windows can't handle three empty lists, but we've always
......@@ -26,21 +27,21 @@ if sys.platform.startswith('win32'):
else:
_original_select = _real_original_select
try:
from select import POLLIN, POLLOUT, POLLNVAL
__implements__ = ['select', 'poll']
except ImportError:
POLLIN = 1
POLLOUT = 4
POLLNVAL = 32
__implements__ = ['select']
# These will be replaced by copy_globals
POLLIN = 1
POLLOUT = 4
POLLNVAL = 32
__implements__ = [
'select',
]
if hasattr(__select__, 'poll'):
__implements__.append('poll')
else:
__extra__ = [
'poll',
]
__all__ = ['error'] + __implements__
if 'poll' not in __all__:
__all__.append('poll')
import select as __select__
error = __select__.error
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment