Skip to content

Commit

Permalink
create a new event_loop fixture
Browse files Browse the repository at this point in the history
pytest-dev/pytest-asyncio#278 allows for a parametrized event_loop fixture; let's try using this to see if we can avoid a closed event loop error.
  • Loading branch information
escapewindow authored and jcristau committed Nov 14, 2023
1 parent 249038f commit 41589d8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/conftest.py
Expand Up @@ -59,6 +59,14 @@ async def reportFailed(self, *args, **kwargs):
raise taskcluster.exceptions.TaskclusterRestFailure("foo", None, status_code=self.status)


@pytest.fixture(scope="function")
def event_loop(request):
request.param
loop = asyncio.new_event_loop()
yield loop
loop.close()


@pytest.fixture(scope="function")
def successful_queue():
return SuccessfulQueue()
Expand Down

0 comments on commit 41589d8

Please sign in to comment.