Skip to content
Permalink
Browse files
Cleanup python code
  • Loading branch information
tomass committed Apr 10, 2021
1 parent c6ff640 commit 1793deb9a35acc530f3ab96f9e3088a0ef84bfe2
Showing with 1 addition and 2 deletions.
  1. +1 −2 tests/src/python/test_qgsclassificationmethod.py
@@ -103,13 +103,12 @@ def testQgsClassificationJenksHighNumber(self):
# This test checks if Jenkis classification does not crash when number of
# values in a set is higher than 3000 (value hardcoded in qgsclassificationjenks.h)
# And if returned values are consistent (the same as at the time of creation of this test)
random.seed(42*42);
random.seed(42 * 42)
values = [random.randint(-1000, 1000) for _ in range(5000)]
vl = createMemoryLayer(values)
m = QgsClassificationJenks()

r = m.classes(vl, 'value', 4)
print('result high=',QgsClassificationMethod.rangesToBreaks(r))
self.assertEqual(len(r), 4)
self.assertEqual(QgsClassificationMethod.rangesToBreaks(r),
[-506.0, -4.0, 499.0, 1000.0])

0 comments on commit 1793deb

Please sign in to comment.