pytest-dev / pytest-dev/pytest-qt
Can we print fatal Qt messages despite `abort()`?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 455
- Forks
- 72
- Avg merge
- 12h 26m
- Merged PRs (30d)
- 1
Description
As outlined in Troubleshooting — pytest-qt documentation, when Qt calls abort, often the user doesn't have any useful information due to pytest's output capturing.
I can see two ways around this, which might be worth exploring:
- Disable pytest output capturing while creating a QApplication
- Use
qInstallMessageHandlerto set up a custom message handler which prints some messages (fatal ones, at least) to a separate non-captured output stream (like faulthandler support in pytest)
Not sure if (especially the first one) could get too noisy though, Qt might print some unrelated stuff at startup maybe...
Contributor guide
No contributing guide indexed for this repository
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
Start with the Troubleshooting — pytest-qt documentation section and the code path that creates a QApplication. Compare disabling pytest output capturing with using qInstallMessageHandler to send fatal Qt messages to a separate non-captured stream, then verify fatal messages remain visible without excessive unrelated startup output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100