~ubuntu-branches/debian/lenny/epydoc/lenny

« back to all changes in this revision

Viewing changes to doc/doctest/zope3.html

  • Committer: Bazaar Package Importer
  • Author(s): Kenneth J. Pronovici
  • Date: 2008-02-03 13:22:12 UTC
  • mfrom: (1.2.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080203132212-u2uohl6rswmlz2ra
Tags: 3.0.1-1
* New upstream release.
* Removed #! from top of epydoc/gui.py
* Got rid of version mangling in debian/watch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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">
 
4
<head>
 
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" />
 
9
</head>
 
10
<body>
 
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" />
 
16
<tbody valign="top">
 
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">&gt;&gt;&gt; </span><span class="py-keyword">from</span> epydoc.test.util <span class="py-keyword">import</span> runintrospecter</pre>
 
20
</td>
 
21
</tr>
 
22
</tbody>
 
23
</table>
 
24
<p>We treat zope interface objects as if they were classes:</p>
 
25
<blockquote>
 
26
<pre class="py-doctest">
 
27
<span class="py-prompt">&gt;&gt;&gt; </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">        &quot;&quot;&quot;This interface represents a generic example.&quot;&quot;&quot;</span>
 
31
<span class="py-more">...</span>
 
32
<span class="py-more">... </span><span class="py-string">        text = Attribute(&quot;The text of the example&quot;)</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">            &quot;This method writes the passed text to the text attribute.&quot;</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">            &quot;This method returns the value of the text attribute.&quot;</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 = &lt;InterfaceClass epydoc_test.IExample&gt;</span></pre>
 
43
</blockquote>
 
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>
 
46
</div>
 
47
<table width="100%" class="navbox" cellpadding="1" cellspacing="0">
 
48
  <tr>
 
49
  <a class="nav" href="../index.html">
 
50
    <td align="center" width="20%" class="nav">
 
51
    <a class="nav" href="../index.html">
 
52
    Home</a></td></a>
 
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">
 
64
    Epytext</a></td></a>
 
65
  <td align="center" width="20%" class="nav">
 
66
    
 
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>
 
71
    </tr>
 
72
</table>
 
73
</body>
 
74
</html>