[Checkins] SVN: z3c.componentdebug/trunk/src/z3c/componentdebug/
Make unmatched more readable with caps
Ross Patterson
me at rpatterson.net
Thu May 31 02:30:03 EDT 2007
Log message for revision 76045:
Make unmatched more readable with caps
Changed:
U z3c.componentdebug/trunk/src/z3c/componentdebug/README.txt
U z3c.componentdebug/trunk/src/z3c/componentdebug/lookup/__init__.py
U z3c.componentdebug/trunk/src/z3c/componentdebug/tests/lookup.txt
-=-
Modified: z3c.componentdebug/trunk/src/z3c/componentdebug/README.txt
===================================================================
--- z3c.componentdebug/trunk/src/z3c/componentdebug/README.txt 2007-05-31 06:27:50 UTC (rev 76044)
+++ z3c.componentdebug/trunk/src/z3c/componentdebug/README.txt 2007-05-31 06:30:03 UTC (rev 76045)
@@ -140,11 +140,11 @@
Registrations with matching objects:
AdapterRegistration(<BaseGlobalComponents base>, [IFoo, IBar], IBaz, '', getBaz, u''):
- <Foo object at ...>
- - unmatched: <Bar object at ...>
+ - UNMATCHED: <Bar object at ...>
Objects with matching registrations:
<Foo object at ...>:
- AdapterRegistration(<BaseGlobalComponents base>, [IFoo, IBar], IBaz, '', getBaz, u'')
- <Bar object at ...>: no matches
+ <Bar object at ...>: UNMATCHED
>>> component.getMultiAdapter((foo, bar2), IBaz)
'baz'
Modified: z3c.componentdebug/trunk/src/z3c/componentdebug/lookup/__init__.py
===================================================================
--- z3c.componentdebug/trunk/src/z3c/componentdebug/lookup/__init__.py 2007-05-31 06:27:50 UTC (rev 76044)
+++ z3c.componentdebug/trunk/src/z3c/componentdebug/lookup/__init__.py 2007-05-31 06:30:03 UTC (rev 76045)
@@ -29,7 +29,7 @@
for idx in xrange(self.registrations.order):
obj = objs[idx]
str_ += ' - %s%s\n' % (
- obj is False and 'unmatched: ' or '',
+ obj is False and 'UNMATCHED: ' or '',
repr(objects[idx]))
str_ += '\nObjects with matching registrations:\n\n'
@@ -39,6 +39,6 @@
repr(obj), '\n - '.join(
repr(i) for i in regs))
else:
- str_ += '%s: no matches\n' % repr(obj)
+ str_ += '%s: UNMATCHED\n' % repr(obj)
ComponentLookupError.__init__(self, str_)
Modified: z3c.componentdebug/trunk/src/z3c/componentdebug/tests/lookup.txt
===================================================================
--- z3c.componentdebug/trunk/src/z3c/componentdebug/tests/lookup.txt 2007-05-31 06:27:50 UTC (rev 76044)
+++ z3c.componentdebug/trunk/src/z3c/componentdebug/tests/lookup.txt 2007-05-31 06:30:03 UTC (rev 76045)
@@ -42,11 +42,11 @@
context: <PersistentComponents >
Registrations with matching objects:
AdapterRegistration(<PersistentComponents >, [IFoo], Interface, u'', <lambda>, u''):
- - unmatched: None
+ - UNMATCHED: None
AdapterRegistration(<BaseGlobalComponents base>, [IFoo], Interface, u'', <lambda>, u''):
- - unmatched: None
+ - UNMATCHED: None
Objects with matching registrations:
- None: no matches
+ None: UNMATCHED
Make sure repr is used instead of str with a request::
@@ -61,9 +61,9 @@
name:
Registrations with matching objects:
AdapterRegistration(<BaseGlobalComponents base>, [IFoo], Interface, u'', <lambda>, u''):
- - unmatched: <zope.publisher.base.TestRequest object at ...>
+ - UNMATCHED: <zope.publisher.base.TestRequest object at ...>
Objects with matching registrations:
- <zope.publisher.base.TestRequest object at ...>: no matches
+ <zope.publisher.base.TestRequest object at ...>: UNMATCHED
>>> sm.getAdapter(foo, Interface)
<Foo object at ...>
More information about the Checkins
mailing list