Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test failure with lxml-3.5.0 #224

Closed
jlec opened this issue Jan 15, 2016 · 5 comments

Comments

@jlec
Copy link

commented Jan 15, 2016

I see the following test failure with lxml-3.5.0 (3.4.0 is fine) and html5lib-0.9999999

======================================================================
ERROR: html5lib.tests.test_treewalkers.test_treewalker(None, u'<!-----><font><div>hello<table>excite!<b>me!<th><i>please!</tr><!--X-->', u'| <!-- - -->\n| <html>\n|   <head>\n|   <body>\n|     <font>\n|       <div>\n|         "helloexcite!"\n|         <b>\n|           "me!"\n|         <table>\n|           <tbody>\n|             <tr>\n|               <th>\n|                 <i>\n|                   "please!"\n|             <!-- X -->', [u"Line: 1 Col: 7 Unexpected '-' after '--' found in comment.", u'Line: 1 Col: 14 Unexpected start tag (font). Expected DOCTYPE.', u'Line: 1 Col: 38 Unexpected non-space characters in table context caused voodoo mode.', u'Line: 1 Col: 41 Unexpected start tag (b) in table context caused voodoo mode.', u'Line: 1 Col: 48 Unexpected implied end tag (b) in the table phase.', u'Line: 1 Col: 48 Unexpected table cell start tag (th) in the table body phase.', u'Line: 1 Col: 63 Got table cell end tag (th) while required end tags are missing.', u'Line: 1 Col: 71 Unexpected end of file. Expected table content.'], {u'walker': <class 'html5lib.treewalkers.lxmletree.TreeWalker'>, u'builder': <class 'html5lib.treebuilders.etree_lxml.TreeBuilder'>})
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_treewalkers.py", line 184, in runTreewalkerTest
    document = p.parse(input)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 236, in parse
    parseMeta=parseMeta, useChardet=useChardet)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 94, in _parse
    self.mainLoop()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 199, in mainLoop
    new_token = phase.processStartTag(new_token)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 648, in processStartTag
    self.insertHtmlElement()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 627, in insertHtmlElement
    self.tree.insertRoot(impliedTagToken("html", "StartTag"))
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree_lxml.py", line 347, in insertRoot
    root.addprevious(etree.Comment(comment_token["data"]))
  File "src/lxml/lxml.etree.pyx", line 3017, in lxml.etree.Comment (src/lxml/lxml.etree.c:80806)
ValueError: Comment may not contain '--' or end with '-'

======================================================================
ERROR: html5lib.tests.test_treewalkers.test_treewalker(None, u'<?COM--MENT?>', u'| <!-- ?COM--MENT? -->\n| <html>\n|   <head>\n|   <body>', [u"Line: 1 Col: 1 Expected tag name. Got '?' instead. (HTML doesn't support processing instructions.)", u'Line: 1 Col: 13 Unexpected End of file. Expected DOCTYPE.'], {u'walker': <class 'html5lib.treewalkers.lxmletree.TreeWalker'>, u'builder': <class 'html5lib.treebuilders.etree_lxml.TreeBuilder'>})
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_treewalkers.py", line 184, in runTreewalkerTest
    document = p.parse(input)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 236, in parse
    parseMeta=parseMeta, useChardet=useChardet)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 94, in _parse
    self.mainLoop()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 217, in mainLoop
    reprocess = self.phase.processEOF()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 632, in processEOF
    self.insertHtmlElement()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 627, in insertHtmlElement
    self.tree.insertRoot(impliedTagToken("html", "StartTag"))
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree_lxml.py", line 347, in insertRoot
    root.addprevious(etree.Comment(comment_token["data"]))
  File "src/lxml/lxml.etree.pyx", line 3017, in lxml.etree.Comment (src/lxml/lxml.etree.c:80806)
ValueError: Comment may not contain '--' or end with '-'

======================================================================
ERROR: html5lib.tests.test_treewalkers.test_treewalker(None, u'<!COM--MENT>', u'| <!-- COM--MENT -->\n| <html>\n|   <head>\n|   <body>', [u"Line: 1 Col: 2 Expected '--' or 'DOCTYPE'. Not found.", u'Line: 1 Col: 12 Unexpected End of file. Expected DOCTYPE.'], {u'walker': <class 'html5lib.treewalkers.lxmletree.TreeWalker'>, u'builder': <class 'html5lib.treebuilders.etree_lxml.TreeBuilder'>})
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_treewalkers.py", line 184, in runTreewalkerTest
    document = p.parse(input)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 236, in parse
    parseMeta=parseMeta, useChardet=useChardet)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 94, in _parse
    self.mainLoop()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 217, in mainLoop
    reprocess = self.phase.processEOF()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 632, in processEOF
    self.insertHtmlElement()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 627, in insertHtmlElement
    self.tree.insertRoot(impliedTagToken("html", "StartTag"))
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree_lxml.py", line 347, in insertRoot
    root.addprevious(etree.Comment(comment_token["data"]))
  File "src/lxml/lxml.etree.pyx", line 3017, in lxml.etree.Comment (src/lxml/lxml.etree.c:80806)
ValueError: Comment may not contain '--' or end with '-'

======================================================================
ERROR: html5lib.tests.test_treewalkers.test_treewalker(None, u'</ COM--MENT >', u'| <!--  COM--MENT  -->\n| <html>\n|   <head>\n|   <body>', [u"Line: 1 Col: 2 Expected closing tag. Unexpected character ' ' found.", u'Line: 1 Col: 14 Unexpected End of file. Expected DOCTYPE.'], {u'walker': <class 'html5lib.treewalkers.lxmletree.TreeWalker'>, u'builder': <class 'html5lib.treebuilders.etree_lxml.TreeBuilder'>})
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_treewalkers.py", line 184, in runTreewalkerTest
    document = p.parse(input)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 236, in parse
    parseMeta=parseMeta, useChardet=useChardet)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 94, in _parse
    self.mainLoop()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 217, in mainLoop
    reprocess = self.phase.processEOF()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 632, in processEOF
    self.insertHtmlElement()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 627, in insertHtmlElement
    self.tree.insertRoot(impliedTagToken("html", "StartTag"))
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree_lxml.py", line 347, in insertRoot
    root.addprevious(etree.Comment(comment_token["data"]))
  File "src/lxml/lxml.etree.pyx", line 3017, in lxml.etree.Comment (src/lxml/lxml.etree.c:80806)
