Fix repr of paths on Windows

This commit is contained in:
Adam Turner
2024-07-23 03:28:50 +01:00
parent 0897b5948b
commit 932e5c56db
2 changed files with 2 additions and 2 deletions

View File

@@ -769,7 +769,7 @@ class StandaloneHTMLBuilder(Builder):
force=True,
)
except Exception as err:
logger.warning(__('cannot copy image file %r: %s'),
logger.warning(__("cannot copy image file '%s': %s"),
self.srcdir / src, err)
def copy_download_files(self) -> None:

View File

@@ -387,7 +387,7 @@ def test_html_remove_sources_before_write_gh_issue_10786(app, warning):
assert len(ws) >= 1
file = os.fsdecode(target)
assert f'WARNING: cannot copy image file {file!r}: {file!s} does not exist' == ws[-1]
assert f"WARNING: cannot copy image file '{file}': {file} does not exist" == ws[-1]
@pytest.mark.sphinx('html', testroot='domain-py-python_maximum_signature_line_length',