From 7327a646f0f670e36915bab3467d63f2b830eb96 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 14 Feb 2012 15:01:41 -0800 Subject: [PATCH] fix memory datasource test --- tests/python_tests/memory_datasource_test.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/python_tests/memory_datasource_test.py b/tests/python_tests/memory_datasource_test.py index 4afce1046..9d93ba509 100644 --- a/tests/python_tests/memory_datasource_test.py +++ b/tests/python_tests/memory_datasource_test.py @@ -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)