ValueError: Comment may not contain '--' or end with '-'

======================================================================
ERROR: html5lib.tests.test_treewalkers.test_treewalker(None, u'<!--foo--bar-->', u'| <!-- foo--bar -->\n| <html>\n|   <head>\n|   <body>', [u''], {u'walker': <class 'html5lib.treewalkers.lxmletree.TreeWalker'>, u'builder': <class 'html5lib.treebuilders.etree_lxml.TreeBuilder'>})
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_treewalkers.py", line 184, in runTreewalkerTest
    document = p.parse(input)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 236, in parse
    parseMeta=parseMeta, useChardet=useChardet)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 94, in _parse
    self.mainLoop()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 217, in mainLoop
    reprocess = self.phase.processEOF()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 632, in processEOF
    self.insertHtmlElement()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 627, in insertHtmlElement
    self.tree.insertRoot(impliedTagToken("html", "StartTag"))
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree_lxml.py", line 347, in insertRoot
    root.addprevious(etree.Comment(comment_token["data"]))
  File "src/lxml/lxml.etree.pyx", line 3017, in lxml.etree.Comment (src/lxml/lxml.etree.c:80806)
ValueError: Comment may not contain '--' or end with '-'

======================================================================
ERROR: html5lib.tests.test_treewalkers.test_treewalker(None, u'FOO<!-- BAR --   >BAZ', u'| <html>\n|   <head>\n|   <body>\n|     "FOO"\n|     <!--  BAR --   >BAZ -->', [u''], {u'walker': <class 'html5lib.treewalkers.lxmletree.TreeWalker'>, u'builder': <class 'html5lib.treebuilders.etree_lxml.TreeBuilder'>})
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_treewalkers.py", line 184, in runTreewalkerTest
    document = p.parse(input)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 236, in parse
    parseMeta=parseMeta, useChardet=useChardet)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 94, in _parse
    self.mainLoop()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 203, in mainLoop
    new_token = phase.processComment(new_token)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 468, in processComment
    self.tree.insertComment(token, self.tree.openElements[-1])
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree_lxml.py", line 312, in insertCommentMain
    super(TreeBuilder, self).insertComment(data, parent)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/_base.py", line 262, in insertComment
    parent.appendChild(self.commentClass(token["data"]))
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree.py", line 148, in __init__
    self._element = ElementTree.Comment(data)
  File "src/lxml/lxml.etree.pyx", line 3017, in lxml.etree.Comment (src/lxml/lxml.etree.c:80806)
ValueError: Comment may not contain '--' or end with '-'

======================================================================
ERROR: html5lib.tests.test_treewalkers.test_treewalker(None, u'FOO<!-- BAR -- <QUX> -- MUX -->BAZ', u'| <html>\n|   <head>\n|   <body>\n|     "FOO"\n|     <!--  BAR -- <QUX> -- MUX  -->\n|     "BAZ"', [u''], {u'walker': <class 'html5lib.treewalkers.lxmletree.TreeWalker'>, u'builder': <class 'html5lib.treebuilders.etree_lxml.TreeBuilder'>})
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_treewalkers.py", line 184, in runTreewalkerTest
    document = p.parse(input)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 236, in parse
    parseMeta=parseMeta, useChardet=useChardet)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 94, in _parse
    self.mainLoop()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 203, in mainLoop
    new_token = phase.processComment(new_token)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 468, in processComment
    self.tree.insertComment(token, self.tree.openElements[-1])
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree_lxml.py", line 312, in insertCommentMain
    super(TreeBuilder, self).insertComment(data, parent)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/_base.py", line 262, in insertComment
    parent.appendChild(self.commentClass(token["data"]))
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree.py", line 148, in __init__
    self._element = ElementTree.Comment(data)
  File "src/lxml/lxml.etree.pyx", line 3017, in lxml.etree.Comment (src/lxml/lxml.etree.c:80806)
ValueError: Comment may not contain '--' or end with '-'

======================================================================
ERROR: html5lib.tests.test_treewalkers.test_treewalker(None, u'FOO<!-- BAR -- <QUX> -- MUX --!>BAZ', u'| <html>\n|   <head>\n|   <body>\n|     "FOO"\n|     <!--  BAR -- <QUX> -- MUX  -->\n|     "BAZ"', [u''], {u'walker': <class 'html5lib.treewalkers.lxmletree.TreeWalker'>, u'builder': <class 'html5lib.treebuilders.etree_lxml.TreeBuilder'>})
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_treewalkers.py", line 184, in runTreewalkerTest
    document = p.parse(input)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 236, in parse
    parseMeta=parseMeta, useChardet=useChardet)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 94, in _parse
    self.mainLoop()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 203, in mainLoop
    new_token = phase.processComment(new_token)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 468, in processComment
    self.tree.insertComment(token, self.tree.openElements[-1])
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree_lxml.py", line 312, in insertCommentMain
    super(TreeBuilder, self).insertComment(data, parent)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/_base.py", line 262, in insertComment
    parent.appendChild(self.commentClass(token["data"]))
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree.py", line 148, in __init__
    self._element = ElementTree.Comment(data)
  File "src/lxml/lxml.etree.pyx", line 3017, in lxml.etree.Comment (src/lxml/lxml.etree.c:80806)
ValueError: Comment may not contain '--' or end with '-'

======================================================================
ERROR: html5lib.tests.test_treewalkers.test_treewalker(None, u'FOO<!-- BAR -- <QUX> -- MUX -- >BAZ', u'| <html>\n|   <head>\n|   <body>\n|     "FOO"\n|     <!--  BAR -- <QUX> -- MUX -- >BAZ -->', [u''], {u'walker': <class 'html5lib.treewalkers.lxmletree.TreeWalker'>, u'builder': <class 'html5lib.treebuilders.etree_lxml.TreeBuilder'>})
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_treewalkers.py", line 184, in runTreewalkerTest
    document = p.parse(input)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 236, in parse
    parseMeta=parseMeta, useChardet=useChardet)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 94, in _parse
    self.mainLoop()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 203, in mainLoop
    new_token = phase.processComment(new_token)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 468, in processComment
    self.tree.insertComment(token, self.tree.openElements[-1])
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree_lxml.py", line 312, in insertCommentMain
    super(TreeBuilder, self).insertComment(data, parent)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/_base.py", line 262, in insertComment
    parent.appendChild(self.commentClass(token["data"]))
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree.py", line 148, in __init__
    self._element = ElementTree.Comment(data)
  File "src/lxml/lxml.etree.pyx", line 3017, in lxml.etree.Comment (src/lxml/lxml.etree.c:80806)
