diff options
| author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-06-09 01:27:34 +0900 |
|---|---|---|
| committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2019-06-09 01:27:34 +0900 |
| commit | 9f470cec6c943a9437dac2c09ea796e78e08156d (patch) | |
| tree | 31e26a9be046f8b2e7499a93db1a5ee8dd6d4c3a /tests/test_build_html.py | |
| parent | 5ce5c2c3156c53c1f1b758c38150e48080138b15 (diff) | |
| parent | 5cabe8be35ee44ca9a9ddaf5d93e2dd9f62abdc9 (diff) | |
| download | sphinx-git-9f470cec6c943a9437dac2c09ea796e78e08156d.tar.gz | |
Merge branch '2.0'
Diffstat (limited to 'tests/test_build_html.py')
| -rw-r--r-- | tests/test_build_html.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/test_build_html.py b/tests/test_build_html.py index 2df1f8412..677ca9de0 100644 --- a/tests/test_build_html.py +++ b/tests/test_build_html.py @@ -451,8 +451,10 @@ def test_html_download(app): @pytest.mark.sphinx('html', testroot='roles-download') def test_html_download_role(app, status, warning): app.build() - digest = md5((app.srcdir / 'dummy.dat').encode()).hexdigest() + digest = md5(b'dummy.dat').hexdigest() assert (app.outdir / '_downloads' / digest / 'dummy.dat').exists() + digest_another = md5(b'another/dummy.dat').hexdigest() + assert (app.outdir / '_downloads' / digest_another / 'dummy.dat').exists() content = (app.outdir / 'index.html').text() assert (('<li><p><a class="reference download internal" download="" ' @@ -460,6 +462,11 @@ def test_html_download_role(app, status, warning): '<code class="xref download docutils literal notranslate">' '<span class="pre">dummy.dat</span></code></a></p></li>' % digest) in content) + assert (('<li><p><a class="reference download internal" download="" ' + 'href="_downloads/%s/dummy.dat">' + '<code class="xref download docutils literal notranslate">' + '<span class="pre">another/dummy.dat</span></code></a></p></li>' % + digest_another) in content) assert ('<li><p><code class="xref download docutils literal notranslate">' '<span class="pre">not_found.dat</span></code></p></li>' in content) assert ('<li><p><a class="reference download external" download="" ' |
