diff --git a/src/calibre/ebooks/oeb/polish/tests/parsing.py b/src/calibre/ebooks/oeb/polish/tests/parsing.py index 39e3f48170..5c85508307 100644 --- a/src/calibre/ebooks/oeb/polish/tests/parsing.py +++ b/src/calibre/ebooks/oeb/polish/tests/parsing.py @@ -143,8 +143,13 @@ def attribute_replacement(test, parse_function): err = 'SVG attributes not normalized, parsed markup:\n' + etree.tostring(root) test.assertEqual(len(XPath('//svg:svg[@viewBox]')(root)), 2, err) +def comments(test, parse_function): + markup = '' + root = parse_function(markup) + test.assertEqual(len(XPath('//h:body')(root)), 1, 'Failed to parse with comment containing dashes') + basic_checks = (nonvoid_cdata_elements, namespaces, space_characters, - case_insensitive_element_names, entities, + case_insensitive_element_names, entities, comments, multiple_html_and_body, attribute_replacement) class ParsingTests(BaseTest):