Skip to content

Commit

Permalink
Renamed app test with py prefix and added simple geometry test case
Browse files Browse the repository at this point in the history
  • Loading branch information
timlinux committed Aug 2, 2012
1 parent ec87f7f commit d8e918d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/src/python/CMakeLists.txt
@@ -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)
22 changes: 22 additions & 0 deletions tests/src/python/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.