ValueError: Comment may not contain '--' or end with '-'

======================================================================
ERROR: html5lib.tests.test_treewalkers.test_treewalker(None, u'FOO<!----->BAZ', u'| <html>\n|   <head>\n|   <body>\n|     "FOO"\n|     <!-- - -->\n|     "BAZ"', [u''], {u'walker': <class 'html5lib.treewalkers.lxmletree.TreeWalker'>, u'builder': <class 'html5lib.treebuilders.etree_lxml.TreeBuilder'>})
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_treewalkers.py", line 184, in runTreewalkerTest
    document = p.parse(input)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 236, in parse
    parseMeta=parseMeta, useChardet=useChardet)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 94, in _parse
    self.mainLoop()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 203, in mainLoop
    new_token = phase.processComment(new_token)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 468, in processComment
    self.tree.insertComment(token, self.tree.openElements[-1])
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree_lxml.py", line 312, in insertCommentMain
    super(TreeBuilder, self).insertComment(data, parent)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/_base.py", line 262, in insertComment
    parent.appendChild(self.commentClass(token["data"]))
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree.py", line 148, in __init__
    self._element = ElementTree.Comment(data)
  File "src/lxml/lxml.etree.pyx", line 3017, in lxml.etree.Comment (src/lxml/lxml.etree.c:80806)
ValueError: Comment may not contain '--' or end with '-'

======================================================================
FAIL: html5lib.tests.test_parser.test_parser(None, u'<!DOCTYPE <!DOCTYPE HTML>><!--<!--x-->-->', u'| <!DOCTYPE <!doctype>\n| <html>\n|   <head>\n|   <body>\n|     ">"\n|     <!-- <!--x -->\n|     "-->"', [u"Line: 1 Col: 20 Expected space or '>'. Got ''", u'Line: 1 Col: 25 Erroneous DOCTYPE.', u'Line: 1 Col: 35 Unexpected character in comment found.'], <class 'html5lib.treebuilders.etree_lxml.TreeBuilder'>, True)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 43, in runParserTest
    assert False, errorMsg
AssertionError:

Input:
<!DOCTYPE <!DOCTYPE HTML>><!--<!--x-->-->

Expected:
| <!DOCTYPE <!doctype>
| <html>
|   <head>
|   <body>
|     ">"
|     <!-- <!--x -->
|     "-->"

Traceback:
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 39, in runParserTest
    document = p.parse(input)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 236, in parse
    parseMeta=parseMeta, useChardet=useChardet)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 94, in _parse
    self.mainLoop()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 203, in mainLoop
    new_token = phase.processComment(new_token)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 468, in processComment
    self.tree.insertComment(token, self.tree.openElements[-1])
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree_lxml.py", line 312, in insertCommentMain
    super(TreeBuilder, self).insertComment(data, parent)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/_base.py", line 262, in insertComment
    parent.appendChild(self.commentClass(token["data"]))
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree.py", line 148, in __init__
    self._element = ElementTree.Comment(data)
  File "src/lxml/lxml.etree.pyx", line 3017, in lxml.etree.Comment (src/lxml/lxml.etree.c:80806)
ValueError: Comment may not contain '--' or end with '-'


======================================================================
FAIL: html5lib.tests.test_parser.test_parser(None, u'<!DOCTYPE <!DOCTYPE HTML>><!--<!--x-->-->', u'| <!DOCTYPE <!doctype>\n| <html>\n|   <head>\n|   <body>\n|     ">"\n|     <!-- <!--x -->\n|     "-->"', [u"Line: 1 Col: 20 Expected space or '>'. Got ''", u'Line: 1 Col: 25 Erroneous DOCTYPE.', u'Line: 1 Col: 35 Unexpected character in comment found.'], <class 'html5lib.treebuilders.etree_lxml.TreeBuilder'>, False)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 43, in runParserTest
    assert False, errorMsg
AssertionError:

Input:
<!DOCTYPE <!DOCTYPE HTML>><!--<!--x-->-->

Expected:
| <!DOCTYPE <!doctype>
| <html>
|   <head>
|   <body>
|     ">"
|     <!-- <!--x -->
|     "-->"

Traceback:
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 39, in runParserTest
    document = p.parse(input)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 236, in parse
    parseMeta=parseMeta, useChardet=useChardet)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 94, in _parse
    self.mainLoop()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 203, in mainLoop
    new_token = phase.processComment(new_token)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 468, in processComment
    self.tree.insertComment(token, self.tree.openElements[-1])
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree_lxml.py", line 312, in insertCommentMain
    super(TreeBuilder, self).insertComment(data, parent)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/_base.py", line 262, in insertComment
    parent.appendChild(self.commentClass(token["data"]))
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree.py", line 148, in __init__
    self._element = ElementTree.Comment(data)
  File "src/lxml/lxml.etree.pyx", line 3017, in lxml.etree.Comment (src/lxml/lxml.etree.c:80806)
ValueError: Comment may not contain '--' or end with '-'


======================================================================
FAIL: html5lib.tests.test_parser.test_parser(None, u'<!-----><font><div>hello<table>excite!<b>me!<th><i>please!</tr><!--X-->', u'| <!-- - -->\n| <html>\n|   <head>\n|   <body>\n|     <font>\n|       <div>\n|         "helloexcite!"\n|         <b>\n|           "me!"\n|         <table>\n|           <tbody>\n|             <tr>\n|               <th>\n|                 <i>\n|                   "please!"\n|             <!-- X -->', [u"Line: 1 Col: 7 Unexpected '-' after '--' found in comment.", u'Line: 1 Col: 14 Unexpected start tag (font). Expected DOCTYPE.', u'Line: 1 Col: 38 Unexpected non-space characters in table context caused voodoo mode.', u'Line: 1 Col: 41 Unexpected start tag (b) in table context caused voodoo mode.', u'Line: 1 Col: 48 Unexpected implied end tag (b) in the table phase.', u'Line: 1 Col: 48 Unexpected table cell start tag (th) in the table body phase.', u'Line: 1 Col: 63 Got table cell end tag (th) while required end tags are missing.', u'Line: 1 Col: 71 Unexpected end of file. Expected table content.'], <class 'html5lib.treebuilders.etree_lxml.TreeBuilder'>, True)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 43, in runParserTest
    assert False, errorMsg
