Commit 40fe6f76 authored by Jason R. Coombs's avatar Jason R. Coombs

Build a dict in a generator expression.

parent 3d4e8cfb
...@@ -16,9 +16,10 @@ def DALS(s): ...@@ -16,9 +16,10 @@ def DALS(s):
class TestDistInfo: class TestDistInfo:
def test_distinfo(self): def test_distinfo(self):
dists = {} dists = dict(
for d in pkg_resources.find_distributions(self.tmpdir): (d.project_name, d)
dists[d.project_name] = d for d in pkg_resources.find_distributions(self.tmpdir)
)
assert len(dists) == 2, dists assert len(dists) == 2, dists
......
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