[Checkins] SVN: zope.app.apidoc/trunk/ Adapted tests for Python 2.4

Christophe Combelles ccomb at free.fr
Wed Mar 3 17:55:55 EST 2010


Log message for revision 109635:
  Adapted tests for Python 2.4
  

Changed:
  U   zope.app.apidoc/trunk/CHANGES.txt
  U   zope.app.apidoc/trunk/src/zope/app/apidoc/codemodule/browser/README.txt
  U   zope.app.apidoc/trunk/src/zope/app/apidoc/component.txt
  U   zope.app.apidoc/trunk/src/zope/app/apidoc/ifacemodule/browser.txt
  U   zope.app.apidoc/trunk/src/zope/app/apidoc/presentation.txt
  U   zope.app.apidoc/trunk/src/zope/app/apidoc/utilitymodule/browser.txt
  U   zope.app.apidoc/trunk/src/zope/app/apidoc/zcmlmodule/browser.txt

-=-
Modified: zope.app.apidoc/trunk/CHANGES.txt
===================================================================
--- zope.app.apidoc/trunk/CHANGES.txt	2010-03-03 22:14:27 UTC (rev 109634)
+++ zope.app.apidoc/trunk/CHANGES.txt	2010-03-03 22:55:55 UTC (rev 109635)
@@ -5,7 +5,7 @@
 3.7.2 (unreleased)
 ------------------
 
-- Nothing changed yet.
+- Adapted tests for Python2.4
 
 
 3.7.1 (2010-01-05)

Modified: zope.app.apidoc/trunk/src/zope/app/apidoc/codemodule/browser/README.txt
===================================================================
--- zope.app.apidoc/trunk/src/zope/app/apidoc/codemodule/browser/README.txt	2010-03-03 22:14:27 UTC (rev 109634)
+++ zope.app.apidoc/trunk/src/zope/app/apidoc/codemodule/browser/README.txt	2010-03-03 22:55:55 UTC (rev 109635)
@@ -73,7 +73,7 @@
   >>> bc = utilities.CodeBreadCrumbs()
   >>> bc.context = details.context
   >>> bc.request = details.request