AssertionError:

Input:
<!-----><font><div>hello<table>excite!<b>me!<th><i>please!</tr><!--X-->

Expected:
| <!-- - -->
| <html>
|   <head>
|   <body>
|     <font>
|       <div>
|         "helloexcite!"
|         <b>
|           "me!"
|         <table>
|           <tbody>
|             <tr>
|               <th>
|                 <i>
|                   "please!"
|             <!-- X -->

Traceback:
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 39, in runParserTest
    document = p.parse(input)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 236, in parse
    parseMeta=parseMeta, useChardet=useChardet)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 94, in _parse
    self.mainLoop()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 199, in mainLoop
    new_token = phase.processStartTag(new_token)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 648, in processStartTag
    self.insertHtmlElement()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 627, in insertHtmlElement
    self.tree.insertRoot(impliedTagToken("html", "StartTag"))
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree_lxml.py", line 347, in insertRoot
    root.addprevious(etree.Comment(comment_token["data"]))
  File "src/lxml/lxml.etree.pyx", line 3017, in lxml.etree.Comment (src/lxml/lxml.etree.c:80806)
ValueError: Comment may not contain '--' or end with '-'


======================================================================
FAIL: html5lib.tests.test_parser.test_parser(None, u'<!-----><font><div>hello<table>excite!<b>me!<th><i>please!</tr><!--X-->', u'| <!-- - -->\n| <html>\n|   <head>\n|   <body>\n|     <font>\n|       <div>\n|         "helloexcite!"\n|         <b>\n|           "me!"\n|         <table>\n|           <tbody>\n|             <tr>\n|               <th>\n|                 <i>\n|                   "please!"\n|             <!-- X -->', [u"Line: 1 Col: 7 Unexpected '-' after '--' found in comment.", u'Line: 1 Col: 14 Unexpected start tag (font). Expected DOCTYPE.', u'Line: 1 Col: 38 Unexpected non-space characters in table context caused voodoo mode.', u'Line: 1 Col: 41 Unexpected start tag (b) in table context caused voodoo mode.', u'Line: 1 Col: 48 Unexpected implied end tag (b) in the table phase.', u'Line: 1 Col: 48 Unexpected table cell start tag (th) in the table body phase.', u'Line: 1 Col: 63 Got table cell end tag (th) while required end tags are missing.', u'Line: 1 Col: 71 Unexpected end of file. Expected table content.'], <class 'html5lib.treebuilders.etree_lxml.TreeBuilder'>, False)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 43, in runParserTest
    assert False, errorMsg
AssertionError:

Input:
<!-----><font><div>hello<table>excite!<b>me!<th><i>please!</tr><!--X-->

Expected:
| <!-- - -->
| <html>
|   <head>
|   <body>
|     <font>
|       <div>
|         "helloexcite!"
|         <b>
|           "me!"
|         <table>
|           <tbody>
|             <tr>
|               <th>
|                 <i>
|                   "please!"
|             <!-- X -->

Traceback:
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 39, in runParserTest
    document = p.parse(input)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 236, in parse
    parseMeta=parseMeta, useChardet=useChardet)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 94, in _parse
    self.mainLoop()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 199, in mainLoop
    new_token = phase.processStartTag(new_token)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 648, in processStartTag
    self.insertHtmlElement()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 627, in insertHtmlElement
    self.tree.insertRoot(impliedTagToken("html", "StartTag"))
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree_lxml.py", line 347, in insertRoot
    root.addprevious(etree.Comment(comment_token["data"]))
  File "src/lxml/lxml.etree.pyx", line 3017, in lxml.etree.Comment (src/lxml/lxml.etree.c:80806)
ValueError: Comment may not contain '--' or end with '-'


======================================================================
FAIL: html5lib.tests.test_parser.test_parser(None, u'<?COM--MENT?>', u'| <!-- ?COM--MENT? -->\n| <html>\n|   <head>\n|   <body>', [u"Line: 1 Col: 1 Expected tag name. Got '?' instead. (HTML doesn't support processing instructions.)", u'Line: 1 Col: 13 Unexpected End of file. Expected DOCTYPE.'], <class 'html5lib.treebuilders.etree_lxml.TreeBuilder'>, True)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 43, in runParserTest
    assert False, errorMsg
AssertionError:

Input:
<?COM--MENT?>

Expected:
| <!-- ?COM--MENT? -->
| <html>
|   <head>
|   <body>

Traceback:
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 39, in runParserTest
    document = p.parse(input)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 236, in parse
    parseMeta=parseMeta, useChardet=useChardet)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 94, in _parse
    self.mainLoop()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 217, in mainLoop
    reprocess = self.phase.processEOF()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 632, in processEOF
    self.insertHtmlElement()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 627, in insertHtmlElement
    self.tree.insertRoot(impliedTagToken("html", "StartTag"))
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree_lxml.py", line 347, in insertRoot
    root.addprevious(etree.Comment(comment_token["data"]))
  File "src/lxml/lxml.etree.pyx", line 3017, in lxml.etree.Comment (src/lxml/lxml.etree.c:80806)
ValueError: Comment may not contain '--' or end with '-'


======================================================================
FAIL: html5lib.tests.test_parser.test_parser(None, u'<?COM--MENT?>', u'| <!-- ?COM--MENT? -->\n| <html>\n|   <head>\n|   <body>', [u"Line: 1 Col: 1 Expected tag name. Got '?' instead. (HTML doesn't support processing instructions.)", u'Line: 1 Col: 13 Unexpected End of file. Expected DOCTYPE.'], <class 'html5lib.treebuilders.etree_lxml.TreeBuilder'>, False)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 43, in runParserTest
    assert False, errorMsg
AssertionError:

Input:
<?COM--MENT?>

Expected:
| <!-- ?COM--MENT? -->
| <html>
|   <head>
|   <body>

