mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-01 22:56:04 +01:00
Ensure webengine test does not hang
This commit is contained in:
parent
22e3558a05
commit
b5a16dc10c
1 changed files with 2 additions and 0 deletions
|
|
@ -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.QtCore import QTimer
|
||||
from PyQt5.QtWebEngineWidgets import QWebEnginePage
|
||||
from PyQt5.QtGui import QImageReader, QFontDatabase
|
||||
from PyQt5.QtNetwork import QNetworkAccessManager
|
||||
|
|
@ -232,6 +233,7 @@ def print_callback(result):
|
|||
|
||||
p.runJavaScript('1 + 1', callback)
|
||||
p.printToPdf(print_callback)
|
||||
QTimer.singleShot(5000, lambda: Application.instance().quit())
|
||||
app.exec_()
|
||||
self.assertEqual(callback.result, 2)
|
||||
self.assertIn(b'Skia/PDF', bytes(print_callback.result))
|
||||
|
|
|
|||
Loading…
Reference in a new issue