Skip to content

Commit

Permalink
Tidying up test output
Browse files Browse the repository at this point in the history
  • Loading branch information
ccrook committed Apr 15, 2013
1 parent 337fd7b commit bee4852
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tests/src/python/test_qgsdelimitedtextprovider.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,14 @@ def runTest( name, wanted, log_wanted, file, **params ):
description = wrec['description']
difference = recordDifference(wrec,trec)
if not difference:
print ' ',description,": Passed"
print ' {0}: Passed'.format(description)
else:
print ' ',description,":",difference
print ' {0}: {1}'.format(description,difference)
failures.append(description+': '+difference)
for id in data.keys():
if id not in wanted:
msg= "Layer contains unexpected extra data with id: \"{0}\"".format(id)
print ' ',msg
print ' '+msg
failures.append(msg)
break
assert len(failures) == 0,"\n".join(failures)
Expand All @@ -242,9 +242,11 @@ def runTest( name, wanted, log_wanted, file, **params ):
log_wanted.remove(l)
log.remove(l)
for l in log_wanted:
print ' ','Missing log message:',l
print ' Missing log message:',l
for l in log:
print ' ','Extra log message:',l
print ' Extra log message:',l
if len(log)==0 and len(log_wanted)==0:
print ' Message log correct: Passed'
assert len(log_wanted) == 0, "Missing log messages:\n"+"\n".join(log_wanted)
assert len(log) == 0, "Extra log messages:\n"+"\n".join(log)

Expand Down

0 comments on commit bee4852

Please sign in to comment.