mirror of
https://github.com/mapnik/mapnik.git
synced 2025-12-08 20:13:09 +00:00
update tests/python_tests/geojson_plugin_test.py
This commit is contained in:
parent
3331368e05
commit
8faf04663c
@ -23,7 +23,7 @@ if 'geojson' in mapnik.DatasourceCache.plugin_names():
|
||||
def test_geojson_properties():
|
||||
ds = mapnik.Datasource(type='geojson',file='../data/json/escaped.geojson')
|
||||
f = ds.features_at_point(ds.envelope().center()).features[0]
|
||||
eq_(len(ds.fields()),7)
|
||||
eq_(len(ds.fields()),9)
|
||||
desc = ds.describe()
|
||||
eq_(desc['geometry_type'],mapnik.DataGeometryType.Point)
|
||||
|
||||
@ -38,7 +38,7 @@ if 'geojson' in mapnik.DatasourceCache.plugin_names():
|
||||
|
||||
ds = mapnik.Datasource(type='geojson',file='../data/json/escaped.geojson')
|
||||
f = ds.all_features()[0]
|
||||
eq_(len(ds.fields()),7)
|
||||
eq_(len(ds.fields()),9)
|
||||
|
||||
desc = ds.describe()
|
||||
eq_(desc['geometry_type'],mapnik.DataGeometryType.Point)
|
||||
@ -66,7 +66,7 @@ if 'geojson' in mapnik.DatasourceCache.plugin_names():
|
||||
# @raises(RuntimeError)
|
||||
def test_that_nonexistant_query_field_throws(**kwargs):
|
||||
ds = mapnik.Datasource(type='geojson',file='../data/json/escaped.geojson')
|
||||
eq_(len(ds.fields()),7)
|
||||
eq_(len(ds.fields()),9)
|
||||
# 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'])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user