diff options
author | Takayuki Shimizukawa <shimizukawa@gmail.com> | 2014-04-29 11:46:47 +0900 |
---|---|---|
committer | Takayuki Shimizukawa <shimizukawa@gmail.com> | 2014-04-29 11:46:47 +0900 |
commit | 68290a266cea33cf0b60bed425b5e89d1032e7d1 (patch) | |
tree | 629a54150044a6d588bcf8e740e13d65c50178ee /tests/path.py | |
parent | 1e4b390b226c856d8c80d1d9857696b7fbcd2580 (diff) | |
download | sphinx-git-68290a266cea33cf0b60bed425b5e89d1032e7d1.tar.gz |
introduce the six module and reduce sphinx.util.pycompat implementation. refs #1350.
Diffstat (limited to 'tests/path.py')
-rwxr-xr-x | tests/path.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/path.py b/tests/path.py index f40e7b043..860e65e18 100755 --- a/tests/path.py +++ b/tests/path.py @@ -12,6 +12,8 @@ import sys import shutil from codecs import open +import six + FILESYSTEMENCODING = sys.getfilesystemencoding() or sys.getdefaultencoding() @@ -20,7 +22,7 @@ class path(unicode): """ Represents a path which behaves like a string. """ - if sys.version_info < (3, 0): + if six.PY2: def __new__(cls, s, encoding=FILESYSTEMENCODING, errors='strict'): if isinstance(s, str): s = s.decode(encoding, errors) |