[mapserver-commits] r9949 - trunk/msautotest/mspython
svn at osgeo.org
svn at osgeo.org
Tue Mar 16 22:25:35 EDT 2010
Author: warmerdam
Date: 2010-03-16 22:25:35 -0400 (Tue, 16 Mar 2010)
New Revision: 9949
Modified:
trunk/msautotest/mspython/ogr_query.py
Log:
do some modest testing of OGR queries
Modified: trunk/msautotest/mspython/ogr_query.py
===================================================================
--- trunk/msautotest/mspython/ogr_query.py 2010-03-17 02:19:00 UTC (rev 9948)
+++ trunk/msautotest/mspython/ogr_query.py 2010-03-17 02:25:35 UTC (rev 9949)
@@ -257,10 +257,37 @@
return 'success'
###############################################################################
+# Confirm that we can still fetch features not in the result set directly
+# by their feature id.
+
+def ogr_query_6():
+ layer = pmstestlib.layer
+
+ layer.open()
+
+ #########################################################################
+ # Check first shape attributes.
+
+ result = layer.getResult( 0 )
+
+ s = mapscript.shapeObj( mapscript.MS_SHAPE_POLYGON )
+ layer.resultsGetShape( s, 9, 0 )
+
+ if pmstestlib.check_items( layer, s,
+ [('EAS_ID',' 170')] ) == 0:
+ return 'fail'
+
+ layer.close()
+ layer.close() # discard resultset.
+
+ return 'success'
+
+###############################################################################
# Change the map extents and see if our query results have been altered.
-# With the current implementation they will be.
+# With the current implementation they will be, though this might be
+# considered to be a defect.
-def ogr_query_6():
+def ogr_query_7():
map = pmstestlib.map
map.draw()
@@ -314,6 +341,7 @@
ogr_query_4,
ogr_query_5,
ogr_query_6,
+ ogr_query_7,
ogr_query_cleanup ]
if __name__ == '__main__':
More information about the mapserver-commits
mailing list