(out: dict, today: str)
| 380 | |
| 381 | |
| 382 | def diffReportFromDict(out: dict, today: str) -> str: |
| 383 | html = '<pre>\n' |
| 384 | html += '<b>MessageID ' + OLD_VERSION + ' Head</b>\n' |
| 385 | sum0 = 0 |
| 386 | sum1 = 0 |
| 387 | for messageId in sorted(out.keys()): |
| 388 | line = messageId + ' ' |
| 389 | counts = out[messageId] |
| 390 | sum0 += counts[0] |
| 391 | sum1 += counts[1] |
| 392 | if counts[0] > 0: |
| 393 | c = str(counts[0]) |
| 394 | while len(line) < 40 - len(c): |
| 395 | line += ' ' |
| 396 | line += c + ' ' |
| 397 | if counts[1] > 0: |
| 398 | c = str(counts[1]) |
| 399 | while len(line) < 48 - len(c): |
| 400 | line += ' ' |
| 401 | line += c |
| 402 | line = '<a href="diff' + today + '-' + messageId + '">' + messageId + '</a>' + line[line.find(' '):] |
| 403 | html += line + '\n' |
| 404 | |
| 405 | # Sum |
| 406 | html += '================================================\n' |
| 407 | line = '' |
| 408 | while len(line) < 40 - len(str(sum0)): |
| 409 | line += ' ' |
| 410 | line += str(sum0) + ' ' |
| 411 | while len(line) < 48 - len(str(sum1)): |
| 412 | line += ' ' |
| 413 | line += str(sum1) |
| 414 | html += line + '\n' |
| 415 | html += '</pre>\n' |
| 416 | |
| 417 | return html |
| 418 | |
| 419 | |
| 420 | def diffReport(resultsPath: str) -> str: |
no test coverage detected