summaryrefslogtreecommitdiff
path: root/tests/test_build_html5.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_build_html5.py')
-rw-r--r--tests/test_build_html5.py19
1 files changed, 9 insertions, 10 deletions
diff --git a/tests/test_build_html5.py b/tests/test_build_html5.py
index e4c51eaea..c2a7bad1c 100644
--- a/tests/test_build_html5.py
+++ b/tests/test_build_html5.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
"""
test_build_html5
~~~~~~~~~~~~~~~~
@@ -67,11 +66,11 @@ def cached_etree_parse():
(".//pre/span", 'line 2'),
],
'includes.html': [
- (".//pre", u'Max Strauß'),
+ (".//pre", 'Max Strauß'),
(".//a[@class='reference download internal']", ''),
- (".//pre/span", u'"quotes"'),
- (".//pre/span", u"'included'"),
- (".//pre/span[@class='s2']", u'üöä'),
+ (".//pre/span", '"quotes"'),
+ (".//pre/span", "'included'"),
+ (".//pre/span[@class='s2']", 'üöä'),
(".//div[@class='inc-pyobj1 highlight-text notranslate']//pre",
r'^class Foo:\n pass\n\s*$'),
(".//div[@class='inc-pyobj2 highlight-text notranslate']//pre",
@@ -79,7 +78,7 @@ def cached_etree_parse():
(".//div[@class='inc-lines highlight-text notranslate']//pre",
r'^class Foo:\n pass\nclass Bar:\n$'),
(".//div[@class='inc-startend highlight-text notranslate']//pre",
- u'^foo = "Including Unicode characters: üöä"\\n$'),
+ '^foo = "Including Unicode characters: üöä"\\n$'),
(".//div[@class='inc-preappend highlight-text notranslate']//pre",
r'(?m)^START CODE$'),
(".//div[@class='inc-pyobj-dedent highlight-python notranslate']//span",
@@ -119,7 +118,7 @@ def cached_etree_parse():
(".//li/p/strong", r'^program\\n$'),
(".//li/p/em", r'^dfn\\n$'),
(".//li/p/kbd", r'^kbd\\n$'),
- (".//li/p/span", u'File \N{TRIANGULAR BULLET} Close'),
+ (".//li/p/span", 'File \N{TRIANGULAR BULLET} Close'),
(".//li/p/code/span[@class='pre']", '^a/$'),
(".//li/p/code/em/span[@class='pre']", '^varpart$'),
(".//li/p/code/em/span[@class='pre']", '^i$'),
@@ -157,7 +156,7 @@ def cached_etree_parse():
# footnote reference
(".//a[@class='footnote-reference brackets']", r'1'),
# created by reference lookup
- (".//a[@href='contents.html#ref1']", ''),
+ (".//a[@href='index.html#ref1']", ''),
# ``seealso`` directive
(".//div/p[@class='admonition-title']", 'See also'),
# a ``hlist`` directive
@@ -249,7 +248,7 @@ def cached_etree_parse():
(".//a[@class='reference internal'][@href='#cmdoption-git-commit-p']/code/span",
'-p'),
],
- 'contents.html': [
+ 'index.html': [
(".//meta[@name='hc'][@content='hcval']", ''),
(".//meta[@name='hc_co'][@content='hcval_co']", ''),
(".//dt[@class='label']/span[@class='brackets']", r'Ref1'),
@@ -354,7 +353,7 @@ def test_html_download(app):
confoverrides={'html_experimental_html5_writer': True})
def test_html_download_role(app, status, warning):
app.build()
- digest = md5((app.srcdir / 'dummy.dat').encode('utf-8')).hexdigest()
+ digest = md5((app.srcdir / 'dummy.dat').encode()).hexdigest()
assert (app.outdir / '_downloads' / digest / 'dummy.dat').exists()
content = (app.outdir / 'index.html').text()