Opened 9 years ago
Closed 9 years ago
#25191 closed Cleanup/optimization (fixed)
Better error output for assertXMLEqual
Reported by: | Sergiy Kuzmenko | Owned by: | Caio Ariede |
---|---|---|---|
Component: | Testing framework | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
It is difficult to understand test failures when comparing XML files. Currently error message shows the beginning of each XML string and output looks something like this:
AssertionError: '<?xml version="1.0" encoding="utf-8"?>\n<xliff version=\'1.2\'\n xmlns=\' [truncated]... != '<?xml version="1.0" encoding="utf-8"?>\n<xliff version=\'1.2\' xmlns=\'urn:oasi [truncated]...
It would be very nice to have output similar to assertHTMLEqual, with markup differences highlighted like this:
AssertionError: <b> Blue </b>sky != <b> Blue </b>dye <b> Blue - </b>sky + </b>dye
Change History (7)
comment:1 by , 9 years ago
Easy pickings: | unset |
---|---|
Triage Stage: | Unreviewed → Accepted |
Type: | New feature → Cleanup/optimization |
comment:2 by , 9 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 9 years ago
comment:4 by , 9 years ago
Has patch: | set |
---|---|
Needs tests: | set |
Don't forget to check "Has patch" so the ticket appears in the review queue. Please uncheck "Needs tests" when updated, thanks.
comment:5 by , 9 years ago
Needs tests: | unset |
---|
comment:6 by , 9 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
Note:
See TracTickets
for help on using tickets.
Pull request: https://github.com/django/django/pull/5086