#27906: assertInHTML('<a/><b/>', '<a/><b/><c/>') fails
-------------------------------------+-------------------------------------
     Reporter:  Michal Petrucha      |                    Owner:  Michal
                                     |  Petrucha
         Type:  Bug                  |                   Status:  assigned
    Component:  Testing framework    |                  Version:  master
     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 Michal Petrucha:

Old description:

> 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`.

New description:

 As the title indicates, HTML substring search 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#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 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/066.813f533a892a99ee7cf1dac1ca5d1406%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to