[Python-checkins] r45765 - in sandbox/branches/setuptools-0.6: pkg_resources.py setuptools/tests/test_resources.py
phillip.eby
python-checkins at python.org
Thu Apr 27 20:05:53 CEST 2006
Author: phillip.eby
Date: Thu Apr 27 20:05:53 2006
New Revision: 45765
Modified:
sandbox/branches/setuptools-0.6/pkg_resources.py
sandbox/branches/setuptools-0.6/setuptools/tests/test_resources.py
Log:
Fix entry point parsing when a standalone module name has whitespace
between it and the extras.
Modified: sandbox/branches/setuptools-0.6/pkg_resources.py
==============================================================================
--- sandbox/branches/setuptools-0.6/pkg_resources.py (original)
+++ sandbox/branches/setuptools-0.6/pkg_resources.py Thu Apr 27 20:05:53 2006
@@ -1873,7 +1873,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/branches/setuptools-0.6/setuptools/tests/test_resources.py
==============================================================================
--- sandbox/branches/setuptools-0.6/setuptools/tests/test_resources.py (original)
+++ sandbox/branches/setuptools-0.6/setuptools/tests/test_resources.py Thu Apr 27 20:05:53 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