Traceback:
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 39, in runParserTest
    document = p.parse(input)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 236, in parse
    parseMeta=parseMeta, useChardet=useChardet)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 94, in _parse
    self.mainLoop()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 217, in mainLoop
    reprocess = self.phase.processEOF()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 632, in processEOF
    self.insertHtmlElement()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 627, in insertHtmlElement
    self.tree.insertRoot(impliedTagToken("html", "StartTag"))
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree_lxml.py", line 347, in insertRoot
    root.addprevious(etree.Comment(comment_token["data"]))
  File "src/lxml/lxml.etree.pyx", line 3017, in lxml.etree.Comment (src/lxml/lxml.etree.c:80806)
ValueError: Comment may not contain '--' or end with '-'


======================================================================
FAIL: html5lib.tests.test_parser.test_parser(None, u'<!COM--MENT>', u'| <!-- COM--MENT -->\n| <html>\n|   <head>\n|   <body>', [u"Line: 1 Col: 2 Expected '--' or 'DOCTYPE'. Not found.", u'Line: 1 Col: 12 Unexpected End of file. Expected DOCTYPE.'], <class 'html5lib.treebuilders.etree_lxml.TreeBuilder'>, True)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 43, in runParserTest
    assert False, errorMsg
AssertionError:

Input:
<!COM--MENT>

Expected:
| <!-- COM--MENT -->
| <html>
|   <head>
|   <body>

Traceback:
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 39, in runParserTest
    document = p.parse(input)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 236, in parse
    parseMeta=parseMeta, useChardet=useChardet)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 94, in _parse
    self.mainLoop()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 217, in mainLoop
    reprocess = self.phase.processEOF()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 632, in processEOF
    self.insertHtmlElement()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 627, in insertHtmlElement
    self.tree.insertRoot(impliedTagToken("html", "StartTag"))
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree_lxml.py", line 347, in insertRoot
    root.addprevious(etree.Comment(comment_token["data"]))
  File "src/lxml/lxml.etree.pyx", line 3017, in lxml.etree.Comment (src/lxml/lxml.etree.c:80806)
ValueError: Comment may not contain '--' or end with '-'


======================================================================
FAIL: html5lib.tests.test_parser.test_parser(None, u'<!COM--MENT>', u'| <!-- COM--MENT -->\n| <html>\n|   <head>\n|   <body>', [u"Line: 1 Col: 2 Expected '--' or 'DOCTYPE'. Not found.", u'Line: 1 Col: 12 Unexpected End of file. Expected DOCTYPE.'], <class 'html5lib.treebuilders.etree_lxml.TreeBuilder'>, False)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 43, in runParserTest
    assert False, errorMsg
AssertionError:

Input:
<!COM--MENT>

Expected:
| <!-- COM--MENT -->
| <html>
|   <head>
|   <body>

Traceback:
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 39, in runParserTest
    document = p.parse(input)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 236, in parse
    parseMeta=parseMeta, useChardet=useChardet)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 94, in _parse
    self.mainLoop()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 217, in mainLoop
    reprocess = self.phase.processEOF()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 632, in processEOF
    self.insertHtmlElement()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 627, in insertHtmlElement
    self.tree.insertRoot(impliedTagToken("html", "StartTag"))
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree_lxml.py", line 347, in insertRoot
    root.addprevious(etree.Comment(comment_token["data"]))
  File "src/lxml/lxml.etree.pyx", line 3017, in lxml.etree.Comment (src/lxml/lxml.etree.c:80806)
ValueError: Comment may not contain '--' or end with '-'


======================================================================
FAIL: html5lib.tests.test_parser.test_parser(None, u'</ COM--MENT >', u'| <!--  COM--MENT  -->\n| <html>\n|   <head>\n|   <body>', [u"Line: 1 Col: 2 Expected closing tag. Unexpected character ' ' found.", u'Line: 1 Col: 14 Unexpected End of file. Expected DOCTYPE.'], <class 'html5lib.treebuilders.etree_lxml.TreeBuilder'>, True)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 43, in runParserTest
    assert False, errorMsg
AssertionError:

Input:
</ COM--MENT >

Expected:
| <!--  COM--MENT  -->
| <html>
|   <head>
|   <body>

Traceback:
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 39, in runParserTest
    document = p.parse(input)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 236, in parse
    parseMeta=parseMeta, useChardet=useChardet)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 94, in _parse
    self.mainLoop()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 217, in mainLoop
    reprocess = self.phase.processEOF()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 632, in processEOF
    self.insertHtmlElement()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 627, in insertHtmlElement
    self.tree.insertRoot(impliedTagToken("html", "StartTag"))
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree_lxml.py", line 347, in insertRoot
    root.addprevious(etree.Comment(comment_token["data"]))
  File "src/lxml/lxml.etree.pyx", line 3017, in lxml.etree.Comment (src/lxml/lxml.etree.c:80806)
ValueError: Comment may not contain '--' or end with '-'


======================================================================
FAIL: html5lib.tests.test_parser.test_parser(None, u'</ COM--MENT >', u'| <!--  COM--MENT  -->\n| <html>\n|   <head>\n|   <body>', [u"Line: 1 Col: 2 Expected closing tag. Unexpected character ' ' found.", u'Line: 1 Col: 14 Unexpected End of file. Expected DOCTYPE.'], <class 'html5lib.treebuilders.etree_lxml.TreeBuilder'>, False)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 43, in runParserTest
    assert False, errorMsg
AssertionError:

Input:
</ COM--MENT >

Expected:
| <!--  COM--MENT  -->
| <html>
|   <head>
|   <body>

Traceback:
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 39, in runParserTest
    document = p.parse(input)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 236, in parse
    parseMeta=parseMeta, useChardet=useChardet)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 94, in _parse
    self.mainLoop()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 217, in mainLoop
    reprocess = self.phase.processEOF()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 632, in processEOF
    self.insertHtmlElement()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 627, in insertHtmlElement
    self.tree.insertRoot(impliedTagToken("html", "StartTag"))
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree_lxml.py", line 347, in insertRoot
    root.addprevious(etree.Comment(comment_token["data"]))
  File "src/lxml/lxml.etree.pyx", line 3017, in lxml.etree.Comment (src/lxml/lxml.etree.c:80806)
ValueError: Comment may not contain '--' or end with '-'


