mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-05 21:53:43 +02:00
Get the tests to pass with webengine
This commit is contained in:
parent
a528cef0ee
commit
dfc09ede98
2 changed files with 3 additions and 0 deletions
|
|
@ -870,6 +870,7 @@ def __init__(self, args, force_calibre_style=False, override_program_name=None,
|
|||
QApplication.setApplicationName(APP_UID)
|
||||
if override_program_name and hasattr(QApplication, 'setDesktopFileName'):
|
||||
QApplication.setDesktopFileName(override_program_name)
|
||||
QApplication.setAttribute(Qt.AA_ShareOpenGLContexts, True) # needed for webengine
|
||||
QApplication.__init__(self, qargs)
|
||||
self.setAttribute(Qt.AA_UseHighDpiPixmaps)
|
||||
self.setAttribute(Qt.AA_SynthesizeTouchForUnhandledMouseEvents, False)
|
||||
|
|
|
|||
|
|
@ -182,6 +182,7 @@ def test_apsw(self):
|
|||
|
||||
@unittest.skipIf('SKIP_QT_BUILD_TEST' in os.environ, 'Skipping Qt build test as it causes crashes in the macOS VM')
|
||||
def test_qt(self):
|
||||
from PyQt5.QtWebEngineWidgets import QWebEnginePage
|
||||
from PyQt5.QtGui import QImageReader, QFontDatabase
|
||||
from PyQt5.QtNetwork import QNetworkAccessManager
|
||||
from calibre.utils.img import image_from_data, image_to_data, test
|
||||
|
|
@ -219,6 +220,7 @@ def test_qt(self):
|
|||
QtWin
|
||||
del na
|
||||
del app
|
||||
del QWebEnginePage
|
||||
|
||||
def test_imaging(self):
|
||||
from PIL import Image
|
||||
|
|
|
|||
Loading…
Reference in a new issue