Skip to content

Commit

Permalink
Update legend test masks, fix for PyQt5
Browse files Browse the repository at this point in the history
(cherry-picked from 7f2bdcf)
  • Loading branch information
nyalldawson committed Jul 19, 2016
1 parent be0d0c0 commit c105567
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
Expand Up @@ -75,7 +75,7 @@ def testInitialSizeSymbolMapUnits(self):
result, message = checker.testComposition() result, message = checker.testComposition()
self.assertTrue(result, message) self.assertTrue(result, message)


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


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


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


def testResizeDisabled(self): def testResizeDisabled(self):
"""Test that test legend does not resize if auto size is disabled""" """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() result, message = checker.testComposition()
self.assertTrue(result, message) self.assertTrue(result, message)


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


def testResizeDisabledCrop(self): def testResizeDisabledCrop(self):
"""Test that if legend resizing is disabled, and legend is too small, then content is cropped""" """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() result, message = checker.testComposition()
self.assertTrue(result, message) self.assertTrue(result, message)


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


if __name__ == '__main__': if __name__ == '__main__':
unittest.main() unittest.main()
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 c105567

Please sign in to comment.