Skip to content

Commit 40388f2

Browse files
committed
Fix tests on Travis (test_async_call)
1 parent 4d9947b commit 40388f2

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ env:
66
- NOSE_VERBOSE=2
77
- NOSE_WITH_COVERAGE=true
88
- NOSE_COVER_PACKAGE=neovim
9+
- PYTEST_ADDOPTS=-vv
910
matrix:
1011
- CI_TARGET=tests
1112
matrix:

test/test_client_rpc.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# -*- coding: utf-8 -*-
2+
import time
23

34

45
def test_call_and_reply(vim):
@@ -41,6 +42,11 @@ def request_cb(name, args):
4142
# this would have dead-locked if not async
4243
vim.funcs.rpcrequest(vim.channel_id, "test-event", async_=True)
4344
vim.run_loop(request_cb, None, None)
45+
46+
# TODO(blueyed): This sleep is required on Travis, where it hangs with
47+
# "Entering event loop" otherwise (asyncio's EpollSelector._epoll.poll).
48+
time.sleep(0.1)
49+
4450
assert vim.vars['result'] == 17
4551

4652

tox.ini

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ envlist =
44
py36-docs
55

66
[testenv]
7-
deps=
7+
deps =
88
pytest
99
pytest-xdist
1010
pyuv: pyuv
11-
commands=python -m pytest -s
11+
passenv = PYTEST_ADDOPTS
12+
commands = python -m pytest {posargs}
1213

1314
[testenv:checkqa]
1415
deps =

0 commit comments

Comments
 (0)