Skip to content

Commit

Permalink
fix test with locale thousand separator
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Dec 5, 2019
1 parent 456384e commit 2868074
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/src/python/test_qgsclassificationmethod.py
Expand Up @@ -12,6 +12,7 @@

import qgis # NOQA

from qgis.PyQt.QtCore import QLocale
from qgis.testing import unittest, start_app
from qgis.core import QgsClassificationMethod, QgsClassificationLogarithmic, QgsFeature, QgsVectorLayer, QgsPointXY, \
QgsGeometry
Expand Down Expand Up @@ -62,7 +63,7 @@ def testQgsClassificationLogarithmic(self):
r = m.classes(vl, 'value', 8)

self.assertEqual(len(r), 6)
self.assertEqual(r[0].label(), '2746.71 - 10^4')
self.assertEqual(r[0].label(), '{} - 10^4'.format(QLocale().toString(2746.71)))
self.assertEqual(QgsClassificationMethod.rangesToBreaks(r),
[10000.0, 100000.0, 1000000.0, 10000000.0, 100000000.0, 1000000000.0])

Expand Down

0 comments on commit 2868074

Please sign in to comment.