-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run unit tests of Qt GUI and have CI gate on them #2252
Conversation
This is probably not the correct long term solution, but lets all the tests in this set pass which is a reasonable step forward
@krzywon, thanks for the review. All the items other than the windows-specific failure dealt with. Dealing with that one in a separate PR (that could then enable GUI testing on windows too!) would probably be reasonable. I'm a little nervous about having this unmerged while codecamp is happening. Lack of tests is unhelpful for the codecampers, but we'll also end up tripping over each other with merge conflicts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The latest changes look great and should probably be merged sooner rather than later.
The unittests of the Qt GUI have been running (and failing) on CI for a long time. The failures have been suppressed because the size of the job to get these tests running cleanly was too big.
In this PR, we finally get something that looks like running unit tests. In getting the tests to work, we see that there are a few bugs from the recent config class work and we can fix them.
Following up on the discussion in #1732, the approach here has been to:
assertFoo
functions to normalassert
calls to match pytest styleqapp
fixture from pytest-qt. Using qapp gets away from lots of segmentation faults caused by incorrectly handling QApplication across tests and race conditions with garbage collection.The final result of this is not perfect, but I think it's now objectively better than the current situation. This branch is also now unmaintainably large, touching so many files that conflicts are becoming costly to resolve.
After merging the following tasks remain outstanding:
conftest.py
that usesimportlib.resources
to locate the test input files. Consolidation of the multiple copies of some of the files should happen first. This would fix 29 tests that are currently xfailed.The first three of these are more bite-sized pieces of work and would be compatible with code-camp for instance, while this 158 commit behemoth would not be.
The last two items around segfaults are harder problems. It's hard to spot if these are bugs in the UI or bugs in the testing code at this stage.
(The commits from #2214 are included here as without them, the tests can't succeed)
Closes: #1732