[Python-checkins] r45764 - in sandbox/trunk/setuptools: pkg_resources.py setuptools/tests/test_resources.py

phillip.eby python-checkins at python.org
Thu Apr 27 20:02:45 CEST 2006


Author: phillip.eby
Date: Thu Apr 27 20:02:44 2006
New Revision: 45764

Modified:
   sandbox/trunk/setuptools/pkg_resources.py
   sandbox/trunk/setuptools/setuptools/tests/test_resources.py
Log:
Fix entry point parsing when a standalone module name has whitespace 
between it and the extras.


Modified: sandbox/trunk/setuptools/pkg_resources.py
==============================================================================
--- sandbox/trunk/setuptools/pkg_resources.py	(original)
+++ sandbox/trunk/setuptools/pkg_resources.py	Thu Apr 27 20:02:44 2006
@@ -1791,7 +1791,7 @@
                 src
             )
         else:
-            return cls(name.strip(), value.lstrip(), attrs, extras, dist)
+            return cls(name.strip(), value.strip(), attrs, extras, dist)
 
     parse = classmethod(parse)
 

Modified: sandbox/trunk/setuptools/setuptools/tests/test_resources.py
==============================================================================
--- sandbox/trunk/setuptools/setuptools/tests/test_resources.py	(original)
+++ sandbox/trunk/setuptools/setuptools/tests/test_resources.py	Thu Apr 27 20:02:44 2006
@@ -254,18 +254,18 @@
 
     def checkSubMap(self, m):
         self.assertEqual(str(m),
-            "{"
-            "'feature2': EntryPoint.parse("
+            "{'feature2': EntryPoint.parse("
                 "'feature2 = another.module:SomeClass [extra1,extra2]'), "
+            "'feature3': EntryPoint.parse('feature3 = this.module [something]'), "
             "'feature1': EntryPoint.parse("
-                "'feature1 = somemodule:somefunction')"
-            "}"
+                "'feature1 = somemodule:somefunction')}"
         )
 
     submap_str = """
             # define features for blah blah
             feature1 = somemodule:somefunction
             feature2 = another.module:SomeClass [extra1,extra2]
+            feature3 = this.module [something]
     """
 
     def testParseList(self):


More information about the Python-checkins mailing list