Skip to content
Permalink
Browse files

Merge pull request #4466 from arnaud-morvan/test_python_qgsfields_get…

…item

Add test for python QgsFields [] operator
  • Loading branch information
nyalldawson committed Aug 6, 2017
2 parents 54007ef + 4e436c2 commit 80d53e4f5938774c662c7b49a78e0a695aa360bb
Showing with 8 additions and 0 deletions.
  1. +8 −0 tests/src/python/test_qgsfield.py
@@ -37,6 +37,14 @@ def test_exceptions(self):
fields.remove(111)

fields = ml.fields()

# check no error
self.assertEqual("value", fields[1].name())
self.assertEqual("value", fields[-1].name())
# check exceptions raised
with self.assertRaises(IndexError):
fields[111]

# check no error
fields.at(1)
# check exceptions raised

0 comments on commit 80d53e4

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