diff options
Diffstat (limited to '')
-rw-r--r-- | tests/test_markup/test_smartquotes.py (renamed from tests/test_smartquotes.py) | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/test_smartquotes.py b/tests/test_markup/test_smartquotes.py index 1d4e8e1..6c84386 100644 --- a/tests/test_smartquotes.py +++ b/tests/test_markup/test_smartquotes.py @@ -1,7 +1,8 @@ """Test smart quotes.""" import pytest -from html5lib import HTMLParser + +from sphinx.testing.util import etree_parse @pytest.mark.sphinx(buildername='html', testroot='smartquotes', freshenv=True) @@ -16,9 +17,7 @@ def test_basic(app, status, warning): def test_literals(app, status, warning): app.build() - with (app.outdir / 'literals.html').open(encoding='utf-8') as html_file: - etree = HTMLParser(namespaceHTMLElements=False).parse(html_file) - + etree = etree_parse(app.outdir / 'literals.html') for code_element in etree.iter('code'): code_text = ''.join(code_element.itertext()) |