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: ...@@ -90,9 +90,9 @@ environment:
# PYTHON_ARCH: "32" # PYTHON_ARCH: "32"
# PYTHON_EXE: python # PYTHON_EXE: python
matrix: # matrix:
allow_failures: # allow_failures:
- PYTHON_ID: "pypy" # - PYTHON_ID: "pypy"
install: install:
# If there is a newer build queued for the same PR, cancel this one. # If there is a newer build queued for the same PR, cancel this one.
...@@ -162,6 +162,7 @@ test_script: ...@@ -162,6 +162,7 @@ test_script:
# Run the project tests # 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.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 "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 - if not "%GWHEEL_ONLY%"=="true" %PYEXE% -mgevent.tests --config known_failures.py --quiet
after_test: after_test:
......
...@@ -5,6 +5,7 @@ Waiting for I/O completion. ...@@ -5,6 +5,7 @@ Waiting for I/O completion.
from __future__ import absolute_import, division, print_function from __future__ import absolute_import, division, print_function
import sys import sys
import select as __select__
from gevent.event import Event from gevent.event import Event
from gevent.hub import _get_hub_noargs as get_hub from gevent.hub import _get_hub_noargs as get_hub
...@@ -15,7 +16,7 @@ from gevent._util import copy_globals ...@@ -15,7 +16,7 @@ from gevent._util import copy_globals
from gevent._util import _NONE from gevent._util import _NONE
from errno import EINTR from errno import EINTR
from select import select as _real_original_select _real_original_select = __select__.select
if sys.platform.startswith('win32'): if sys.platform.startswith('win32'):
def _original_select(r, w, x, t): def _original_select(r, w, x, t):
# windows can't handle three empty lists, but we've always # windows can't handle three empty lists, but we've always
...@@ -26,21 +27,21 @@ if sys.platform.startswith('win32'): ...@@ -26,21 +27,21 @@ if sys.platform.startswith('win32'):
else: else:
_original_select = _real_original_select _original_select = _real_original_select
# These will be replaced by copy_globals
try: POLLIN = 1
from select import POLLIN, POLLOUT, POLLNVAL POLLOUT = 4
__implements__ = ['select', 'poll'] POLLNVAL = 32
except ImportError: __implements__ = [
POLLIN = 1 'select',
POLLOUT = 4 ]
POLLNVAL = 32 if hasattr(__select__, 'poll'):
__implements__ = ['select'] __implements__.append('poll')
else:
__extra__ = [
'poll',
]
__all__ = ['error'] + __implements__ __all__ = ['error'] + __implements__
if 'poll' not in __all__:
__all__.append('poll')
import select as __select__
error = __select__.error 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