From 6aad4c495e7aa4eafe890f6abc62ddf9152a7f47 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sun, 5 May 2019 14:09:19 +0530 Subject: [PATCH] Nicer error messages when import Qt modules fail in the build tests --- src/calibre/test_build.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/calibre/test_build.py b/src/calibre/test_build.py index f5e5208708..509c6e2bd0 100644 --- a/src/calibre/test_build.py +++ b/src/calibre/test_build.py @@ -179,7 +179,8 @@ class BuildTest(unittest.TestCase): @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.Qt import QImageReader, QNetworkAccessManager, QFontDatabase + from PyQt5.QtGui import QImageReader, QFontDatabase + from PyQt5.QtNetwork import QNetworkAccessManager from calibre.utils.img import image_from_data, image_to_data, test # Ensure that images can be read before QApplication is constructed. # Note that this requires QCoreApplication.libraryPaths() to return the