Nicer error messages when import Qt modules fail in the build tests

This commit is contained in:
Kovid Goyal 2019-05-05 14:09:19 +05:30
parent 82e6a3937a
commit 6aad4c495e
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -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