Skip to content
Permalink
Browse files

add test for QgsSettings.setEnumValue

  • Loading branch information
3nids committed Jun 21, 2018
1 parent 7dfec1f commit 3c74991286a291d5e2ad73d9880db96bae5821e4
Showing with 6 additions and 0 deletions.
  1. +6 −0 tests/src/python/test_qgssettings.py
@@ -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)

0 comments on commit 3c74991

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