Use qapp fixture in enable_caret_browsing.

This fixes a segfault when only running test_position_caret.
This commit is contained in:
Florian Bruhin 2015-08-19 21:40:13 +02:00
parent 92facb6f50
commit 774ef58432

View File

@ -27,7 +27,7 @@ from PyQt5.QtWebKitWidgets import QWebPage
@pytest.yield_fixture(autouse=True)
def enable_caret_browsing():
def enable_caret_browsing(qapp):
"""Fixture to enable caret browsing globally."""
settings = QWebSettings.globalSettings()
old_value = settings.testAttribute(QWebSettings.CaretBrowsingEnabled)