-  >>> pprint(bc())
+  >>> pprint(bc(), width=1)
   [{'name': u'[top]',
     'url': 'http://127.0.0.1/++apidoc++/Code'},
    {'name': u'zope',

Modified: zope.app.apidoc/trunk/src/zope/app/apidoc/component.txt
===================================================================
--- zope.app.apidoc/trunk/src/zope/app/apidoc/component.txt	2010-03-03 22:14:27 UTC (rev 109634)
+++ zope.app.apidoc/trunk/src/zope/app/apidoc/component.txt	2010-03-03 22:55:55 UTC (rev 109635)
@@ -308,7 +308,7 @@
 object references.  This may change.
 
   >>> from zope.interface import implementedBy
-  >>> pprint(component.getInterfaceInfoDictionary(implementedBy(MyFoo)))
+  >>> pprint(component.getInterfaceInfoDictionary(implementedBy(MyFoo)), width=1)
   {'module': 'zope.app.apidoc.doctest', 'name': 'MyFoo'}
 
 
@@ -317,7 +317,7 @@
 
 This function returns the info dictionary of a type.
 
-  >>> pprint(component.getTypeInfoDictionary(tuple))
+  >>> pprint(component.getTypeInfoDictionary(tuple), width=1)
   {'module': '__builtin__',
    'name': 'tuple',
    'url': '__builtin__/tuple'}
@@ -372,7 +372,7 @@
 
 And now get the info dictionary:
 
-  >>> pprint(component.getAdapterInfoDictionary(reg))
+  >>> pprint(component.getAdapterInfoDictionary(reg), width=1)
   {'doc': 'doc info',
    'factory': 'zope.app.apidoc.doctest.MyResult',
    'factory_url': 'zope/app/apidoc/doctest/MyResult',
@@ -399,7 +399,7 @@
 
   >>> reg = AdapterRegistration(None, (IFoo, IBar), IResult, 'FooToResult',
   ...                            MyResultType, 'doc info')
-  >>> pprint(component.getAdapterInfoDictionary(reg))
+  >>> pprint(component.getAdapterInfoDictionary(reg), width=1)
   {'doc': 'doc info',
    'factory': 'zope.app.apidoc.doctest.MyResult2',
    'factory_url': None,
@@ -471,7 +471,7 @@
   >>> classImplements(MyFactoryType, IFactory)
   >>> ztapi.provideUtility(IFactory, MyFactoryType(), 'MyFactory')
 
-  >>> pprint(component.getFactoryInfoDictionary(
+  >>> pprint(component.getFactoryInfoDictionary, width=1)
   ...     component.getFactories(IMine).next()))
   {'description': u'',
    'name': u'MyFactory',

Modified: zope.app.apidoc/trunk/src/zope/app/apidoc/ifacemodule/browser.txt
===================================================================
--- zope.app.apidoc/trunk/src/zope/app/apidoc/ifacemodule/browser.txt	2010-03-03 22:14:27 UTC (rev 109634)
+++ zope.app.apidoc/trunk/src/zope/app/apidoc/ifacemodule/browser.txt	2010-03-03 22:55:55 UTC (rev 109635)
@@ -63,12 +63,12 @@
 
   >>> menu.request['search_str'] = 'Elem'
   >>> from pprint import pprint
-  >>> pprint(menu.findInterfaces())
+  >>> pprint(menu.findInterfaces(), width=1)
   [{'name': 'IElement',
     'url': './IElement/index.html'}]
 
   >>> menu.request['search_str'] = 'I'
-  >>> pprint(menu.findInterfaces())
+  >>> pprint(menu.findInterfaces(), width=1)
   [{'name': 'IAttribute',
     'url': './IAttribute/index.html'},
    {'name': 'IElement',
@@ -79,14 +79,14 @@
   >>> del menu.request['name_only']
 
   >>> menu.request['search_str'] = 'object'
-  >>> pprint(menu.findInterfaces())
+  >>> pprint(menu.findInterfaces(), width=1)
   [{'name': 'IAttribute',
     'url': './IAttribute/index.html'},
    {'name': 'IElement',
     'url': './IElement/index.html'}]
 
   >>> menu.request['search_str'] = 'Stores'
-  >>> pprint(menu.findInterfaces())
+  >>> pprint(menu.findInterfaces(), width=1)
   [{'name': 'IAttribute',
     'url': './IAttribute/index.html'}]
 
@@ -211,7 +211,7 @@
 
 we get a result:
 
-  >>> pprint(details.getTypes())
+  >>> pprint(details.getTypes(), width=1)
   [{'name': 'IMyType',
     'path': '__builtin__.IMyType'}]
 
@@ -249,7 +249,7 @@
 
 The required attributes are listed first, then the optional attributes.
 
-  >>> pprint(details.getFields())
+  >>> pprint(details.getFields(), width=1)
   [{'class': {'name': 'TextLine',
               'path': 'zope/schema/_bootstrapfields/TextLine'},
     'default': "u'Foo'",
@@ -296,7 +296,7 @@
 
 Get adapters where this interface is required.
 
-  >>> pprint(sorted(details.getGenericRequiredAdapters()))
+  >>> pprint(sorted(details.getGenericRequiredAdapters()), width=1)
   [{'doc': u'',
     'factory': 'None.append',
     'factory_url': None,
@@ -429,7 +429,7 @@
 
 Get adapters where this interface is provided.
 
-  >>> pprint(details.getProvidedAdapters())
+  >>> pprint(details.getProvidedAdapters(), width=1)
   [{'doc': u'',
     'factory': '__builtin__.Foo',
     'factory_url': None,
@@ -449,7 +449,7 @@
 
 Get the classes that implement this interface.
 
-  >>> pprint(details.getClasses())
+  >>> pprint(details.getClasses(), width=1)
   [{'path': '__builtin__.Foo',
     'url': '__builtin__/Foo'}]
 

Modified: zope.app.apidoc/trunk/src/zope/app/apidoc/presentation.txt
===================================================================
--- zope.app.apidoc/trunk/src/zope/app/apidoc/presentation.txt	2010-03-03 22:14:27 UTC (rev 109634)
+++ zope.app.apidoc/trunk/src/zope/app/apidoc/presentation.txt	2010-03-03 22:55:55 UTC (rev 109635)
@@ -389,7 +389,7 @@
   >>> reg = AdapterRegistration(None, (IFile, Interface, IHTTPRequest),
   ...                           Interface, 'view.html', Factory, 'reg info')
 
-  >>> pprint(presentation.getViewInfoDictionary(reg))
+  >>> pprint(presentation.getViewInfoDictionary(reg), width=1)
   {'doc': 'reg info',
    'factory': {'path': '__builtin__.Factory',
                'referencable': True,

Modified: zope.app.apidoc/trunk/src/zope/app/apidoc/utilitymodule/browser.txt
===================================================================
--- zope.app.apidoc/trunk/src/zope/app/apidoc/utilitymodule/browser.txt	2010-03-03 22:14:27 UTC (rev 109634)
+++ zope.app.apidoc/trunk/src/zope/app/apidoc/utilitymodule/browser.txt	2010-03-03 22:55:55 UTC (rev 109635)
@@ -158,5 +158,5 @@
 Now we can get the component information:
 
   >>> from pprint import pprint
-  >>> pprint(details.getComponent())
+  >>> pprint(details.getComponent(), width=1)
   {'path': '__builtin__.Foo', 'url': None}

Modified: zope.app.apidoc/trunk/src/zope/app/apidoc/zcmlmodule/browser.txt
===================================================================
--- zope.app.apidoc/trunk/src/zope/app/apidoc/zcmlmodule/browser.txt	2010-03-03 22:14:27 UTC (rev 109634)
+++ zope.app.apidoc/trunk/src/zope/app/apidoc/zcmlmodule/browser.txt	2010-03-03 22:55:55 UTC (rev 109635)
@@ -149,7 +149,7 @@
   >>> details.context.info = ParserInfo('foo.zcml', 2, 3)
   >>> info = details.getFileInfo()
   >>> from pprint import pprint
-  >>> pprint(info)
+  >>> pprint(info, width=1)
   {'column': 3,
    'ecolumn': 3,
    'eline': 2,
@@ -184,7 +184,7 @@
 
 Return information about the directive handler object.
 
-  >>> pprint(details.getHandler())
+  >>> pprint(details.getHandler(), width=1)
   {'path': 'None.foo',
    'url': None}
 
@@ -208,7 +208,7 @@
 
 the result becomes more interesting:
 
-  >>> pprint(details.getSubdirectives()) #doctest:+ELLIPSIS
+  >>> pprint(details.getSubdirectives(), width=1) #doctest:+ELLIPSIS
   [{'handler': {'path': 'None.handler', 'url': None},
     'info': 'info',
     'name': 'foo',



More information about the checkins mailing list