diff options
Diffstat (limited to 'tests/test_build_html5.py')
-rw-r--r-- | tests/test_build_html5.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/test_build_html5.py b/tests/test_build_html5.py index 217050ec7..4ac70be51 100644 --- a/tests/test_build_html5.py +++ b/tests/test_build_html5.py @@ -21,7 +21,6 @@ from html5lib import getTreeBuilder, HTMLParser from sphinx.util.docutils import is_html5_writer_available -from sphinx.testing.util import skip_unless from test_build_html import flat_dict, tail_check, check_xpath TREE_BUILDER = getTreeBuilder('etree', implementation=ElementTree) @@ -31,7 +30,7 @@ HTML_PARSER = HTMLParser(TREE_BUILDER, namespaceHTMLElements=False) etree_cache = {} -@skip_unless(is_html5_writer_available()) +@pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.fixture(scope='module') def cached_etree_parse(): def parse(fname): @@ -46,7 +45,7 @@ def cached_etree_parse(): etree_cache.clear() -@skip_unless(is_html5_writer_available()) +@pytest.mark.skipif(not is_html5_writer_available(), reason='HTML5 writer is not available') @pytest.mark.parametrize("fname,expect", flat_dict({ 'images.html': [ (".//img[@src='_images/img.png']", ''), @@ -91,8 +90,8 @@ def cached_etree_parse(): r'-| |-'), ], 'autodoc.html': [ - (".//dt[@id='test_autodoc.Class']", ''), - (".//dt[@id='test_autodoc.function']/em", r'\*\*kwds'), + (".//dt[@id='autodoc_target.Class']", ''), + (".//dt[@id='autodoc_target.function']/em", r'\*\*kwds'), (".//dd/p", r'Return spam\.'), ], 'extapi.html': [ @@ -120,7 +119,7 @@ def cached_etree_parse(): (".//li/p/strong", r'^command\\n$'), (".//li/p/strong", r'^program\\n$'), (".//li/p/em", r'^dfn\\n$'), - (".//li/p/code/span[@class='pre']", r'^kbd\\n$'), + (".//li/p/kbd", r'^kbd\\n$'), (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'), (".//li/p/code/span[@class='pre']", '^a/$'), (".//li/p/code/em/span[@class='pre']", '^varpart$'), |