From 58be2f19b3aeeabf4d9a3d10be84824508c0fda2 Mon Sep 17 00:00:00 2001 From: Takayuki Shimizukawa Date: Sat, 28 Sep 2013 12:51:20 +0000 Subject: When Sphinx couldn't decode multibyte filename, now Sphinx notices UnicodeError and continuing if possible instead of raise exception. Closes #703 --- tests/test_setup_command.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'tests/test_setup_command.py') diff --git a/tests/test_setup_command.py b/tests/test_setup_command.py index 23b2b4b79..6f0050d68 100644 --- a/tests/test_setup_command.py +++ b/tests/test_setup_command.py @@ -15,7 +15,7 @@ import subprocess from functools import wraps import tempfile -from util import with_tempdir, test_roots +from util import with_tempdir, test_roots, SkipTest from path import path from textwrap import dedent @@ -62,7 +62,14 @@ def test_build_sphinx(pkgroot, proc): def test_build_sphinx_with_multibyte_path(pkgroot, proc): mb_name = u'\u65e5\u672c\u8a9e' srcdir = (pkgroot / 'doc') - (srcdir / mb_name).makedirs() + try: + (srcdir / mb_name).makedirs() + except UnicodeEncodeError: + from path import FILESYSTEMENCODING + raise SkipTest( + 'multibyte filename did not support on this filesystem encoding: ' + '%s', FILESYSTEMENCODING) + (srcdir / mb_name / (mb_name + '.txt')).write_text(dedent(""" multi byte file name page ========================== -- cgit v1.2.1