Commit c4d3be2a authored by Jason Madden's avatar Jason Madden

Fixes for test__core_timer on Linux.

parent 44566460
......@@ -443,7 +443,7 @@ class loop(AbstractLoop):
mode = libuv.UV_RUN_NOWAIT
if mode == libuv.UV_RUN_DEFAULT:
while self._ptr:
while self._ptr and self._ptr.data:
self._prepare_ran_callbacks = False
ran_status = libuv.uv_run(self._ptr, libuv.UV_RUN_ONCE)
# Note that we run queued callbacks when the prepare watcher runs,
......
......@@ -343,7 +343,17 @@ def _setup_environ():
# can't resolve package from __spec__ or __package__, falling
# back on __name__ and __path__". I have no idea what that means, but it seems harmless
# and is annoying.
os.environ['PYTHONWARNINGS'] = 'default,ignore:::site:,ignore:::importlib._bootstrap:,ignore:::importlib._bootstrap_external:'
# pkgutil on Python 2 complains about missing __init__.py
# action:message:category:module:line
os.environ['PYTHONWARNINGS'] = ','.join([
'default',
'ignore:::site:',
'ignore:::pkgutil',
'ignore:::importlib._bootstrap:',
'ignore:::importlib._bootstrap_external:',
])
if 'PYTHONFAULTHANDLER' not in os.environ:
os.environ['PYTHONFAULTHANDLER'] = 'true'
......
......@@ -113,12 +113,12 @@ class TestTimerResolution(Test):
loop = self.loop
for _ in range(10):
for _ in range(15):
# in libuv, our signal timer fires every 300ms; depending on
# when this runs, we could artificially get a better
# resolution than we expect. Run it multiple times to be more sure.
io = loop.io(fd, 1)
io.start(lambda events: None)
io.start(lambda events=None: None)
now = perf_counter()
......
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