[Checkins] SVN: Sandbox/ulif/grokadmin/trunk/src/grokui/admin/objectinfo.txt Fix tests to reflect new package namespace.

Uli Fouquet uli at gnufix.de
Thu Jul 10 09:35:22 EDT 2008


Log message for revision 88188:
  Fix tests to reflect new package namespace.

Changed:
  U   Sandbox/ulif/grokadmin/trunk/src/grokui/admin/objectinfo.txt

-=-
Modified: Sandbox/ulif/grokadmin/trunk/src/grokui/admin/objectinfo.txt
===================================================================
--- Sandbox/ulif/grokadmin/trunk/src/grokui/admin/objectinfo.txt	2008-07-10 13:35:08 UTC (rev 88187)
+++ Sandbox/ulif/grokadmin/trunk/src/grokui/admin/objectinfo.txt	2008-07-10 13:35:22 UTC (rev 88188)
@@ -33,10 +33,10 @@
 Manfred. We create an ObjectInfo by giving the object to examine as
 parameter: 
 
-  >>> from grokadmin.objectinfo import ObjectInfo
+  >>> from grokui.admin.objectinfo import ObjectInfo
   >>> info = ObjectInfo(manfred)
   >>> info
-  <grokadmin.objectinfo.ObjectInfo object at ...>
+  <grokui.admin.objectinfo.ObjectInfo object at ...>
 
 What can we know about Manfred now?
 
@@ -50,15 +50,15 @@
 A Mammoth is not a module. Let's see, what happens when we examine a
 real module:
 
-  >>> import grokadmin.objectinfo
-  >>> ObjectInfo(grokadmin).getmoduleinfo() in [('__init__', '.pyc',
+  >>> import grokui.admin.objectinfo
+  >>> ObjectInfo(grokui.admin).getmoduleinfo() in [('__init__', '.pyc',
   ... 'rb', 2), ('__init__', '.py', 'U', 1)]
   True
 
   >>> info.getmodulename() is None
   True
 
-  >>> ObjectInfo(grokadmin.objectinfo).getmodulename()
+  >>> ObjectInfo(grokui.admin.objectinfo).getmodulename()
   'objectinfo'
 
   >>> info.isclass()
@@ -117,7 +117,7 @@
 
 We have a comment in the sources of ObjectInfo:
 
-  >>> ObjectInfo(grokadmin.objectinfo.ObjectInfo.getdoc).getcomments()
+  >>> ObjectInfo(grokui.admin.objectinfo.ObjectInfo.getdoc).getcomments()
   '# Source code related...\n'
 
 A bug in ``inspect.getcomments()`` causes objects with regular
@@ -139,10 +139,10 @@
 The filename can be a compiled file ('.pyc') or a Python source file
 ('.py'):
 
-  >>> filename = ObjectInfo(grokadmin.objectinfo.ObjectInfo).getfile()
+  >>> filename = ObjectInfo(grokui.admin.objectinfo.ObjectInfo).getfile()
   >>> filename = filename[-1] == 'c' and filename or filename + 'c'
   >>> pnorm(filename)
-  '.../grokadmin/objectinfo.pyc'
+  '.../grokui/admin/objectinfo.pyc'
 
 
   >>> info.getmodule()
@@ -154,13 +154,13 @@
   >>> info.getsourcefile() is None
   True
 
-  >>> pnorm(ObjectInfo(grokadmin.objectinfo.ObjectInfo).getsourcefile())
-  '.../grokadmin/objectinfo.py'
+  >>> pnorm(ObjectInfo(grokui.admin.objectinfo.ObjectInfo).getsourcefile())
+  '.../grokui/admin/objectinfo.py'
 
   >>> info.getsourcelines() is None
   True
 
-  >>> ObjectInfo(grokadmin.objectinfo.ObjectInfo.isclass).getsourcelines()
+  >>> ObjectInfo(grokui.admin.objectinfo.ObjectInfo.isclass).getsourcelines()
   (['    def isclass(self):\n',...)
 
   >>> ObjectInfo(len).getsourcefile() is None
@@ -169,7 +169,7 @@
   >>> info.getsource() is None
   True
 
-  >>> ObjectInfo(grokadmin.objectinfo.ObjectInfo.isclass).getsource()
+  >>> ObjectInfo(grokui.admin.objectinfo.ObjectInfo.isclass).getsource()
   '    def isclass(self):\n...'
 
 A bug in ``inspect.getsource()`` causes objects with regular
@@ -205,10 +205,10 @@
 
 Then get an associated ZopeObjectInfo:
 
-  >>> from grokadmin.objectinfo import ZopeObjectInfo
+  >>> from grokui.admin.objectinfo import ZopeObjectInfo
   >>> root_info = ZopeObjectInfo(root)
   >>> root_info
-  <grokadmin.objectinfo.ZopeObjectInfo object at ...>
+  <grokui.admin.objectinfo.ZopeObjectInfo object at ...>
 
 We create a folder in the root:
 
@@ -220,7 +220,7 @@
 
   >>> subfolder_info = ZopeObjectInfo(subfolder)
   >>> subfolder_info
-  <grokadmin.objectinfo.ZopeObjectInfo object at ...>
+  <grokui.admin.objectinfo.ZopeObjectInfo object at ...>
 
 Finally, we create some content in the subfolder. A cave, where
 Manfred can stay
@@ -234,14 +234,14 @@
   >>> subfolder['SweetHome'] = sweethome
   >>> sweethome_info = ZopeObjectInfo(sweethome)
   >>> sweethome_info
-  <grokadmin.objectinfo.ZopeObjectInfo object at ...>
+  <grokui.admin.objectinfo.ZopeObjectInfo object at ...>
 
 and put Manfred into the cave:
 
   >>> sweethome['Owner'] = manfred
   >>> manfred_info = ZopeObjectInfo(manfred)
   >>> manfred_info
-   <grokadmin.objectinfo.ZopeObjectInfo object at ...>
+   <grokui.admin.objectinfo.ZopeObjectInfo object at ...>
 
 Now we can examine the objects further.
 
@@ -337,7 +337,7 @@
   (<InterfaceClass zope.app.folder.interfaces.IFolder>, <InterfaceClass persistent.interfaces.IPersistent>, <InterfaceClass zope.location.interfaces.IPossibleSite>, <InterfaceClass zope.app.container.interfaces.IContained>)
 
   >>> sweethome_info.getProvidedInterfaces()
-  (<InterfaceClass zope.annotation.interfaces.IAttributeAnnotatable>, <InterfaceClass grok.interfaces.IContainer>, <InterfaceClass zope.app.container.interfaces.IContainer>, <InterfaceClass zope.app.container.interfaces.IContained>, <InterfaceClass persistent.interfaces.IPersistent>)
+  (<InterfaceClass zope.annotation.interfaces.IAttributeAnnotatable>, <InterfaceClass grok.interfaces.IContainer>, ...<InterfaceClass zope.app.container.interfaces.IContainer>, <InterfaceClass zope.app.container.interfaces.IContained>, <InterfaceClass persistent.interfaces.IPersistent>)
 
 Manfred again, is a bit too plain to give us interesting information:
 



More information about the Checkins mailing list