#27906: assertContains('<a/><b/><c/>', '<a/><b/>', html=True) fails
-------------------------------------+-------------------------------------
               Reporter:  Michal     |          Owner:  Michal Petrucha
  Petrucha                           |
                   Type:  Bug        |         Status:  assigned
              Component:  Testing    |        Version:  master
  framework                          |
               Severity:  Normal     |       Keywords:
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 As the title indicates, `assertContains` in HTML mode fails to find
 matches in the haystack if the needle consists of multiple sibling
 elements that do appear in the haystack with more siblings on the same
 level.

 This is a follow-up to #24112, which fixed the simple case when the list
 of children of an element matches exactly the list of children of the
 needle.

 A simple, but somewhat sub-optimal solution could be to use two nested
 loops to compare the children of `self` with the children of the root
 element; an optimal, but much more complex solution would be to implement
 a variant of KMP on the children of `self`.

--
Ticket URL: <https://code.djangoproject.com/ticket/27906>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/051.fbbe4de68c0e36f229785699d06ea9c3%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to