Commit c2262d9f authored by Jason R. Coombs's avatar Jason R. Coombs

Use text_type and string_types from six

parent 9f379bbf
......@@ -13,16 +13,12 @@ import distutils.dist
import distutils.command.install_egg_info
from pkg_resources.extern.six.moves import map
from pkg_resources.extern.six import text_type, string_types
import pytest
import pkg_resources
try:
unicode
except NameError:
unicode = str
__metaclass__ = type
......@@ -37,7 +33,7 @@ def timestamp(dt):
return time.mktime(dt.timetuple())
class EggRemover(unicode):
class EggRemover(text_type):
def __call__(self):
if self in sys.path:
sys.path.remove(self)
......@@ -140,7 +136,7 @@ class TestResourceManager:
path = mgr.get_cache_path('foo')
type_ = str(type(path))
message = "Unexpected type from get_cache_path: " + type_
assert isinstance(path, (unicode, str)), message
assert isinstance(path, string_types), message
class TestIndependence:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment