summaryrefslogtreecommitdiff
path: root/pkg_resources/tests
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2018-06-03 10:20:34 -0400
committerJason R. Coombs <jaraco@jaraco.com>2018-06-03 10:20:34 -0400
commitc2262d9fe4eaac507ff128ae60b6682e8d132e4d (patch)
treed23086d56218e01ef2652b2fbaded02bf152a1f0 /pkg_resources/tests
parent9f379bbf78fcc1af1714c4a6c6f2afe172e0ed05 (diff)
downloadpython-setuptools-git-c2262d9fe4eaac507ff128ae60b6682e8d132e4d.tar.gz
Use text_type and string_types from six
Diffstat (limited to 'pkg_resources/tests')
-rw-r--r--pkg_resources/tests/test_pkg_resources.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/pkg_resources/tests/test_pkg_resources.py b/pkg_resources/tests/test_pkg_resources.py
index 079e83f8..4e2cac94 100644
--- a/pkg_resources/tests/test_pkg_resources.py
+++ b/pkg_resources/tests/test_pkg_resources.py
@@ -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: