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