Skip to content
Permalink
Browse files

Renamed app test with py prefix and added simple geometry test case

  • Loading branch information
timlinux committed Aug 2, 2012
1 parent ec87f7f commit d8e918d97cfe97f4f803aa1024f843248525fbe7
Showing with 24 additions and 1 deletion.
  1. +2 −1 tests/src/python/CMakeLists.txt
  2. +22 −0 tests/src/python/test_qgsgeometry.py
@@ -1,2 +1,3 @@
INCLUDE(UsePythonTest)
ADD_PYTHON_TEST(QGisApp test_qgisapp.py)
ADD_PYTHON_TEST(PyQGisApp test_qgisapp.py)
ADD_PYTHON_TEST(PyQgsGeometry test_qgsgeometry.py)
@@ -0,0 +1,22 @@
import unittest

from qgis.core import (QgsGeometry, QGis)

# Convenience instances in case you may need them
# not used in this test
#from utilities import getQgisTestApp
#QGISAPP, CANVAS, IFACE, PARENT = getQgisTestApp()

class TestQgsGeometry(unittest.TestCase):

def testWktPointLoading(self):
myWKT='POINT(10 10)'
myGeometry = QgsGeometry.fromWkt(myWKT)
myMessage = ('Expected:\n%s\nGot:\n%s\n' %
(QGis.Point, myGeometry.type()))
assert myGeometry.type() == QGis.Point, myMessage


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

0 comments on commit d8e918d

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