test: Add comment for UnicodeEncodeError handler (refs: #8512)

This commit is contained in:
Takeshi KOMIYA
2020-12-20 01:01:56 +09:00
parent aae2f19911
commit 9a9d7f3f00

View File

@@ -36,6 +36,8 @@ def nonascii_srcdir(request, rootdir, sphinx_test_tempdir):
if not srcdir.exists():
(rootdir / 'test-root').copytree(srcdir)
except UnicodeEncodeError:
# Now Python 3.7+ follows PEP-540 and uses utf-8 encoding for filesystem by default.
# So this error handling will be no longer used (after dropping python 3.6 support).
srcdir = basedir / 'all'
if not srcdir.exists():
(rootdir / 'test-root').copytree(srcdir)