[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/apidoc/classmodule/__init__.py Made tests runnable using -O Python option.

Stephan Richter srichter at cosmos.phy.tufts.edu
Mon Aug 9 11:45:31 EDT 2004


Log message for revision 26959:
  Made tests runnable using -O Python option.
  


Changed:
  U   Zope3/trunk/src/zope/app/apidoc/classmodule/__init__.py


-=-
Modified: Zope3/trunk/src/zope/app/apidoc/classmodule/__init__.py
===================================================================
--- Zope3/trunk/src/zope/app/apidoc/classmodule/__init__.py	2004-08-09 09:57:47 UTC (rev 26958)
+++ Zope3/trunk/src/zope/app/apidoc/classmodule/__init__.py	2004-08-09 15:45:31 UTC (rev 26959)
@@ -162,9 +162,12 @@
     soon as you have the object::
 
       >>> keys = module.keys()
-      >>> keys.sort()
-      >>> keys[:3]
-      ['APIDocumentation', 'apidoc-configure.zcml', 'apidocNamespace']
+      >>> 'APIDocumentation' in keys
+      True
+      >>> 'apidocNamespace' in keys
+      True
+      >>> 'handleNamespace' in keys
+      True
 
       >>> print module['browser'].getPath()
       zope.app.apidoc.browser
@@ -202,7 +205,8 @@
         # Detect packages
         if hasattr(self.__module, '__file__') and \
                (self.__module.__file__.endswith('__init__.py') or
-                self.__module.__file__.endswith('__init__.pyc')):
+                self.__module.__file__.endswith('__init__.pyc')or
+                self.__module.__file__.endswith('__init__.pyo')):
             dir = os.path.dirname(self.__module.__file__)
             for file in os.listdir(dir):
                 if file in IGNORE_FILES:



More information about the Zope3-Checkins mailing list