Merge pull request #8555 from tk0miya/8512_test_comment

test: Add comment for UnicodeEncodeError handler (refs: #8512)
This commit is contained in:
Takeshi KOMIYA 2020-12-20 13:53:24 +09:00 committed by GitHub
commit 7f1284f2e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)