Skip to content

Commit ee1bcbc

Browse files
committed
add pytest fixture to quit Qt after suite has run
1 parent f4303f3 commit ee1bcbc

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

datalad_gooey/tests/test_utils.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import pytest
2+
3+
@pytest.fixture(autouse=True, scope="session")
4+
def quitQt():
5+
"""Ensure that Qt quits properly at the end of the test suite.
6+
See: https://github.com/The-Compiler/pytest-xvfb/issues/11
7+
"""
8+
from PySide6.QtWidgets import QApplication
9+
QApplication.quit()

0 commit comments

Comments
 (0)