unmask failing test - refs #1345

This commit is contained in:
Dane Springmeyer 2012-07-25 16:37:05 -07:00
parent 4ad15db23d
commit 3da72ff8cb
2 changed files with 33 additions and 4 deletions

View file

@ -0,0 +1,28 @@
{
"type":"FeatureCollection",
"features":
[
{
"type":"Feature",
"geometry":
{
"type":"Point",
"coordinates":
[
-81.705583,
41.480573
]
},
"properties":
{
"name":"Test",
"int":1,
"description":"Test: \u005C",
"spaces":"this has spaces",
"double":1.1,
"boolean":true,
"NOM_FR":"Québec"
}
}
]
}

View file

@ -43,15 +43,16 @@ if 'geojson' in mapnik.DatasourceCache.instance().plugin_names():
eq_(f['boolean'], True)
eq_(f['NOM_FR'], u'Qu\xe9bec')
eq_(f['NOM_FR'], u'Québec')
#eq_(f['description'], u'Test: \u005C')
eq_(f['spaces'], u'this has spaces')
eq_(f['description'], u'Test: \u005C')
# @raises(RuntimeError)
def test_that_nonexistant_query_field_throws(**kwargs):
ds = mapnik.Datasource(type='geojson',file='../data/json/escaped.json')
eq_(len(ds.fields()),6)
eq_(len(ds.fields()),7)
# TODO - this sorting is messed up
eq_(ds.fields(),['name', 'int', 'double', 'description', 'boolean', 'NOM_FR'])
eq_(ds.field_types(),['str', 'int', 'float', 'str', 'bool', 'str'])
#eq_(ds.fields(),['name', 'int', 'double', 'description', 'boolean', 'NOM_FR'])
#eq_(ds.field_types(),['str', 'int', 'float', 'str', 'bool', 'str'])
# TODO - should geojson plugin throw like others?
# query = mapnik.Query(ds.envelope())
# for fld in ds.fields():