Commits

Anonymous committed 072710c

Added metadat info for fake dists' grammar and towel-stuff. This allows the get_distributions test to pass.

Comments (0)

Files changed (3)

src/distutils2/_backport/tests/fake_dists/grammar-1.0a4.dist-info/METADATA

+Metadata-Version: 1.2
+Name: grammar
+Version: 1.0a4

src/distutils2/_backport/tests/fake_dists/towel_stuff-0.1.dist-info/METADATA

+Metadata-Version: 1.2
+Name: towel-stuff
+Version: 0.1

src/distutils2/_backport/tests/test_pkgutil.py

     def test_get_distributions(self):
         """Lookup all distributions found in the ``sys.path``."""
         # This test could potentially pick up other installed distributions
-        fake_dists = [('grammar', '1.0a4'), ('choxie', '2009'),
+        fake_dists = [('grammar', '1.0a4'), ('choxie', '2.0.0.9'),
             ('towel-stuff', '0.1')]
         found_dists = []
 
                 self.fail("item received was not a Distribution instance: "
                     "%s" % type(dist))
             if dist.name in dict(fake_dists).keys():
-                found_dists.append((dist.name, dist.metadata.version,))
+                found_dists.append((dist.name, dist.metadata['version'],))
             # otherwise we don't care what other distributions are found
 
         # Finally, test that we found all that we were looking for
-        self.assertListEqual(found_dists, dict(fake_dists).keys())
+        self.assertListEqual(sorted(found_dists), sorted(fake_dists))