fix: align contextual CSS rendering and Word styles
This commit is contained in:
@@ -8,6 +8,7 @@ os.environ.setdefault("QTWEBENGINE_CHROMIUM_FLAGS", "--disable-gpu --no-sandbox
|
||||
import pytest
|
||||
from PySide6.QtWidgets import QApplication
|
||||
from PySide6.QtGui import QFontDatabase
|
||||
from PySide6.QtCore import QCoreApplication, QEvent
|
||||
|
||||
|
||||
@pytest.fixture(scope="session", autouse=True)
|
||||
@@ -19,3 +20,12 @@ def qt_application():
|
||||
QFontDatabase.addApplicationFont(os.path.join(os.environ.get("WINDIR", "C:/Windows"), "Fonts", "msyh.ttc"))
|
||||
yield app
|
||||
app.processEvents()
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def release_closed_widgets(qt_application):
|
||||
yield
|
||||
# processEvents alone does not flush DeferredDelete without app.exec().
|
||||
# Release closed WebEngine pages before the next rendering regression.
|
||||
QCoreApplication.sendPostedEvents(None, QEvent.Type.DeferredDelete)
|
||||
qt_application.processEvents()
|
||||
|
||||
Reference in New Issue
Block a user