Make generated download links reproducible

Without this change the hexdigest generated in DownloadFiles.add_file()
depends on source_dir, while just the path fragment relative to it is
sufficient.
This commit is contained in:
Dmitry Shachnev committed 2019-06-03 19:37:21 +03:00
1 parent 127d4db0d4
commit 6fc8873087
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -451,7 +451,7 @@ 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()
content = (app.outdir / 'index.html').text()