Skip to content

Commit

Permalink
Update legend test masks, fix for PyQt5
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jul 13, 2016
1 parent c226e57 commit 7f2bdcf
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/src/python/test_qgscomposerlegend.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"""
Expand Down Expand Up @@ -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"""
Expand Down Expand Up @@ -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"""
Expand Down Expand Up @@ -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()
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7f2bdcf

Please sign in to comment.