Skip to content
Permalink
Browse files

Python 3 update

  • Loading branch information
nyalldawson committed Aug 15, 2016
1 parent c306438 commit 0f2723542be4bc9826463a55b2388281ce2acf71
Showing with 3 additions and 3 deletions.
  1. +3 −3 tests/src/python/test_qgsvectorlayer.py
@@ -1200,7 +1200,7 @@ def testUniqueValue(self):

# change an attribute value to a new unique value
f = QgsFeature()
f1_id = layer.getFeatures().next().id()
f1_id = next(layer.getFeatures()).id()
self.assertTrue(layer.changeAttributeValue(f1_id, 1, 481523))
# note - this isn't 100% accurate, since 123 no longer exists - but it avoids looping through all features
self.assertEqual(set(layer.uniqueValues(1)), set([123, 457, 888, -1, 0, 999, 9999, 481523]))
@@ -1233,7 +1233,7 @@ def testMinValue(self):

# change an attribute value to a new minimum value
f = QgsFeature()
f1_id = layer.getFeatures().next().id()
f1_id = next(layer.getFeatures()).id()
self.assertTrue(layer.changeAttributeValue(f1_id, 1, -1001))
self.assertEqual(layer.minimumValue(1), -1001)

@@ -1265,7 +1265,7 @@ def testMaxValue(self):

# change an attribute value to a new maximum value
f = QgsFeature()
f1_id = layer.getFeatures().next().id()
f1_id = next(layer.getFeatures()).id()
self.assertTrue(layer.changeAttributeValue(f1_id, 1, 1001))
self.assertEqual(layer.maximumValue(1), 1001)

0 comments on commit 0f27235

Please sign in to comment.
You can’t perform that action at this time.