diff options
author | PJ Eby <distutils-sig@python.org> | 2008-01-18 21:51:23 +0000 |
---|---|---|
committer | PJ Eby <distutils-sig@python.org> | 2008-01-18 21:51:23 +0000 |
commit | 7c4938d53774c51b441970e177ce72cc3bdf68ce (patch) | |
tree | d69680614e16597ee20ded8c4e04d3d66fcfd78f /setuptools/tests/test_resources.py | |
parent | ce75692a87b83cef9ea539fc76f4a544b1398b35 (diff) | |
download | external_python_setuptools-7c4938d53774c51b441970e177ce72cc3bdf68ce.tar.gz external_python_setuptools-7c4938d53774c51b441970e177ce72cc3bdf68ce.tar.bz2 external_python_setuptools-7c4938d53774c51b441970e177ce72cc3bdf68ce.zip |
chmod/test cleanups and Jython compatibility (backport from trunk)
--HG--
branch : setuptools-0.6
extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/branches/setuptools-0.6%4060062
Diffstat (limited to 'setuptools/tests/test_resources.py')
-rw-r--r-- | setuptools/tests/test_resources.py | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/setuptools/tests/test_resources.py b/setuptools/tests/test_resources.py index 1b15a9eb..1dc078ab 100644 --- a/setuptools/tests/test_resources.py +++ b/setuptools/tests/test_resources.py @@ -39,8 +39,6 @@ class DistroTests(TestCase): # But only 1 package self.assertEqual(list(ad), ['foopkg']) - - # Distributions sort by version self.assertEqual( [dist.version for dist in ad['FooPkg']], ['1.4','1.3-1','1.2'] @@ -255,14 +253,15 @@ class EntryPointTests(TestCase): else: raise AssertionError("Should've been bad", ep) def checkSubMap(self, m): - self.assertEqual(str(m), - "{'feature2': EntryPoint.parse(" - "'feature2 = another.module:SomeClass [extra1,extra2]'), " - "'feature3': EntryPoint.parse('feature3 = this.module [something]'), " - "'feature1': EntryPoint.parse(" - "'feature1 = somemodule:somefunction')}" - ) - + self.assertEqual(len(m), len(self.submap_expect)) + for key, ep in self.submap_expect.iteritems(): + self.assertEqual(repr(m.get(key)), repr(ep)) + + submap_expect = dict( + feature1=EntryPoint('feature1', 'somemodule', ['somefunction']), + feature2=EntryPoint('feature2', 'another.module', ['SomeClass'], ['extra1','extra2']), + feature3=EntryPoint('feature3', 'this.module', extras=['something']) + ) submap_str = """ # define features for blah blah feature1 = somemodule:somefunction @@ -286,7 +285,6 @@ class EntryPointTests(TestCase): self.assertRaises(ValueError, EntryPoint.parse_map, ["[xyz]", "[xyz]"]) self.assertRaises(ValueError, EntryPoint.parse_map, self.submap_str) - class RequirementsTests(TestCase): def testBasics(self): |