Skip to content

Commit

Permalink
Make two test_testing tests async
Browse files Browse the repository at this point in the history
Make test_listen_for_jobs_run and test_wait_for_jobs async
and get rid of the "coroutine 'xxxx' was never awaited"
warnings in the test output.
  • Loading branch information
Éric Lemoine committed Jan 26, 2020
1 parent 3d677a6 commit 57a3b39
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/unit/test_testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,14 +254,16 @@ def test_finish_job_run_retry_no_schedule(job_store):
assert len(job_store.events[id]) == 3


def test_listen_for_jobs_run(job_store):
@pytest.mark.asyncio
async def test_listen_for_jobs_run(job_store):
# If we don't crash, it's enough
job_store.listen_for_jobs(queues=["a", "b"])
await job_store.listen_for_jobs(queues=["a", "b"])


def test_wait_for_jobs(job_store):
@pytest.mark.asyncio
async def test_wait_for_jobs(job_store):
# If we don't crash, it's enough
job_store.wait_for_jobs()
await job_store.wait_for_jobs()


def test_migrate_run(job_store):
Expand Down

0 comments on commit 57a3b39

Please sign in to comment.