Opened 4 years ago

Closed 4 years ago

#19148 closed Bug (fixed)

regressiontests.test_utils.tests.HTMLEqualTests.test_parse_html_in_script() fails with Python 2.6.8

Reported by: Arfrever Owned by: nobody
Component: Core (Other) Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


regressiontests.test_utils.tests.HTMLEqualTests.test_parse_html_in_script() fails with Python 2.6.8 in Django 1.4.2. This test passed in Django 1.4.1.

ERROR: test_parse_html_in_script (regressiontests.test_utils.tests.HTMLEqualTests)
Traceback (most recent call last):
  File "/tmp/Django-1.4.2/tests/regressiontests/test_utils/", line 224, in test_parse_html_in_script
  File "/tmp/Django-1.4.2/django/test/", line 213, in parse_html
  File "/usr/lib64/python2.6/", line 108, in feed
  File "/usr/lib64/python2.6/", line 150, in goahead
    k = self.parse_endtag(i)
  File "/usr/lib64/python2.6/", line 319, in parse_endtag
  File "/tmp/Django-1.4.2/django/test/", line 191, in handle_endtag
    tag, self.format_position()))
  File "/tmp/Django-1.4.2/django/test/", line 153, in error
    raise HTMLParseError(msg, self.getpos())
HTMLParseError: Unexpected end tag `p` (Line 3, Column 35), at line 3, column 36


Change History (2)

comment:1 Changed 4 years ago by claudep

  • Component changed from Uncategorized to Core (Other)
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Ready for checkin
  • Type changed from Uncategorized to Bug

Right, we forgot to backport [fcec904e4f35]. See also #18239.

comment:2 Changed 4 years ago by Claude Paroz <claude@…>

  • Resolution set to fixed
  • Status changed from new to closed

In ce168bb8994b0a7e032166e63a8b1cec034694d6:

[1.4.x] Fix an HTML-parser test that's failed in Python 2.6.8 since 5c79dd58.

The problem description in #18239 asserted that was fixed in Python 2.6.8, but based on it appears that's not correct; the
fix was only applied in 2.7, 3.2, and Python trunk. Therefore we must use our
patched HTMLParser subclass in all Python 2.6 versions.

Backport of fcec904e4f from master. Fixes #19148.

Note: See TracTickets for help on using tickets.
Back to Top