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):
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
......
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