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))
|
||||
retrieved = []
|
||||
feat = featureset.next()
|
||||
while featureset.next():
|
||||
while feat:
|
||||
retrieved.append(feat)
|
||||
feat = featureset.next()
|
||||
|
||||
eq_(len(retrieved), 1)
|
||||
f = retrieved[0]
|
||||
eq_(f['foo'], 'bar')
|
||||
|
||||
featureset = md.features_at_point(Coord(20,30)).features
|
||||
featureset = md.features_at_point(mapnik.Coord(20,30))
|
||||
retrieved = []
|
||||
feat = featureset.next()
|
||||
while featureset.next():
|
||||
while feat:
|
||||
retrieved.append(feat)
|
||||
eq_(len(retrieved), 0)
|
||||
|
||||
|
|
Loading…
Reference in a new issue