Removing a couple more delimited text file test case failures

This commit is contained in:
Chris Crook 2013-06-01 23:05:56 +12:00
parent 24bffbf262
commit a39b78bb3e
2 changed files with 16 additions and 13 deletions

View File

@ -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 ):

View File

@ -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',
@ -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',
@ -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',
@ -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:',
@ -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:',
@ -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:',
@ -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:',
@ -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',
@ -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',
@ -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
@ -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