fix memory datasource test
This commit is contained in:
parent
1c07372a13
commit
7327a646f0
1 changed files with 4 additions and 3 deletions
|
@ -16,17 +16,18 @@ def test_add_feature():
|
||||||
featureset = md.features_at_point(mapnik.Coord(2,3))
|
featureset = md.features_at_point(mapnik.Coord(2,3))
|
||||||
retrieved = []
|
retrieved = []
|
||||||
feat = featureset.next()
|
feat = featureset.next()
|
||||||
while featureset.next():
|
while feat:
|
||||||
retrieved.append(feat)
|
retrieved.append(feat)
|
||||||
|
feat = featureset.next()
|
||||||
|
|
||||||
eq_(len(retrieved), 1)
|
eq_(len(retrieved), 1)
|
||||||
f = retrieved[0]
|
f = retrieved[0]
|
||||||
eq_(f['foo'], 'bar')
|
eq_(f['foo'], 'bar')
|
||||||
|
|
||||||
featureset = md.features_at_point(Coord(20,30)).features
|
featureset = md.features_at_point(mapnik.Coord(20,30))
|
||||||
retrieved = []
|
retrieved = []
|
||||||
feat = featureset.next()
|
feat = featureset.next()
|
||||||
while featureset.next():
|
while feat:
|
||||||
retrieved.append(feat)
|
retrieved.append(feat)
|
||||||
eq_(len(retrieved), 0)
|
eq_(len(retrieved), 0)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue