pytest-dev / pytest-dev/pytest-qt
Missing organization name on qapp breaks tests with QSettings
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 455
- Forks
- 72
- Avg merge
- 12h 26m
- Merged PRs (30d)
- 1
Description
I've stumbled across an issue this morning with running tests that use QSettings.
The qapp fixture does have a default value and a config setting for the application name. Nevertheless, it has none for the organization name. Both of them are required for QSettings to work (see https://doc.qt.io/qt-5/qsettings.html#basic-usage).
I'm still not sure, what went wrong since the qapp fixture is requested in my tests AFTER I wrote values to QSettings in earlier fixtures, but when I add the organization name in the qapp fixture, my tests work. I need to figure this out. Anyway: Is there are reason, that a name is set for the application, but none for the organization?
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 by examining the qapp fixture and the QSettings basic-usage documentation linked in the issue. Reproduce the fixture-order scenario described in the report, then verify that the affected tests work with the required organization name configured.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100