mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-05 00:04:40 -05:00
Skip HTML annotation tests if not built with webkit
This commit is contained in:
parent
9c2c2d86a5
commit
3f48e04345
@ -239,6 +239,7 @@ class TestQgsAnnotation(QgisTestCase):
|
||||
a.setFilePath(svg)
|
||||
self.assertTrue(self.renderAnnotationInLayout("svg_annotation_in_layout", a))
|
||||
|
||||
@unittest.skipIf(not Qgis.hasQtWebkit(), "QtWebkit not available")
|
||||
def testHtmlAnnotation(self):
|
||||
"""test rendering a html annotation"""
|
||||
a = QgsHtmlAnnotation()
|
||||
@ -256,6 +257,7 @@ class TestQgsAnnotation(QgisTestCase):
|
||||
im = self.renderAnnotation(clone, QPointF(20, 30))
|
||||
self.assertTrue(self.image_check("html_annotation", "html_annotation", im))
|
||||
|
||||
@unittest.skipIf(not Qgis.hasQtWebkit(), "QtWebkit not available")
|
||||
def testHtmlAnnotationSetHtmlSource(self):
|
||||
"""test rendering html annotation where the html is set directly (not from file)"""
|
||||
a = QgsHtmlAnnotation()
|
||||
@ -271,6 +273,7 @@ class TestQgsAnnotation(QgisTestCase):
|
||||
self.image_check("html_annotation_html_source", "html_annotation", im)
|
||||
)
|
||||
|
||||
@unittest.skipIf(not Qgis.hasQtWebkit(), "QtWebkit not available")
|
||||
def testHtmlAnnotationInLayout(self):
|
||||
"""test rendering a svg annotation"""
|
||||
a = QgsHtmlAnnotation()
|
||||
@ -282,6 +285,7 @@ class TestQgsAnnotation(QgisTestCase):
|
||||
a.setSourceFile(html)
|
||||
self.assertTrue(self.renderAnnotationInLayout("html_annotation_in_layout", a))
|
||||
|
||||
@unittest.skipIf(not Qgis.hasQtWebkit(), "QtWebkit not available")
|
||||
def testHtmlAnnotationWithFeature(self):
|
||||
"""test rendering a html annotation with a feature"""
|
||||
layer = QgsVectorLayer(
|
||||
@ -346,6 +350,7 @@ class TestQgsAnnotation(QgisTestCase):
|
||||
im = self.renderAnnotation(a, QPointF(20, 30))
|
||||
self.assertTrue(self.image_check("relative_style", "relative_style", im))
|
||||
|
||||
@unittest.skipIf(not Qgis.hasQtWebkit(), "QtWebkit not available")
|
||||
def testMargins(self):
|
||||
"""test rendering an annotation with margins"""
|
||||
a = QgsHtmlAnnotation()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user