summaryrefslogtreecommitdiff
path: root/tests/path.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/path.py')
-rwxr-xr-xtests/path.py4
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)