======================================================================
FAIL: html5lib.tests.test_parser.test_parser(None, u'<!--foo--bar-->', u'| <!-- foo--bar -->\n| <html>\n|   <head>\n|   <body>', u'', <class 'html5lib.treebuilders.etree_lxml.TreeBuilder'>, True)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 43, in runParserTest
    assert False, errorMsg
AssertionError:

Input:
<!--foo--bar-->

Expected:
| <!-- foo--bar -->
| <html>
|   <head>
|   <body>

Traceback:
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 39, in runParserTest
    document = p.parse(input)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 236, in parse
    parseMeta=parseMeta, useChardet=useChardet)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 94, in _parse
    self.mainLoop()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 217, in mainLoop
    reprocess = self.phase.processEOF()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 632, in processEOF
    self.insertHtmlElement()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 627, in insertHtmlElement
    self.tree.insertRoot(impliedTagToken("html", "StartTag"))
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree_lxml.py", line 347, in insertRoot
    root.addprevious(etree.Comment(comment_token["data"]))
  File "src/lxml/lxml.etree.pyx", line 3017, in lxml.etree.Comment (src/lxml/lxml.etree.c:80806)
ValueError: Comment may not contain '--' or end with '-'


======================================================================
FAIL: html5lib.tests.test_parser.test_parser(None, u'<!--foo--bar-->', u'| <!-- foo--bar -->\n| <html>\n|   <head>\n|   <body>', u'', <class 'html5lib.treebuilders.etree_lxml.TreeBuilder'>, False)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 43, in runParserTest
    assert False, errorMsg
AssertionError:

Input:
<!--foo--bar-->

Expected:
| <!-- foo--bar -->
| <html>
|   <head>
|   <body>

Traceback:
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 39, in runParserTest
    document = p.parse(input)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 236, in parse
    parseMeta=parseMeta, useChardet=useChardet)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 94, in _parse
    self.mainLoop()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 217, in mainLoop
    reprocess = self.phase.processEOF()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 632, in processEOF
    self.insertHtmlElement()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 627, in insertHtmlElement
    self.tree.insertRoot(impliedTagToken("html", "StartTag"))
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree_lxml.py", line 347, in insertRoot
    root.addprevious(etree.Comment(comment_token["data"]))
  File "src/lxml/lxml.etree.pyx", line 3017, in lxml.etree.Comment (src/lxml/lxml.etree.c:80806)
ValueError: Comment may not contain '--' or end with '-'


======================================================================
FAIL: html5lib.tests.test_parser.test_parser(None, u'FOO<!-- BAR --   >BAZ', u'| <html>\n|   <head>\n|   <body>\n|     "FOO"\n|     <!--  BAR --   >BAZ -->', u'', <class 'html5lib.treebuilders.etree_lxml.TreeBuilder'>, True)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 43, in runParserTest
    assert False, errorMsg
AssertionError:

Input:
FOO<!-- BAR --   >BAZ

Expected:
| <html>
|   <head>
|   <body>
|     "FOO"
|     <!--  BAR --   >BAZ -->

Traceback:
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 39, in runParserTest
    document = p.parse(input)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 236, in parse
    parseMeta=parseMeta, useChardet=useChardet)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 94, in _parse
    self.mainLoop()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 203, in mainLoop
    new_token = phase.processComment(new_token)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 468, in processComment
    self.tree.insertComment(token, self.tree.openElements[-1])
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree_lxml.py", line 312, in insertCommentMain
    super(TreeBuilder, self).insertComment(data, parent)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/_base.py", line 262, in insertComment
    parent.appendChild(self.commentClass(token["data"]))
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree.py", line 148, in __init__
    self._element = ElementTree.Comment(data)
  File "src/lxml/lxml.etree.pyx", line 3017, in lxml.etree.Comment (src/lxml/lxml.etree.c:80806)
ValueError: Comment may not contain '--' or end with '-'


======================================================================
FAIL: html5lib.tests.test_parser.test_parser(None, u'FOO<!-- BAR --   >BAZ', u'| <html>\n|   <head>\n|   <body>\n|     "FOO"\n|     <!--  BAR --   >BAZ -->', u'', <class 'html5lib.treebuilders.etree_lxml.TreeBuilder'>, False)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 43, in runParserTest
    assert False, errorMsg
AssertionError:

Input:
FOO<!-- BAR --   >BAZ

Expected:
| <html>
|   <head>
|   <body>
|     "FOO"
|     <!--  BAR --   >BAZ -->

Traceback:
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 39, in runParserTest
    document = p.parse(input)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 236, in parse
    parseMeta=parseMeta, useChardet=useChardet)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 94, in _parse
    self.mainLoop()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 203, in mainLoop
    new_token = phase.processComment(new_token)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 468, in processComment
    self.tree.insertComment(token, self.tree.openElements[-1])
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree_lxml.py", line 312, in insertCommentMain
    super(TreeBuilder, self).insertComment(data, parent)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/_base.py", line 262, in insertComment
    parent.appendChild(self.commentClass(token["data"]))
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree.py", line 148, in __init__
    self._element = ElementTree.Comment(data)
  File "src/lxml/lxml.etree.pyx", line 3017, in lxml.etree.Comment (src/lxml/lxml.etree.c:80806)
ValueError: Comment may not contain '--' or end with '-'


======================================================================
FAIL: html5lib.tests.test_parser.test_parser(None, u'FOO<!-- BAR -- <QUX> -- MUX -->BAZ', u'| <html>\n|   <head>\n|   <body>\n|     "FOO"\n|     <!--  BAR -- <QUX> -- MUX  -->\n|     "BAZ"', u'', <class 'html5lib.treebuilders.etree_lxml.TreeBuilder'>, True)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 43, in runParserTest
    assert False, errorMsg
AssertionError:

Input:
FOO<!-- BAR -- <QUX> -- MUX -->BAZ

Expected:
| <html>
|   <head>
|   <body>
|     "FOO"
|     <!--  BAR -- <QUX> -- MUX  -->
|     "BAZ"

