Skip to content

Commit

Permalink
Cleanup python code
Browse files Browse the repository at this point in the history
  • Loading branch information
tomass committed Apr 10, 2021
1 parent c6ff640 commit 1793deb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/src/python/test_qgsclassificationmethod.py
Expand Up @@ -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])
Expand Down

0 comments on commit 1793deb

Please sign in to comment.