Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Python 3 update
  • Loading branch information
nyalldawson committed Aug 15, 2016
1 parent c306438 commit 0f27235
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/src/python/test_qgsvectorlayer.py
Expand Up @@ -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]))
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 0f27235

Please sign in to comment.