Traceback:
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 39, in runParserTest
    document = p.parse(input)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 236, in parse
    parseMeta=parseMeta, useChardet=useChardet)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 94, in _parse
    self.mainLoop()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 203, in mainLoop
    new_token = phase.processComment(new_token)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 468, in processComment
    self.tree.insertComment(token, self.tree.openElements[-1])
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree_lxml.py", line 312, in insertCommentMain
    super(TreeBuilder, self).insertComment(data, parent)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/_base.py", line 262, in insertComment
    parent.appendChild(self.commentClass(token["data"]))
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree.py", line 148, in __init__
    self._element = ElementTree.Comment(data)
  File "src/lxml/lxml.etree.pyx", line 3017, in lxml.etree.Comment (src/lxml/lxml.etree.c:80806)
ValueError: Comment may not contain '--' or end with '-'


======================================================================
FAIL: html5lib.tests.test_parser.test_parser(None, u'FOO<!-- BAR -- <QUX> -- MUX -->BAZ', u'| <html>\n|   <head>\n|   <body>\n|     "FOO"\n|     <!--  BAR -- <QUX> -- MUX  -->\n|     "BAZ"', u'', <class 'html5lib.treebuilders.etree_lxml.TreeBuilder'>, False)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 43, in runParserTest
    assert False, errorMsg
AssertionError:

Input:
FOO<!-- BAR -- <QUX> -- MUX -->BAZ

Expected:
| <html>
|   <head>
|   <body>
|     "FOO"
|     <!--  BAR -- <QUX> -- MUX  -->
|     "BAZ"

Traceback:
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 39, in runParserTest
    document = p.parse(input)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 236, in parse
    parseMeta=parseMeta, useChardet=useChardet)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 94, in _parse
    self.mainLoop()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 203, in mainLoop
    new_token = phase.processComment(new_token)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 468, in processComment
    self.tree.insertComment(token, self.tree.openElements[-1])
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree_lxml.py", line 312, in insertCommentMain
    super(TreeBuilder, self).insertComment(data, parent)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/_base.py", line 262, in insertComment
    parent.appendChild(self.commentClass(token["data"]))
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree.py", line 148, in __init__
    self._element = ElementTree.Comment(data)
  File "src/lxml/lxml.etree.pyx", line 3017, in lxml.etree.Comment (src/lxml/lxml.etree.c:80806)
ValueError: Comment may not contain '--' or end with '-'


======================================================================
FAIL: html5lib.tests.test_parser.test_parser(None, u'FOO<!-- BAR -- <QUX> -- MUX --!>BAZ', u'| <html>\n|   <head>\n|   <body>\n|     "FOO"\n|     <!--  BAR -- <QUX> -- MUX  -->\n|     "BAZ"', u'', <class 'html5lib.treebuilders.etree_lxml.TreeBuilder'>, True)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 43, in runParserTest
    assert False, errorMsg
AssertionError:

Input:
FOO<!-- BAR -- <QUX> -- MUX --!>BAZ

Expected:
| <html>
|   <head>
|   <body>
|     "FOO"
|     <!--  BAR -- <QUX> -- MUX  -->
|     "BAZ"

Traceback:
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 39, in runParserTest
    document = p.parse(input)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 236, in parse
    parseMeta=parseMeta, useChardet=useChardet)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 94, in _parse
    self.mainLoop()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 203, in mainLoop
    new_token = phase.processComment(new_token)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 468, in processComment
    self.tree.insertComment(token, self.tree.openElements[-1])
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree_lxml.py", line 312, in insertCommentMain
    super(TreeBuilder, self).insertComment(data, parent)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/_base.py", line 262, in insertComment
    parent.appendChild(self.commentClass(token["data"]))
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree.py", line 148, in __init__
    self._element = ElementTree.Comment(data)
  File "src/lxml/lxml.etree.pyx", line 3017, in lxml.etree.Comment (src/lxml/lxml.etree.c:80806)
ValueError: Comment may not contain '--' or end with '-'


======================================================================
FAIL: html5lib.tests.test_parser.test_parser(None, u'FOO<!-- BAR -- <QUX> -- MUX --!>BAZ', u'| <html>\n|   <head>\n|   <body>\n|     "FOO"\n|     <!--  BAR -- <QUX> -- MUX  -->\n|     "BAZ"', u'', <class 'html5lib.treebuilders.etree_lxml.TreeBuilder'>, False)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 43, in runParserTest
    assert False, errorMsg
AssertionError:

Input:
FOO<!-- BAR -- <QUX> -- MUX --!>BAZ

Expected:
| <html>
|   <head>
|   <body>
|     "FOO"
|     <!--  BAR -- <QUX> -- MUX  -->
|     "BAZ"

Traceback:
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 39, in runParserTest
    document = p.parse(input)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 236, in parse
    parseMeta=parseMeta, useChardet=useChardet)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 94, in _parse
    self.mainLoop()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 203, in mainLoop
    new_token = phase.processComment(new_token)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 468, in processComment
    self.tree.insertComment(token, self.tree.openElements[-1])
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree_lxml.py", line 312, in insertCommentMain
    super(TreeBuilder, self).insertComment(data, parent)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/_base.py", line 262, in insertComment
    parent.appendChild(self.commentClass(token["data"]))
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree.py", line 148, in __init__
    self._element = ElementTree.Comment(data)
  File "src/lxml/lxml.etree.pyx", line 3017, in lxml.etree.Comment (src/lxml/lxml.etree.c:80806)
ValueError: Comment may not contain '--' or end with '-'


======================================================================
FAIL: html5lib.tests.test_parser.test_parser(None, u'FOO<!-- BAR -- <QUX> -- MUX -- >BAZ', u'| <html>\n|   <head>\n|   <body>\n|     "FOO"\n|     <!--  BAR -- <QUX> -- MUX -- >BAZ -->', u'', <class 'html5lib.treebuilders.etree_lxml.TreeBuilder'>, True)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 43, in runParserTest
    assert False, errorMsg
AssertionError:

Input:
FOO<!-- BAR -- <QUX> -- MUX -- >BAZ

Expected:
| <html>
|   <head>
|   <body>
|     "FOO"
|     <!--  BAR -- <QUX> -- MUX -- >BAZ -->

