diff options
| author | Takayuki Shimizukawa <shimizukawa@gmail.com> | 2013-09-28 12:51:20 +0000 |
|---|---|---|
| committer | Takayuki Shimizukawa <shimizukawa@gmail.com> | 2013-09-28 12:51:20 +0000 |
| commit | 58be2f19b3aeeabf4d9a3d10be84824508c0fda2 (patch) | |
| tree | a8a7655fd475a3d77ecdc8ff3919c421af9e3b99 /tests/test_setup_command.py | |
| parent | 445bb5daecba49e8054435d8071130e1fb48383e (diff) | |
| download | sphinx-git-58be2f19b3aeeabf4d9a3d10be84824508c0fda2.tar.gz | |
When Sphinx couldn't decode multibyte filename, now Sphinx notices UnicodeError and continuing if possible instead of raise exception. Closes #703
Diffstat (limited to 'tests/test_setup_command.py')
| -rw-r--r-- | tests/test_setup_command.py | 11 |
1 files changed, 9 insertions, 2 deletions
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 ========================== |
