Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Removing a couple more delimited text file test case failures
  • Loading branch information
ccrook committed Jun 1, 2013
1 parent 24bffbf commit a39b78b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
5 changes: 4 additions & 1 deletion tests/src/python/test_qgsdelimitedtextprovider.py
Expand Up @@ -176,7 +176,10 @@ def delimitedTextData( testname, filename, requests, verbose, **params ):
if not rdata:
log.append("Request "+str(nr)+" did not return any data")
for msg in logger.messages():
log.append(msg.replace(filepath,'file'))
filelogname = 'temp_file' if 'tmp' in filename.lower() else filename
msg = re.sub(r'file\s+.*'+re.escape(filename),'file '+filelogname,msg)
msg = msg.replace(filepath,filelogname)
log.append(msg);
return dict( fields=fields, fieldTypes=fieldTypes, data=data, log=log, uri=uri)

def printWanted( testname, result ):
Expand Down
24 changes: 12 additions & 12 deletions tests/src/python/test_qgsdelimitedtextprovider_wanted.py
Expand Up @@ -330,7 +330,7 @@ def test_007_multiple_quote():
},
}
wanted['log']=[
u'Errors in file file',
u'Errors in file test.quote',
u'3 records discarded due to invalid format',
u'The following lines were not loaded into QGIS due to errors:',
u'Invalid record format at line 7',
Expand All @@ -355,7 +355,7 @@ def test_008_badly_formed_quotes():
},
}
wanted['log']=[
u'Errors in file file',
u'Errors in file test.badquote',
u'2 records discarded due to invalid format',
u'The following lines were not loaded into QGIS due to errors:',
u'Invalid record format at line 2',
Expand Down Expand Up @@ -415,7 +415,7 @@ def test_010_read_coordinates():
},
}
wanted['log']=[
u'Errors in file file',
u'Errors in file testpt.csv',
u'1 records discarded due to invalid geometry definitions',
u'The following lines were not loaded into QGIS due to errors:',
u'Invalid X or Y fields at line 4',
Expand Down Expand Up @@ -460,7 +460,7 @@ def test_011_read_wkt():
},
}
wanted['log']=[
u'Errors in file file',
u'Errors in file testwkt.csv',
u'1 records discarded due to invalid geometry definitions',
u'7 records discarded due to incompatible geometry types',
u'The following lines were not loaded into QGIS due to errors:',
Expand Down Expand Up @@ -506,7 +506,7 @@ def test_012_read_wkt_point():
},
}
wanted['log']=[
u'Errors in file file',
u'Errors in file testwkt.csv',
u'1 records discarded due to invalid geometry definitions',
u'7 records discarded due to incompatible geometry types',
u'The following lines were not loaded into QGIS due to errors:',
Expand Down Expand Up @@ -552,7 +552,7 @@ def test_013_read_wkt_line():
},
}
wanted['log']=[
u'Errors in file file',
u'Errors in file testwkt.csv',
u'1 records discarded due to invalid geometry definitions',
u'7 records discarded due to incompatible geometry types',
u'The following lines were not loaded into QGIS due to errors:',
Expand Down Expand Up @@ -580,7 +580,7 @@ def test_014_read_wkt_polygon():
},
}
wanted['log']=[
u'Errors in file file',
u'Errors in file testwkt.csv',
u'1 records discarded due to invalid geometry definitions',
u'10 records discarded due to incompatible geometry types',
u'The following lines were not loaded into QGIS due to errors:',
Expand Down Expand Up @@ -748,7 +748,7 @@ def test_015_read_dms_xy():
},
}
wanted['log']=[
u'Errors in file file',
u'Errors in file testdms.csv',
u'5 records discarded due to invalid geometry definitions',
u'The following lines were not loaded into QGIS due to errors:',
u'Invalid X or Y fields at line 27',
Expand Down Expand Up @@ -878,7 +878,7 @@ def test_019_regular_expression_3():
},
}
wanted['log']=[
u'Errors in file file',
u'Errors in file testre2.txt',
u'1 records discarded due to invalid format',
u'The following lines were not loaded into QGIS due to errors:',
u'Invalid record format at line 3',
Expand Down Expand Up @@ -1372,9 +1372,9 @@ def test_029_file_watcher():
'Request 2 did not return any data',
'Request 7 did not return any data',
'Request 11 did not return any data',
u'Errors in file file',
u'Errors in file temp_file',
u'The file has been updated by another application - reloading',
u'Errors in file file',
u'Errors in file temp_file',
u'The file has been updated by another application - reloading',
]
return wanted
Expand Down Expand Up @@ -2157,7 +2157,7 @@ def test_036_csvt_file_invalid_types():
},
}
wanted['log']=[
u'Errors in file file',
u'Errors in file testcsvt3.csv',
u'File type string in testcsvt3.csvt is not correctly formatted',
]
return wanted
Expand Down

1 comment on commit a39b78b

@ccrook
Copy link
Contributor Author

@ccrook ccrook commented on a39b78b Jun 1, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hopefully this will fix windows file name mismatches on osgeo build. Will not fix file watcher test case failures...

Please sign in to comment.