forked from openlp/openlp
Merge branch 'fix_tests' into 'master'
Fix tests (broken on newer versions of pytest-qt) See merge request openlp/openlp!332
This commit is contained in:
commit
88f7a805f8
@ -43,6 +43,11 @@ from openlp.core.common.settings import Settings
|
||||
@pytest.fixture
|
||||
def qapp(qtbot):
|
||||
"""An instance of QApplication"""
|
||||
# Newer versions of pytest-qt have QApplication in the widgets module.
|
||||
# Catch attribute error if the widgets module is missing and instantiate QApplication the old way.
|
||||
try:
|
||||
qt_api.QtWidgets.QApplication.instance()
|
||||
except AttributeError:
|
||||
qt_api.QApplication.instance()
|
||||
app = OpenLP()
|
||||
yield app
|
||||
|
Loading…
Reference in New Issue
Block a user