Skip to content
Permalink
Browse files

Update query API to fix tests

  • Loading branch information...
geographika committed Oct 10, 2018
1 parent 52bd312 commit b63599704e5f018cf80297353b0e1d199cd65a63
Showing with 3 additions and 4 deletions.
  1. +3 −4 mapscript/python/tests/cases/resultcache_test.py
@@ -86,12 +86,12 @@ def testQueryResultBounds(self):
e = self.layer.getExtent()
self.assertRectsEqual(results.bounds, e)

def xtestQueryResultMembers(self):
def testQueryResultMembers(self):
"""get the single result member"""
results = self.pointquery()
self.layer.open()
res = results.getResult(0)
feature = self.layer.getFeature(res.shapeindex, res.tileindex)
feature = self.layer.getShape(res)
self.layer.close()
self.assertRectsEqual(results.bounds, feature.bounds)
assert feature.getValue(1) == 'A Polygon'
@@ -103,7 +103,7 @@ def testQueryResultsListComp(self):
assert len(result_list) == 1
assert result_list[0].shapeindex == 0

def xtestQueryByIndex(self):
def testQueryByIndex(self):
"""pop a result into the result set"""
self.layer.queryByIndex(self.map, -1, 0, mapscript.MS_FALSE)
results = self.layer.getResults()
@@ -139,7 +139,6 @@ def testIndexQueryOffLayer(self):
"""simple index query returns one result, even if layer is off"""
self.layer.status = mapscript.MS_OFF
results = self.indexquery()
print(results.numresults)
assert results.numresults == 1


0 comments on commit b635997

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