summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2015-01-03 02:21:13 -0500
committerJason R. Coombs <jaraco@jaraco.com>2015-01-03 02:21:13 -0500
commit26a1521e870855ef89e6481f94293cded8237571 (patch)
tree270662119438670ded7b5d2229d4a24cd1d7676c
parentba8336727d818011c3bdd19c02f0ad92f59a5c7a (diff)
downloadpython-setuptools-git-26a1521e870855ef89e6481f94293cded8237571.tar.gz
Remove remaining reference to setuptools from test_resources
-rw-r--r--pkg_resources/__init__.py2
-rw-r--r--setuptools/tests/test_resources.py3
2 files changed, 3 insertions, 2 deletions
diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py
index ac3807d8..f004315a 100644
--- a/pkg_resources/__init__.py
+++ b/pkg_resources/__init__.py
@@ -52,6 +52,8 @@ if PY3:
else:
string_types = str, eval('unicode')
+iteritems = (lambda i: i.items()) if PY3 else lambda i: i.iteritems()
+
# capture these to bypass sandboxing
from os import utime
try:
diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py
index 39d7ba49..351549fa 100644
--- a/setuptools/tests/test_resources.py
+++ b/setuptools/tests/test_resources.py
@@ -12,7 +12,6 @@ from pkg_resources import (parse_requirements, VersionConflict, parse_version,
packaging = pkg_resources.packaging
-from setuptools.compat import iteritems
def safe_repr(obj, short=False):
""" copied from Python2.7"""
@@ -259,7 +258,7 @@ class TestEntryPoints:
def checkSubMap(self, m):
assert len(m) == len(self.submap_expect)
- for key, ep in iteritems(self.submap_expect):
+ for key, ep in pkg_resources.iteritems(self.submap_expect):
assert repr(m.get(key)) == repr(ep)
submap_expect = dict(