[Django] #25191: Better error output for assertXMLEqual

12 views
Skip to first unread message

Django

unread,
Jul 29, 2015, 11:59:38 AM7/29/15
to django-...@googlegroups.com
#25191: Better error output for assertXMLEqual
-----------------------------------+--------------------
Reporter: shelldweller | Owner: nobody
Type: New feature | Status: new
Component: Testing framework | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 1 | UI/UX: 0
-----------------------------------+--------------------
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
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25191>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jul 29, 2015, 12:44:48 PM7/29/15
to django-...@googlegroups.com
#25191: Better error output for assertXMLEqual
--------------------------------------+------------------------------------
Reporter: shelldweller | Owner: nobody
Type: Cleanup/optimization | Status: new

Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by timgraham):

* needs_better_patch: => 0
* needs_tests: => 0
* easy: 1 => 0
* needs_docs: => 0
* type: New feature => Cleanup/optimization
* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/25191#comment:1>

Django

unread,
Aug 2, 2015, 1:31:42 PM8/2/15
to django-...@googlegroups.com
#25191: Better error output for assertXMLEqual
-------------------------------------+-------------------------------------
Reporter: shelldweller | Owner:
Type: | caioariede
Cleanup/optimization | Status: assigned

Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by caioariede):

* owner: nobody => caioariede
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/25191#comment:2>

Django

unread,
Aug 2, 2015, 4:08:21 PM8/2/15
to django-...@googlegroups.com
#25191: Better error output for assertXMLEqual
-------------------------------------+-------------------------------------
Reporter: shelldweller | Owner:
Type: | caioariede
Cleanup/optimization | Status: assigned
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by caioariede):

Pull request: https://github.com/django/django/pull/5086

--
Ticket URL: <https://code.djangoproject.com/ticket/25191#comment:3>

Django

unread,
Aug 3, 2015, 8:11:08 AM8/3/15
to django-...@googlegroups.com
#25191: Better error output for assertXMLEqual
-------------------------------------+-------------------------------------
Reporter: shelldweller | Owner:
Type: | caioariede
Cleanup/optimization | Status: assigned
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 1 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* has_patch: 0 => 1
* needs_tests: 0 => 1


Comment:

Don't forget to check "Has patch" so the ticket appears in the review
queue. Please uncheck "Needs tests" when updated, thanks.

--
Ticket URL: <https://code.djangoproject.com/ticket/25191#comment:4>

Django

unread,
Aug 4, 2015, 8:31:52 AM8/4/15
to django-...@googlegroups.com
#25191: Better error output for assertXMLEqual
-------------------------------------+-------------------------------------
Reporter: shelldweller | Owner:
Type: | caioariede
Cleanup/optimization | Status: assigned
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* needs_tests: 1 => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/25191#comment:5>

Django

unread,
Aug 4, 2015, 9:23:15 AM8/4/15
to django-...@googlegroups.com
#25191: Better error output for assertXMLEqual
-------------------------------------+-------------------------------------
Reporter: shelldweller | Owner:
Type: | caioariede
Cleanup/optimization | Status: assigned
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/25191#comment:6>

Django

unread,
Aug 4, 2015, 9:27:47 AM8/4/15
to django-...@googlegroups.com
#25191: Better error output for assertXMLEqual
-------------------------------------+-------------------------------------
Reporter: shelldweller | Owner:
Type: | caioariede
Cleanup/optimization | Status: closed

Component: Testing framework | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"62d4074005f68328b240ab5f4fdfe348896717da" 62d4074]:
{{{
#!CommitTicketReference repository=""
revision="62d4074005f68328b240ab5f4fdfe348896717da"
Fixed #25191 -- Added string diff to SimpleTestCase.assertXMLEqual()
message.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/25191#comment:7>

Reply all
Reply to author
Forward
0 new messages