aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/tests/test_dist_info.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2015-01-01 16:37:29 -0500
committerJason R. Coombs <jaraco@jaraco.com>2015-01-01 16:37:29 -0500
commit40fe6f7674b00bb6a8ed81185e938c105845a040 (patch)
treec43f26a11aa4c8b6f83e68d9597dbdaeaba41b47 /setuptools/tests/test_dist_info.py
parent3d4e8cfb4339e641f65def5185bcc784f6190df5 (diff)
downloadexternal_python_setuptools-40fe6f7674b00bb6a8ed81185e938c105845a040.tar.gz
external_python_setuptools-40fe6f7674b00bb6a8ed81185e938c105845a040.tar.bz2
external_python_setuptools-40fe6f7674b00bb6a8ed81185e938c105845a040.zip
Build a dict in a generator expression.
Diffstat (limited to 'setuptools/tests/test_dist_info.py')
-rw-r--r--setuptools/tests/test_dist_info.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/setuptools/tests/test_dist_info.py b/setuptools/tests/test_dist_info.py
index ed3f1886..7d1247b3 100644
--- a/setuptools/tests/test_dist_info.py
+++ b/setuptools/tests/test_dist_info.py
@@ -16,9 +16,10 @@ def DALS(s):
class TestDistInfo:
def test_distinfo(self):
- dists = {}
- for d in pkg_resources.find_distributions(self.tmpdir):
- dists[d.project_name] = d
+ dists = dict(
+ (d.project_name, d)
+ for d in pkg_resources.find_distributions(self.tmpdir)
+ )
assert len(dists) == 2, dists