[Epydoc-commits] SF.net SVN: epydoc: [1503] trunk/epydoc/src/epydoc/test
Brought to you by:
edloper
From: <ed...@us...> - 2007-02-14 08:40:30
|
Revision: 1503 http://svn.sourceforge.net/epydoc/?rev=1503&view=rev Author: edloper Date: 2007-02-14 00:40:29 -0800 (Wed, 14 Feb 2007) Log Message: ----------- - Test cases for zope2 and zope3 introspection support Added Paths: ----------- trunk/epydoc/src/epydoc/test/zope2.doctest trunk/epydoc/src/epydoc/test/zope3.doctest Added: trunk/epydoc/src/epydoc/test/zope2.doctest =================================================================== --- trunk/epydoc/src/epydoc/test/zope2.doctest (rev 0) +++ trunk/epydoc/src/epydoc/test/zope2.doctest 2007-02-14 08:40:29 UTC (rev 1503) @@ -0,0 +1,57 @@ +Regression Testing for Zope 2 support +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +:RequireModule: ExtensionClass + + >>> from epydoc.test.util import runintrospecter + +We treat extension classes as if they were classes: + + >>> from ExtensionClass import ExtensionClass + + >>> runintrospecter(s=''' + ... from ExtensionClass import ExtensionClass + ... ''', attribs='variables value pyval', + ... introspect='ExtensionClass') + ClassDoc [0] + +- pyval = <extension class ExtensionClass at 40... + +- variables + +- __basicnew__ => VariableDoc for __basicnew__ [1] + | +- value + | +- RoutineDoc [2] + | +- pyval = <CMethod object at ...> + +- __call__ => VariableDoc for __call__ [3] + | +- value + | +- RoutineDoc [4] + | +- pyval = <CMethod object at ...> + +- __delattr__ => VariableDoc for __delattr__ [5] + | +- value + | +- RoutineDoc [6] + | +- pyval = <CMethod object at ...> + +- __getattr__ => VariableDoc for __getattr__ [7] + | +- value + | +- RoutineDoc [8] + | +- pyval = <CMethod object at ...> + +- __init__ => VariableDoc for __init__ [9] + | +- value + | +- RoutineDoc [10] + | +- pyval = <CMethod object at ...> + +- __reduce__ => VariableDoc for __reduce__ [11] + | +- value + | +- RoutineDoc [12] + | +- pyval = <CMethod object at ...> + +- __repr__ => VariableDoc for __repr__ [13] + | +- value + | +- RoutineDoc [14] + | +- pyval = <CMethod object at ...> + +- __setattr__ => VariableDoc for __setattr__ [15] + | +- value + | +- RoutineDoc [16] + | +- pyval = <CMethod object at ...> + +- inheritedAttribute => VariableDoc for inheritedAttribute [17] + +- value + +- RoutineDoc [18] + +- pyval = <CMethod object at ...> + +(If we didn't add special support, `ExtensionClass` would be a +`GenericValueDoc`.) + Added: trunk/epydoc/src/epydoc/test/zope3.doctest =================================================================== --- trunk/epydoc/src/epydoc/test/zope3.doctest (rev 0) +++ trunk/epydoc/src/epydoc/test/zope3.doctest 2007-02-14 08:40:29 UTC (rev 1503) @@ -0,0 +1,27 @@ +Regression Testing for Zope 3 support +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +:RequireModule: zope.interface + + >>> from epydoc.test.util import runintrospecter + +We treat zope interface objects as if they were classes: + + >>> runintrospecter(s=''' + ... from zope.interface import Interface, Attribute + ... class IExample(Interface): + ... """This interface represents a generic example.""" + ... + ... text = Attribute("The text of the example") + ... + ... def setText(text): + ... "This method writes the passed text to the text attribute." + ... + ... def getText(): + ... "This method returns the value of the text attribute." + ... ''', attribs='pyval canonical_name', introspect='IExample') + ClassDoc for epydoc_test.IExample [0] + +- canonical_name = DottedName('epydoc_test', 'IExample') + +- pyval = <InterfaceClass epydoc_test.IExample> + +(If we didn't add special support, `IExample` would be a +`GenericValueDoc`.) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |