Skip to content

Fail tests if there are any widgets left open#2150

Draft
matrss wants to merge 3 commits intoOpen-MSS:developfrom
matrss:cleanup-after-qt-tests
Draft

Fail tests if there are any widgets left open#2150
matrss wants to merge 3 commits intoOpen-MSS:developfrom
matrss:cleanup-after-qt-tests

Conversation

@matrss
Copy link
Copy Markdown
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 from 5dffc9d to b945b80 Compare February 15, 2024 16:55
@matrss matrss force-pushed the cleanup-after-qt-tests branch 7 times, most recently from f609975 to 8520847 Compare March 21, 2024 17:11
matrss added 3 commits April 29, 2024 10:00
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.
@matrss matrss force-pushed the cleanup-after-qt-tests branch from 8520847 to 5a65510 Compare April 29, 2024 08:03
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