mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Do not run the webengine build test on windows as it causes a crash on exit under cygwin+ssh
This commit is contained in:
parent
cb091ea844
commit
89f5a0b183
@ -223,26 +223,28 @@ class BuildTest(unittest.TestCase):
|
|||||||
if iswindows:
|
if iswindows:
|
||||||
from PyQt5.Qt import QtWin
|
from PyQt5.Qt import QtWin
|
||||||
QtWin
|
QtWin
|
||||||
p = QWebEnginePage()
|
if has_headless:
|
||||||
|
# Causes crash on exit under windows+cygwin+ssh
|
||||||
|
p = QWebEnginePage()
|
||||||
|
|
||||||
def callback(result):
|
def callback(result):
|
||||||
callback.result = result
|
callback.result = result
|
||||||
if hasattr(print_callback, 'result'):
|
if hasattr(print_callback, 'result'):
|
||||||
Application.instance().quit()
|
Application.instance().quit()
|
||||||
|
|
||||||
def print_callback(result):
|
def print_callback(result):
|
||||||
print_callback.result = result
|
print_callback.result = result
|
||||||
if hasattr(callback, 'result'):
|
if hasattr(callback, 'result'):
|
||||||
Application.instance().quit()
|
Application.instance().quit()
|
||||||
|
|
||||||
p.runJavaScript('1 + 1', callback)
|
p.runJavaScript('1 + 1', callback)
|
||||||
p.printToPdf(print_callback)
|
p.printToPdf(print_callback)
|
||||||
QTimer.singleShot(5000, lambda: Application.instance().quit())
|
QTimer.singleShot(5000, lambda: Application.instance().quit())
|
||||||
app.exec_()
|
app.exec_()
|
||||||
self.assertEqual(callback.result, 2)
|
self.assertEqual(callback.result, 2)
|
||||||
self.assertIn(b'Skia/PDF', bytes(print_callback.result))
|
self.assertIn(b'Skia/PDF', bytes(print_callback.result))
|
||||||
|
del p
|
||||||
del na
|
del na
|
||||||
del p
|
|
||||||
del app
|
del app
|
||||||
del QWebEnginePage
|
del QWebEnginePage
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user