1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
|
<?xml version="1.0" encoding="ascii" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ascii" />
<meta name="generator" content="Docutils 0.5: http://docutils.sourceforge.net/" />
<title>Regression Testing for Zope 3 support</title>
<link rel="stylesheet" href="../custom.css" type="text/css" />
</head>
<body>
<div class="document" id="regression-testing-for-zope-3-support">
<h1 class="title">Regression Testing for Zope 3 support</h1>
<table class="docinfo" frame="void" rules="none">
<col class="docinfo-name" />
<col class="docinfo-content" />
<tbody valign="top">
<tr class="field"><th class="docinfo-name">RequireModule:</th><td class="field-body"><p class="first">zope.interface</p>
<pre class="py-doctest">
<span class="py-prompt">>>> </span><span class="py-keyword">from</span> epydoc.test.util <span class="py-keyword">import</span> runintrospecter</pre>
</td>
</tr>
</tbody>
</table>
<p>We treat zope interface objects as if they were classes:</p>
<blockquote>
<pre class="py-doctest">
<span class="py-prompt">>>> </span>runintrospecter(s=<span class="py-string">'''</span>
<span class="py-more">... </span><span class="py-string"> from zope.interface import Interface, Attribute</span>
<span class="py-more">... </span><span class="py-string"> class IExample(Interface):</span>
<span class="py-more">... </span><span class="py-string"> """This interface represents a generic example."""</span>
<span class="py-more">...</span>
<span class="py-more">... </span><span class="py-string"> text = Attribute("The text of the example")</span>
<span class="py-more">...</span>
<span class="py-more">... </span><span class="py-string"> def setText(text):</span>
<span class="py-more">... </span><span class="py-string"> "This method writes the passed text to the text attribute."</span>
<span class="py-more">...</span>
<span class="py-more">... </span><span class="py-string"> def getText():</span>
<span class="py-more">... </span><span class="py-string"> "This method returns the value of the text attribute."</span>
<span class="py-more">... </span><span class="py-string"> '''</span>, attribs=<span class="py-string">'pyval canonical_name'</span>, introspect=<span class="py-string">'IExample'</span>)
<span class="py-output">ClassDoc for epydoc_test.IExample [0]</span>
<span class="py-output"> +- canonical_name = DottedName('epydoc_test', 'IExample')</span>
<span class="py-output"> +- pyval = <InterfaceClass epydoc_test.IExample></span></pre>
</blockquote>
<p>(If we didn't add special support, <tt class="docutils literal"><span class="pre">IExample</span></tt> would be a
<cite>GenericValueDoc</cite>.)</p>
</div>
<table width="100%" class="navbox" cellpadding="1" cellspacing="0">
<tr>
<a class="nav" href="../index.html">
<td align="center" width="20%" class="nav">
<a class="nav" href="../index.html">
Home</a></td></a>
<a class="nav" href="../installing.html">
<td align="center" width="20%" class="nav">
<a class="nav" href="../installing.html">
Installing Epydoc</a></td></a>
<a class="nav" href="../using.html">
<td align="center" width="20%" class="nav">
<a class="nav" href="../using.html">
Using Epydoc</a></td></a>
<a class="nav" href="../epytext.html">
<td align="center" width="20%" class="nav">
<a class="nav" href="../epytext.html">
Epytext</a></td></a>
<td align="center" width="20%" class="nav">
<A href="http://sourceforge.net/projects/epydoc">
<IMG src="../sflogo.png"
width="88" height="26" border="0" alt="SourceForge"
align="top"/></A></td>
</tr>
</table>
</body>
</html>
|