| CODENOTIFIER | HelpYou are not signed inSign in |
Project: Trac
Revision: 7510
Author: rblank
Date: 05 Sep 2008 07:25:03
Diff at Trac: http://trac.edgewall.org/changeset/7510
Changes:0.11-stable: Fixed formatting and encoding of XHTML validation errors in functional tests.
Files:| ... | ...@@ -76,13 +76,14 @@ | |
| 76 | 76 | |
| 77 | 77 | def _format_error_log(data, log): |
| 78 | 78 | msg = [] |
| 79 | for each in log: | |
| 80 | context = data.splitlines()[max(0, each.line - 5): | |
| 81 | each.line + 6] | |
| 82 | msg.append("%s\n\nURL: %s\nLine %d, column %d\n\n%s" % ( | |
| 83 | each.message, each.filename, each.line, each.column, | |
| 84 | "\n".join(context))) | |
| 85 | return "\n".join(msg) | |
| 79 | for entry in log: | |
| 80 | context = data.splitlines()[max(0, entry.line - 5): | |
| 81 | entry.line + 6] | |
| 82 | msg.append("\n# %s\n# URL: %s\n# Line %d, column %d\n\n%s\n" | |
| 83 | % (entry.message, entry.filename, | |
| 84 | entry.line, entry.column, | |
| 85 | "\n".join(each.decode('utf-8') for each in context))) | |
| 86 | return "\n".join(msg).encode('ascii', 'xmlcharrefreplace') | |
| 86 | 87 | |
| 87 | 88 | def _validate_xhtml(func_name, *args, **kwargs): |
| 88 | 89 | page = b.get_html() |