Skip to content

Commit

Permalink
[Test] PyQgsPointDisplacementRenderer: add usedAttributes test
Browse files Browse the repository at this point in the history
  • Loading branch information
rldhont authored and nyalldawson committed Jul 28, 2019
1 parent 3955c1e commit a0f3cee
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/src/python/test_qgspointdisplacementrenderer.py
Expand Up @@ -15,6 +15,9 @@
* (at your option) any later version. *
* *
***************************************************************************
From build dir, run: ctest -R PyQgsPointDisplacementRenderer -V
"""

__author__ = 'Nyall Dawson'
Expand Down Expand Up @@ -45,7 +48,8 @@
QgsMapSettings,
QgsProperty,
QgsReadWriteContext,
QgsSymbolLayer
QgsSymbolLayer,
QgsRenderContext
)
from qgis.testing import start_app, unittest
from utilities import unitTestDataPath
Expand Down Expand Up @@ -428,6 +432,12 @@ def testClusterConcentricLabelsDifferentSizesFarther(self):
self.assertTrue(res)
self._tearDown(layer)

def testUsedAttributes(self):
layer, renderer, mapsettings = self._setUp()
ctx = QgsRenderContext.fromMapSettings(mapsettings)

self.assertCountEqual(renderer.usedAttributes(ctx), {})


if __name__ == '__main__':
unittest.main()

0 comments on commit a0f3cee

Please sign in to comment.