From 6a9030f7ccbdc5ef29c3589726a699e9b826f096 Mon Sep 17 00:00:00 2001 From: Alberto Valverde Date: Fri, 12 Mar 2010 13:33:46 +0000 Subject: [PATCH] updated feature properties test so no deprecationwarnings are shown --- tests/python_tests/object_test.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/tests/python_tests/object_test.py b/tests/python_tests/object_test.py index dd8961ceb..291f0a6ef 100644 --- a/tests/python_tests/object_test.py +++ b/tests/python_tests/object_test.py @@ -172,12 +172,16 @@ def test_shapefile_properties(): s = mapnik2.Shapefile(file='../../demo/data/boundaries', encoding='latin1') f = s.features_at_point(s.envelope().center()).features[0] - eq_(f.properties['CGNS_FID'], u'6f733341ba2011d892e2080020a0f4c9') - eq_(f.properties['COUNTRY'], u'CAN') - eq_(f.properties['F_CODE'], u'FA001') - eq_(f.properties['NAME_EN'], u'Quebec') - eq_(f.properties['NOM_FR'], u'Qu\xe9bec') - eq_(f.properties['Shape_Area'], 1512185733150.0) + eq_(f['CGNS_FID'], u'6f733341ba2011d892e2080020a0f4c9') + eq_(f['COUNTRY'], u'CAN') + eq_(f['F_CODE'], u'FA001') + eq_(f['NAME_EN'], u'Quebec') + eq_(f['NOM_FR'], u'Qu\xe9bec') + eq_(f['Shape_Area'], 1512185733150.0) + eq_(f['Shape_Leng'], 19218883.724300001) + + # Check that the deprecated interface still works, + # remove me once the deprecated code is cleaned up eq_(f.properties['Shape_Leng'], 19218883.724300001) # TextSymbolizer initialization