Skip to content

Commit eeee549

Browse files
committed
conftest: io_loop fixture is async
1 parent 8b0dafa commit eeee549

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

binderhub/tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def mock_asynchttpclient(request):
128128

129129

130130
@pytest.fixture
131-
def io_loop(event_loop, request):
131+
async def io_loop(event_loop, request):
132132
"""Same as pytest-tornado.io_loop, but runs with pytest-asyncio"""
133133
io_loop = AsyncIOMainLoop()
134134
assert io_loop.asyncio_loop is event_loop

binderhub/tests/test_build.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ def test_git_credentials_passed_to_podspec_upon_submit():
216216

217217

218218
async def test_local_repo2docker_build(io_loop):
219+
io_loop = await io_loop
219220
q = Queue()
220221
repo_url = "https://github.com/binderhub-ci-repos/cached-minimal-dockerfile"
221222
ref = "HEAD"
@@ -248,6 +249,7 @@ async def test_local_repo2docker_build(io_loop):
248249

249250
@pytest.mark.asyncio(timeout=20)
250251
async def test_local_repo2docker_build_stop(io_loop):
252+
io_loop = await io_loop
251253
q = Queue()
252254
# We need a slow build here so that we can interrupt it, so pick a large repo that
253255
# will take several seconds to clone

0 commit comments

Comments
 (0)