#32556: assertHTMLEqual gives a confusing error message with empty attributes
-----------------------------------+--------------------------------------
     Reporter:  Baptiste Mispelon  |                    Owner:  nobody
         Type:  Uncategorized      |                   Status:  new
    Component:  Testing framework  |                  Version:  dev
     Severity:  Normal             |               Resolution:
     Keywords:                     |             Triage Stage:  Unreviewed
    Has patch:  0                  |      Needs documentation:  0
  Needs tests:  0                  |  Patch needs improvement:  0
Easy pickings:  0                  |                    UI/UX:  0
-----------------------------------+--------------------------------------
Description changed by Baptiste Mispelon:

Old description:

> If you try the following assertion:
> ```
> self.assertHTMLEqual('<input value>', '<input value="">')
> ```
>
> You get a test failure and the following message:
> ```
> AssertionError: <input value> != <input value>
>   <input value>
>
> ```
>
> I'm getting mixed signals here: either the test should pass or the error
> message should show the difference between the two strings.
>
> I'm not actually sure which option would be correct in this case so I'm
> leaving the ticket as "uncategorized" instead of "bug" or "cleanup".

New description:

 If you try the following assertion:
 {{{
 self.assertHTMLEqual('<input value>', '<input value="">')
 }}}

 You get a test failure and the following message:
 {{{
 AssertionError: <input value> != <input value>
   <input value>

 }}}

 I'm getting mixed signals here: either the test should pass or the error
 message should show the difference between the two strings.

 I'm not actually sure which option would be correct in this case so I'm
 leaving the ticket as "uncategorized" instead of "bug" or "cleanup".

--

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.e6ac4dec18a38c671331e25e77892042%40djangoproject.com.

Reply via email to