Skip to content
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

Fail tests if there are any widgets left open #2150

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

matrss
Copy link
Collaborator

@matrss matrss commented Jan 12, 2024

Qt widgets that are not cleaned up after a test can affect the following tests. This change makes it so that tests that do not clean up after themselves will error.

Fixes #2193.

Split off from #2100.

@matrss matrss force-pushed the cleanup-after-qt-tests branch 3 times, most recently from 3e95b6e to 5dffc9d Compare January 12, 2024 14:53
@matrss matrss force-pushed the cleanup-after-qt-tests branch 7 times, most recently from f609975 to 8520847 Compare March 21, 2024 17:11
Qt widgets that are not cleaned up after a test can affect the following
tests. This change makes it so that tests that do not clean up after
themselves will error.
By using qtbot.add_widget on the created widgets they will be
automatically closed and deleted after each test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fail tests if there are any Qt widgets left open
1 participant