Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix shadowed color ramp test
  • Loading branch information
jef-n committed Mar 15, 2016
1 parent c6d9217 commit 7694b9a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions python/pyplugin_installer/__init__.py
Expand Up @@ -33,6 +33,7 @@
import installer
from installer import initPluginInstaller


def instance():
if not installer.pluginInstaller:
installer.initPluginInstaller()
Expand Down
9 changes: 6 additions & 3 deletions tests/src/python/test_qgsvectorcolorramp.py
Expand Up @@ -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'})
Expand All @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 7694b9a

Please sign in to comment.