pytest-dev / pytest-dev/pytest
test_exception_handling_no_traceback leaking FDs (LsofFdLeakChecker plugin)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 14.5k
- Forks
- 3.4k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 35
Description
While implementing #2292, it was discovered that LsofFdLeakChecker plugin declares a hook wrapper incorrectly as pytest_runtest_item instead of pytest_runtest_protocol.
AFAICT, the hook was introduced in db5649ec6a8fcd9ef148b9f77797a22cb9f3cda1 already using the incorrect name, so it seems it never checked for leaked file descriptors. @hpk42 could you comment here?
Fixing the hook name enabled the plugin and it is now crashing the test suite because of some leaked fds (example log).
In order to move #2292 forward, the plugin was changed to emit a warning instead of failing the suite.
We need to decide if we want to keep the plugin and fix the tests, or just remove it altogether.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect the LsofFdLeakChecker plugin and its pytest_runtest_protocol hook, then review the leaked-file-descriptor example log and the changes made for #2292. Done means deciding whether to keep and repair the plugin by fixing the affected tests, or remove it altogether.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100