Skip to content

Commit

Permalink
Some more little tests for test friday.
Browse files Browse the repository at this point in the history
  • Loading branch information
timlinux committed Aug 10, 2012
1 parent c65df29 commit 86abc75
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/src/python/test_qgsgeometry.py
Expand Up @@ -30,6 +30,12 @@ def testFromLine(self):
(QGis.WKBLineString, myLine.type()))
assert myLine.wkbType() == QGis.WKBLineString, myMessage

def testFromPolygon(self):
myPolygon = QgsGeometry.fromPolygon([[QgsPoint(1, 1), QgsPoint(2, 2), QgsPoint(1, 2), QgsPoint(1, 1)]])
myMessage = ('Expected:\n%s\nGot:\n%s\n' %
(QGis.WKBPolygon, myPolygon.type()))
assert myPolygon.wkbType() == QGis.WKBPolygon, myMessage


if __name__ == '__main__':
unittest.main()
Expand Down

0 comments on commit 86abc75

Please sign in to comment.