Skip to content
Permalink
Browse files

fix shadowed color ramp test

  • Loading branch information
jef-n committed Mar 15, 2016
1 parent c6d9217 commit 7694b9a1e562cb4492f212a65ec28bbc70c7ded2
Showing with 7 additions and 3 deletions.
  1. +1 −0 python/pyplugin_installer/__init__.py
  2. +6 −3 tests/src/python/test_qgsvectorcolorramp.py
@@ -33,6 +33,7 @@
import installer
from installer import initPluginInstaller


def instance():
if not installer.pluginInstaller:
installer.initPluginInstaller()
@@ -70,7 +70,8 @@ def testQgsVectorRandomColorRampV2(self):
r.setStops([QgsGradientStop(0.4, QColor(100, 100, 40))])
self.assertEqual(len(r.stops()), 1)
self.assertEqual(r.stops()[0].offset, 0.4)
self.assertEqual(r.stops()[0].color, QColor(100, 100, 40))
c = QColor(r.stops()[0].color)
self.assertEqual(c, QColor(100, 100, 40))

# test info
r.setInfo({'key1': 'val1', 'key2': 'val2'})
@@ -84,7 +85,8 @@ def testQgsVectorRandomColorRampV2(self):
self.assertEqual(fromProps.color2(), QColor(0, 0, 100))
self.assertEqual(len(fromProps.stops()), 1)
self.assertEqual(fromProps.stops()[0].offset, 0.4)
self.assertEqual(fromProps.stops()[0].color, QColor(100, 100, 40))
c = QColor(fromProps.stops()[0].color)
self.assertEqual(c, QColor(100, 100, 40))
self.assertEqual(fromProps.info()['key1'], 'val1')
self.assertEqual(fromProps.info()['key2'], 'val2')
self.assertEqual(fromProps.isDiscrete(), False)
@@ -95,7 +97,8 @@ def testQgsVectorRandomColorRampV2(self):
self.assertEqual(cloned.color2(), QColor(0, 0, 100))
self.assertEqual(len(cloned.stops()), 1)
self.assertEqual(cloned.stops()[0].offset, 0.4)
self.assertEqual(cloned.stops()[0].color, QColor(100, 100, 40))
c = QColor(cloned.stops()[0].color)
self.assertEqual(c, QColor(100, 100, 40))
self.assertEqual(cloned.info()['key1'], 'val1')
self.assertEqual(cloned.info()['key2'], 'val2')
self.assertEqual(cloned.isDiscrete(), False)

0 comments on commit 7694b9a

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