Skip to content

Commit

Permalink
add tolerance
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids authored Jul 24, 2024
1 parent 8547fa5 commit 98924d7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/src/python/test_qgsmapboxglconverter.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
)
import unittest
from qgis.testing import start_app, QgisTestCase
from qgis.core import qgsDoubleNear

from utilities import getTestFont, unitTestDataPath

Expand Down Expand Up @@ -218,7 +219,7 @@ def testParseMatchList(self):
"rgb(252, 252, 252)"
], QgsMapBoxGlStyleConverter.PropertyType.Color, 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(default_number, 0.0)
self.assertTrue(qgsDoubleNear(default_number, 0.0))

def testParseValueList(self):
conversion_context = QgsMapBoxGlStyleConversionContext()
Expand Down

0 comments on commit 98924d7

Please sign in to comment.