mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix nonascii_srcdir to work when non-ascii directories aren't supported
Previously, the nonascii_srcdir in tests/test_build.py contained some logic to attempt to handle the case where non-ascii directories aren't supported, but it did not actually work because it fails to copy the test sources to the temporary directory. With this commit, the following test invocation, which previously failed, now pases: LANG=en_US.iso8859-1 python -m pytest test_build.py
This commit is contained in:
parent
9cf2826491
commit
d737ecd063
@ -37,6 +37,8 @@ def nonascii_srcdir(request, rootdir, sphinx_test_tempdir):
|
||||
(rootdir / 'test-root').copytree(srcdir)
|
||||
except UnicodeEncodeError:
|
||||
srcdir = basedir / 'all'
|
||||
if not srcdir.exists():
|
||||
(rootdir / 'test-root').copytree(srcdir)
|
||||
else:
|
||||
# add a doc with a non-ASCII file name to the source dir
|
||||
(srcdir / (test_name + '.txt')).write_text(dedent("""
|
||||
|
Loading…
Reference in New Issue
Block a user