pytest-dev / pytest-dev/pytest-asyncio

Cannot handle event loop set up and tear down in 1.0

Open
#1,133 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.7k
Forks
207
Avg merge
5h 35m
Merged PRs (30d)
9

Description

Before 1.0 you could use the "event_loop" fixture for custom set up and tear down instructions on the event loop.

With removal of the fixture in 1.0.0 there seems to be no way to access the event_loop before it is running and after it has stopped.

Example use cases:

  • define exception handler to fail test if exception occurs
  • clean up pending tasks after test has run

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the removal of the event_loop fixture and the available event-loop lifecycle entry points. Done means users can perform custom setup before the event loop runs and cleanup after it stops, including exception-handler setup and pending-task cleanup.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.