Traceback:
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 39, in runParserTest
    document = p.parse(input)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 236, in parse
    parseMeta=parseMeta, useChardet=useChardet)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 94, in _parse
    self.mainLoop()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 203, in mainLoop
    new_token = phase.processComment(new_token)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 468, in processComment
    self.tree.insertComment(token, self.tree.openElements[-1])
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree_lxml.py", line 312, in insertCommentMain
    super(TreeBuilder, self).insertComment(data, parent)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/_base.py", line 262, in insertComment
    parent.appendChild(self.commentClass(token["data"]))
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree.py", line 148, in __init__
    self._element = ElementTree.Comment(data)
  File "src/lxml/lxml.etree.pyx", line 3017, in lxml.etree.Comment (src/lxml/lxml.etree.c:80806)
ValueError: Comment may not contain '--' or end with '-'


======================================================================
FAIL: html5lib.tests.test_parser.test_parser(None, u'FOO<!-- BAR -- <QUX> -- MUX -- >BAZ', u'| <html>\n|   <head>\n|   <body>\n|     "FOO"\n|     <!--  BAR -- <QUX> -- MUX -- >BAZ -->', u'', <class 'html5lib.treebuilders.etree_lxml.TreeBuilder'>, False)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 43, in runParserTest
    assert False, errorMsg
AssertionError:

Input:
FOO<!-- BAR -- <QUX> -- MUX -- >BAZ

Expected:
| <html>
|   <head>
|   <body>
|     "FOO"
|     <!--  BAR -- <QUX> -- MUX -- >BAZ -->

Traceback:
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 39, in runParserTest
    document = p.parse(input)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 236, in parse
    parseMeta=parseMeta, useChardet=useChardet)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 94, in _parse
    self.mainLoop()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 203, in mainLoop
    new_token = phase.processComment(new_token)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 468, in processComment
    self.tree.insertComment(token, self.tree.openElements[-1])
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree_lxml.py", line 312, in insertCommentMain
    super(TreeBuilder, self).insertComment(data, parent)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/_base.py", line 262, in insertComment
    parent.appendChild(self.commentClass(token["data"]))
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree.py", line 148, in __init__
    self._element = ElementTree.Comment(data)
  File "src/lxml/lxml.etree.pyx", line 3017, in lxml.etree.Comment (src/lxml/lxml.etree.c:80806)
ValueError: Comment may not contain '--' or end with '-'


======================================================================
FAIL: html5lib.tests.test_parser.test_parser(None, u'FOO<!----->BAZ', u'| <html>\n|   <head>\n|   <body>\n|     "FOO"\n|     <!-- - -->\n|     "BAZ"', u'', <class 'html5lib.treebuilders.etree_lxml.TreeBuilder'>, True)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 43, in runParserTest
    assert False, errorMsg
AssertionError:

Input:
FOO<!----->BAZ

Expected:
| <html>
|   <head>
|   <body>
|     "FOO"
|     <!-- - -->
|     "BAZ"

Traceback:
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 39, in runParserTest
    document = p.parse(input)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 236, in parse
    parseMeta=parseMeta, useChardet=useChardet)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 94, in _parse
    self.mainLoop()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 203, in mainLoop
    new_token = phase.processComment(new_token)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 468, in processComment
    self.tree.insertComment(token, self.tree.openElements[-1])
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree_lxml.py", line 312, in insertCommentMain
    super(TreeBuilder, self).insertComment(data, parent)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/_base.py", line 262, in insertComment
    parent.appendChild(self.commentClass(token["data"]))
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree.py", line 148, in __init__
    self._element = ElementTree.Comment(data)
  File "src/lxml/lxml.etree.pyx", line 3017, in lxml.etree.Comment (src/lxml/lxml.etree.c:80806)
ValueError: Comment may not contain '--' or end with '-'


======================================================================
FAIL: html5lib.tests.test_parser.test_parser(None, u'FOO<!----->BAZ', u'| <html>\n|   <head>\n|   <body>\n|     "FOO"\n|     <!-- - -->\n|     "BAZ"', u'', <class 'html5lib.treebuilders.etree_lxml.TreeBuilder'>, False)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 43, in runParserTest
    assert False, errorMsg
AssertionError:

Input:
FOO<!----->BAZ

Expected:
| <html>
|   <head>
|   <body>
|     "FOO"
|     <!-- - -->
|     "BAZ"

Traceback:
Traceback (most recent call last):
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/tests/test_parser.py", line 39, in runParserTest
    document = p.parse(input)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 236, in parse
    parseMeta=parseMeta, useChardet=useChardet)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 94, in _parse
    self.mainLoop()
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 203, in mainLoop
    new_token = phase.processComment(new_token)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/html5parser.py", line 468, in processComment
    self.tree.insertComment(token, self.tree.openElements[-1])
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree_lxml.py", line 312, in insertCommentMain
    super(TreeBuilder, self).insertComment(data, parent)
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/_base.py", line 262, in insertComment
    parent.appendChild(self.commentClass(token["data"]))
  File "/var/tmp/portage/dev-python/html5lib-0.9999999/work/html5lib-0.9999999/html5lib/treebuilders/etree.py", line 148, in __init__
    self._element = ElementTree.Comment(data)
  File "src/lxml/lxml.etree.pyx", line 3017, in lxml.etree.Comment (src/lxml/lxml.etree.c:80806)
ValueError: Comment may not contain '--' or end with '-'


----------------------------------------------------------------------
Ran 25617 tests in 31.272s

FAILED (errors=10, failures=22)
@jlec

This comment has been minimized.

Copy link
Author

commented Jan 15, 2016

@adamailru

This comment has been minimized.

Copy link

commented Jan 15, 2016

see http://stackoverflow.com/questions/34595275/disable-comments-check-for-in-lxml/34632179#34632179 and lxml/lxml#172 (comment) for more info ;)

The question maintainers is, when is next release available via PIP ?

gentoo-bot pushed a commit to gentoo/gentoo that referenced this issue Jan 15, 2016
Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=571644
html5lib/html5lib-python#224

Package-Manager: portage-2.2.26
Signed-off-by: Justin Lecher <jlec@gentoo.org>
@jlec

This comment has been minimized.

Copy link
Author

commented Jan 15, 2016

Any idea which commit in https://github.com/lxml/lxml fixed it?

@gsnedders

This comment has been minimized.

Copy link
Member

commented Jan 15, 2016

0c551c9 fixed this

@gsnedders gsnedders closed this Jan 15, 2016
@gsnedders

This comment has been minimized.

Copy link
Member

commented Jan 15, 2016

#214 it would appear to be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.