Skip to content
Permalink
Browse files

Update legend test masks, fix for PyQt5

(cherry-picked from 7f2bdcf)
  • Loading branch information
nyalldawson committed Jul 19, 2016
1 parent 96578d4 commit 474a999cb3136979c84378125a543395ec9b6074
@@ -75,7 +75,7 @@ def testInitialSizeSymbolMapUnits(self):
result, message = checker.testComposition()
self.assertTrue(result, message)

QgsMapLayerRegistry.instance().removeMapLayers([point_layer])
QgsMapLayerRegistry.instance().removeMapLayers([point_layer.id()])

def testResizeWithMapContent(self):
"""Test test legend resizes to match map content"""
@@ -113,7 +113,7 @@ def testResizeWithMapContent(self):
result, message = checker.testComposition()
self.assertTrue(result, message)

QgsMapLayerRegistry.instance().removeMapLayers([point_layer])
QgsMapLayerRegistry.instance().removeMapLayers([point_layer.id()])

def testResizeDisabled(self):
"""Test that test legend does not resize if auto size is disabled"""
@@ -155,7 +155,7 @@ def testResizeDisabled(self):
result, message = checker.testComposition()
self.assertTrue(result, message)

QgsMapLayerRegistry.instance().removeMapLayers([point_layer])
QgsMapLayerRegistry.instance().removeMapLayers([point_layer.id()])

def testResizeDisabledCrop(self):
"""Test that if legend resizing is disabled, and legend is too small, then content is cropped"""
@@ -197,7 +197,7 @@ def testResizeDisabledCrop(self):
result, message = checker.testComposition()
self.assertTrue(result, message)

QgsMapLayerRegistry.instance().removeMapLayers([point_layer])
QgsMapLayerRegistry.instance().removeMapLayers([point_layer.id()])

if __name__ == '__main__':
unittest.main()
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 474a999

Please sign in to comment.
You can’t perform that action at this time.