Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Jul 20, 2024
1 parent 26fd985 commit da1271e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/src/python/test_qgsmapboxglconverter.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def testParseMatchList(self):
"rgb(248,249,250)",
"rgb(252, 252, 252)"
], QgsMapBoxGlStyleConverter.PropertyType.Numeric, conversion_context, 2.5, 200)
self.assertEqual(res.asExpression(), 'CASE WHEN "luminosity" IN (-15) THEN \'#c8d2d5\' WHEN "luminosity" IN (-14) THEN \'#cbd5d8\' WHEN "luminosity" IN (-13) THEN \'#cfd7da\' WHEN "luminosity" IN (-12) THEN \'#d2dadd\' WHEN "luminosity" IN (-11) THEN \'#d5dde0\' WHEN "luminosity" IN (-10) THEN \'#d9e0e2\' WHEN "luminosity" IN (-9) THEN \'#dce3e5\' WHEN "luminosity" IN (-8) THEN \'#e0e6e7\' WHEN "luminosity" IN (-7) THEN \'#e3e8ea\' WHEN "luminosity" IN (-6) THEN \'#e7ebed\' WHEN "luminosity" IN (-5) THEN \'#eaeeef\' WHEN "luminosity" IN (-4) THEN \'#eef1f2\' WHEN "luminosity" IN (-3) THEN \'#f1f4f5\' WHEN "luminosity" IN (-2) THEN \'#f5f7f7\' WHEN "luminosity" IN (-1) THEN \'#f8f9fa\' ELSE \'#fcfcfc\' END')
self.assertEqual(res.asExpression(), 'CASE WHEN "luminosity" IN (-15) THEN 0 WHEN "luminosity" IN (-14) THEN 0 WHEN "luminosity" IN (-13) THEN 0 WHEN "luminosity" IN (-12) THEN 0 WHEN "luminosity" IN (-11) THEN 0 WHEN "luminosity" IN (-10) THEN 0 WHEN "luminosity" IN (-9) THEN 0 WHEN "luminosity" IN (-8) THEN 0 WHEN "luminosity" IN (-7) THEN 0 WHEN "luminosity" IN (-6) THEN 0 WHEN "luminosity" IN (-5) THEN 0 WHEN "luminosity" IN (-4) THEN 0 WHEN "luminosity" IN (-3) THEN 0 WHEN "luminosity" IN (-2) THEN 0 WHEN "luminosity" IN (-1) THEN 0 ELSE 0 END')
self.assertEqual(default_number, 0.5)

def testParseValueList(self):
Expand Down Expand Up @@ -1400,7 +1400,7 @@ def testFillColorDDHasBrush(self):
self.assertEqual(renderer.symbol()[0].brushStyle(), Qt.BrushStyle.SolidPattern)
dd_props = renderer.symbol()[0].dataDefinedProperties()
prop = dd_props.property(QgsSymbolLayer.Property.PropertyFillColor)
self.assertEqual(prop.asExpression(), 'CASE WHEN @vector_tile_zoom < 13 THEN color_hsla(220, 9, 81, 255) WHEN @vector_tile_zoom >= 13 AND @vector_tile_zoom < 17 THEN color_hsla(220, 9, scale_linear(@vector_tile_zoom,13,17,81,74), 255) WHEN @vector_tile_zoom >= 17 THEN color_hsla(220, 9, 74, 255) ELSE color_hsla(220, 9, 74, 255) END')
self.assertEqual(prop.asExpression(), 'CASE WHEN @vector_tile_zoom >= 14 AND @vector_tile_zoom < 16 THEN color_hsla(color_part(CASE WHEN "class" IN (\'roof\', \'cooling_tower\') THEN color_rgba(210,210,214,255) ELSE color_rgba(184,184,188,255) END,\'hsl_hue\'), color_part(CASE WHEN "class" IN (\'roof\', \'cooling_tower\') THEN color_rgba(210,210,214,255) ELSE color_rgba(184,184,188,255) END,\'hsl_saturation\'), color_part(CASE WHEN "class" IN (\'roof\', \'cooling_tower\') THEN color_rgba(210,210,214,255) ELSE color_rgba(184,184,188,255) END,\'lightness\'), color_part(CASE WHEN "class" IN (\'roof\', \'cooling_tower\') THEN color_rgba(210,210,214,255) ELSE color_rgba(184,184,188,255) END,\'alpha\')) WHEN @vector_tile_zoom >= 16 THEN color_hsla(color_part(CASE WHEN "class" IN (\'roof\', \'cooling_tower\') THEN color_rgba(210,210,214,255) ELSE color_rgba(184,184,188,255) END,\'hsl_hue\'), color_part(CASE WHEN "class" IN (\'roof\', \'cooling_tower\') THEN color_rgba(210,210,214,255) ELSE color_rgba(184,184,188,255) END,\'hsl_saturation\'), color_part(CASE WHEN "class" IN (\'roof\', \'cooling_tower\') THEN color_rgba(210,210,214,255) ELSE color_rgba(184,184,188,255) END,\'lightness\'), color_part(CASE WHEN "class" IN (\'roof\', \'cooling_tower\') THEN color_rgba(210,210,214,255) ELSE color_rgba(184,184,188,255) END,\'alpha\')) ELSE color_hsla(color_part(CASE WHEN "class" IN (\'roof\', \'cooling_tower\') THEN color_rgba(210,210,214,255) ELSE color_rgba(184,184,188,255) END,\'hsl_hue\'), color_part(CASE WHEN "class" IN (\'roof\', \'cooling_tower\') THEN color_rgba(210,210,214,255) ELSE color_rgba(184,184,188,255) END,\'hsl_saturation\'), color_part(CASE WHEN "class" IN (\'roof\', \'cooling_tower\') THEN color_rgba(210,210,214,255) ELSE color_rgba(184,184,188,255) END,\'lightness\'), color_part(CASE WHEN "class" IN (\'roof\', \'cooling_tower\') THEN color_rgba(210,210,214,255) ELSE color_rgba(184,184,188,255) END,\'alpha\')) END')


if __name__ == '__main__':
Expand Down

0 comments on commit da1271e

Please sign in to comment.