Skip to content

Commit

Permalink
update csv expected test - refs mapnik/mapnik#3110
Browse files Browse the repository at this point in the history
  • Loading branch information
Dane Springmeyer committed Oct 22, 2015
1 parent 8fd2e85 commit ab8b1f6
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions test/python_tests/csv_test.py
Expand Up @@ -54,7 +54,9 @@ def test_good_files(visual=False):
good_files.extend(glob.glob("../data/csv/warns/*.*"))
ignorable = os.path.join('..', 'data', 'csv', 'long_lat.vrt')
good_files.remove(ignorable)

for f in good_files:
if f.endswith('.index'):
good_files.remove(f)
for csv in good_files:
if visual:
try:
Expand Down Expand Up @@ -492,18 +494,13 @@ def test_json_field3(**kwargs):

def test_that_blank_undelimited_rows_are_still_parsed(**kwargs):
ds = get_csv_ds('more_headers_than_column_values.csv')
eq_(len(ds.fields()), 5)
eq_(ds.fields(), ['x', 'y', 'one', 'two', 'three'])
eq_(ds.field_types(), ['int', 'int', 'str', 'str', 'str'])
eq_(len(ds.fields()), 0)
eq_(ds.fields(), [])
eq_(ds.field_types(), [])
fs = ds.featureset()
feat = fs.next()
eq_(feat['x'], 0)
eq_(feat['y'], 0)
eq_(feat['one'], '')
eq_(feat['two'], '')
eq_(feat['three'], '')
eq_(fs, None)
desc = ds.describe()
eq_(desc['geometry_type'], mapnik.DataGeometryType.Point)
eq_(desc['geometry_type'], None)

@raises(RuntimeError)
def test_that_fewer_headers_than_rows_throws(**kwargs):
Expand Down

0 comments on commit ab8b1f6

Please sign in to comment.