[Zope3-checkins] CVS: Zope3/src/zope/app/apidoc/viewmodule - browser.py:1.8

Tim Peters tim.one at comcast.net
Thu Apr 1 20:17:22 EST 2004


Update of /cvs-repository/Zope3/src/zope/app/apidoc/viewmodule
In directory cvs.zope.org:/tmp/cvs-serv4871/src/zope/app/apidoc/viewmodule

Modified Files:
	browser.py 
Log Message:
_getFactoryData():  Repaired Windows-specific test failure.


=== Zope3/src/zope/app/apidoc/viewmodule/browser.py 1.7 => 1.8 ===
--- Zope3/src/zope/app/apidoc/viewmodule/browser.py:1.7	Mon Mar 29 21:01:18 2004
+++ Zope3/src/zope/app/apidoc/viewmodule/browser.py	Thu Apr  1 20:17:21 2004
@@ -112,15 +112,18 @@
       >>> from zope.app.pagetemplate.simpleviewclass import SimpleViewClass
       >>> view = SimpleViewClass('index.pt')
       >>> info = _getFactoryData(view)
+
+      Normalize pathname separators.
+      >>> info['template'] = info['template'].replace('\\\\', '/')
       >>> pprint(info)
       [('path', 'zope.app.pagetemplate.simpleviewclass.simple'),
        ('referencable', True),
        ('resource', None),
        ('template', 'Zope3/src/zope/app/apidoc/viewmodule/index.pt'),
        ('url', 'zope/app/pagetemplate/simpleviewclass/simple')]
- 
+
       The factory is a simple type:
-      
+
       >>> info = _getFactoryData(3)
       >>> pprint(info)
       [('path', None),
@@ -151,7 +154,7 @@
        ('resource', None),
        ('template', None),
        ('url', 'zope/app/apidoc/viewmodule/browser/Factory')]
-      
+
     """
     info = {'path': None, 'url': None, 'template': None, 'resource': None,
             'referencable': True}
@@ -191,7 +194,7 @@
         info['resource'] = factory.rname
 
     return info
-    
+
 
 class ViewsDetails(object):
     """View for Views"""
@@ -205,7 +208,7 @@
         self.type = getInterface(self.context, request['type'])
 
         # XXX: The local presentation service does not have a
-        # getRegisteredMatching() method. Sigh. 
+        # getRegisteredMatching() method. Sigh.
         service = zapi.getService(None, 'Presentation')
         self.views = service.getRegisteredMatching(object=self.iface,
                                                    request=self.type)
@@ -221,7 +224,7 @@
 
           >>> from zope.app.apidoc.tests import pprint
           >>> from zope.publisher.browser import TestRequest
-        
+
           >>> form ={'iface': 'IFoo',
           ...        'type': 'IBrowserRequest'}
           >>> view = ViewsDetails(None, TestRequest(form=form))




More information about the Zope3-Checkins mailing list