Skip to content

Commit ab8b1f6

Browse files
author
Dane Springmeyer
committed
update csv expected test - refs mapnik/mapnik#3110
1 parent 8fd2e85 commit ab8b1f6

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

test/python_tests/csv_test.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ def test_good_files(visual=False):
5454
good_files.extend(glob.glob("../data/csv/warns/*.*"))
5555
ignorable = os.path.join('..', 'data', 'csv', 'long_lat.vrt')
5656
good_files.remove(ignorable)
57-
57+
for f in good_files:
58+
if f.endswith('.index'):
59+
good_files.remove(f)
5860
for csv in good_files:
5961
if visual:
6062
try:
@@ -492,18 +494,13 @@ def test_json_field3(**kwargs):
492494

493495
def test_that_blank_undelimited_rows_are_still_parsed(**kwargs):
494496
ds = get_csv_ds('more_headers_than_column_values.csv')
495-
eq_(len(ds.fields()), 5)
496-
eq_(ds.fields(), ['x', 'y', 'one', 'two', 'three'])
497-
eq_(ds.field_types(), ['int', 'int', 'str', 'str', 'str'])
497+
eq_(len(ds.fields()), 0)
498+
eq_(ds.fields(), [])
499+
eq_(ds.field_types(), [])
498500
fs = ds.featureset()
499-
feat = fs.next()
500-
eq_(feat['x'], 0)
501-
eq_(feat['y'], 0)
502-
eq_(feat['one'], '')
503-
eq_(feat['two'], '')
504-
eq_(feat['three'], '')
501+
eq_(fs, None)
505502
desc = ds.describe()
506-
eq_(desc['geometry_type'], mapnik.DataGeometryType.Point)
503+
eq_(desc['geometry_type'], None)
507504

508505
@raises(RuntimeError)
509506
def test_that_fewer_headers_than_rows_throws(**kwargs):

0 commit comments

Comments
 (0)