Skip to content

Commit

Permalink
add test for QgsSettings.setEnumValue
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Jun 21, 2018
1 parent 7dfec1f commit 3c74991
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/src/python/test_qgssettings.py
Expand Up @@ -398,6 +398,12 @@ def test_enumValue(self):
self.assertEqual(self.settings.enumValue('enum', QgsTolerance.Pixels), QgsTolerance.Pixels)
self.assertEqual(type(self.settings.enumValue('enum', QgsTolerance.Pixels)), QgsTolerance.UnitType)

def test_setEnumValue(self):
self.settings.setValue('enum', 'LayerUnits')
self.assertEqual(self.settings.enumValue('enum', QgsTolerance.Pixels), QgsTolerance.LayerUnits)
self.settings.setEnumValue('enum', QgsTolerance.Pixels)
self.assertEqual(self.settings.enumValue('enum', QgsTolerance.Pixels), QgsTolerance.Pixels)

def test_flagValue(self):
pointAndLine = QgsMapLayerProxyModel.Filters(QgsMapLayerProxyModel.PointLayer | QgsMapLayerProxyModel.LineLayer)
pointAndPolygon = QgsMapLayerProxyModel.Filters(QgsMapLayerProxyModel.PointLayer | QgsMapLayerProxyModel.PolygonLayer)
Expand Down

0 comments on commit 3c74991

Please sign in to comment.