tzh
2024-08-22 c7d0944258c7d0943aa7b2211498fd612971ce27
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
Q\¬Qc@sìddlZddlZddlZddlZddlZddlZddlZddlZddlZddl    Z
ddl Z ddl mZddlmZddl mZmZmZmZddl mZe jjrëdZndZd    jƒZed
„eDƒƒZd jƒZed „eDƒƒZd ZdZ d„Z!d„Z"d„Z#d„Z$dej%fd„ƒYZ&dej%fd„ƒYZ'dej%fd„ƒYZ(dej%fd„ƒYZ)d„Z*e+dkrèe*ƒndS(iÿÿÿÿN(t
namedtuple(tassert_python_ok(tTESTFNtrmtreet reap_childrentcaptured_stdout(t    pydoc_mods.dictionary for instance variables (if defined)s2list of weak references to the object (if defined)ts‹
NAME
    test.pydoc_mod - This is a test module for test_pydoc
 
FILE
    %s
%s
CLASSES
    __builtin__.object
        B
    A
    
    class A
     |  Hello and goodbye
     |  
     |  Methods defined here:
     |  
     |  __init__()
     |      Wow, I have no function!
    
    class B(__builtin__.object)
     |  Data descriptors defined here:
     |  
     |  __dict__%s
     |  
     |  __weakref__%s
     |  
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |  
     |  NO_MEANING = 'eggs'
 
FUNCTIONS
    doc_func()
        This function solves all of the world's problems:
        hunger
        lack of Python
        war
    
    nodoc_func()
 
DATA
    __author__ = 'Benjamin Peterson'
    __credits__ = 'Nobody'
    __version__ = '1.2.3.4'
 
VERSION
    1.2.3.4
 
AUTHOR
    Benjamin Peterson
 
CREDITS
    Nobody
ccs%|]}|rd|ndVqdS(s
     |      RN((t.0ts((sW/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pydoc.pys    <genexpr>Tss—
<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="test.html"><font color="#ffffff">test</font></a>.pydoc_mod</strong></big></big> (version 1.2.3.4)</font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:%s">%s</a>%s</font></td></tr></table>
    <p><tt>This&nbsp;is&nbsp;a&nbsp;test&nbsp;module&nbsp;for&nbsp;test_pydoc</tt></p>
<p>
<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%%"><dl>
<dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="test.pydoc_mod.html#B">B</a>
</font></dt></dl>
</dd>
<dt><font face="helvetica, arial"><a href="test.pydoc_mod.html#A">A</a>
</font></dt></dl>
 <p>
<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="A">class <strong>A</strong></a></font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>Hello&nbsp;and&nbsp;goodbye<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%%">Methods defined here:<br>
<dl><dt><a name="A-__init__"><strong>__init__</strong></a>()</dt><dd><tt>Wow,&nbsp;I&nbsp;have&nbsp;no&nbsp;function!</tt></dd></dl>
 
</td></tr></table> <p>
<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="B">class <strong>B</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%%">Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>%s</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>%s</tt></dd>
</dl>
<hr>
Data and other attributes defined here:<br>
<dl><dt><strong>NO_MEANING</strong> = 'eggs'</dl>
 
</td></tr></table></td></tr></table><p>
<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
    
<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%%"><dl><dt><a name="-doc_func"><strong>doc_func</strong></a>()</dt><dd><tt>This&nbsp;function&nbsp;solves&nbsp;all&nbsp;of&nbsp;the&nbsp;world's&nbsp;problems:<br>
hunger<br>
lack&nbsp;of&nbsp;Python<br>
war</tt></dd></dl>
 <dl><dt><a name="-nodoc_func"><strong>nodoc_func</strong></a>()</dt></dl>
</td></tr></table><p>
<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%%"><strong>__author__</strong> = 'Benjamin Peterson'<br>
<strong>__credits__</strong> = 'Nobody'<br>
<strong>__version__</strong> = '1.2.3.4'</td></tr></table><p>
<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#7799ee">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Author</strong></big></font></td></tr>
    
<tr><td bgcolor="#7799ee"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%%">Benjamin&nbsp;Peterson</td></tr></table><p>
<table width="100%%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#7799ee">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Credits</strong></big></font></td></tr>
    
<tr><td bgcolor="#7799ee"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%%">Nobody</td></tr></table>
ccs!|]}|jddƒVqdS(t s&nbsp;N(treplace(RR    ((sW/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pydoc.pys    <genexpr>´ss&no Python documentation found for '%s'sCproblem in %s - <type 'exceptions.ImportError'>: No module named %scOs8||f}tdtj||Ž\}}}|jƒS(sW
    Runs pydoc on the specified module. Returns the stripped
    output of pydoc.
    s-B(Rtpydoct__file__tstrip(t module_nametargstenvtrctoutterr((sW/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pydoc.pyt    run_pydoc½s !cCsWtjƒ}|j|ƒ}|jtƒp-d}|rGd|d}n|jƒ|fS(s&Returns pydoc generated output as htmlRs <br><a href="s">Module Docs</a>(R tHTMLDoct    docmodulet    getdoclocRR(tmoduletdoctoutputtloc((sW/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pydoc.pytget_pydoc_htmlÇs  cCsxtjƒ}|jtƒpd}|r8d|d}n|j|ƒ}tjdƒ}|jd|ƒ}|jƒ|fS(s&Returns pydoc generated output as textRs
MODULE DOCS
    s
s.(    R tTextDocRRRtretcompiletsubR(RRRRtpatt((sW/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pydoc.pytget_pydoc_textÐs c    CsX|jtƒ}|jtƒ}tj||ddddddƒ}ddj|ƒGHd    S(
s"Prints unified diffs for two textstnitfromfiletexpectedttofiletgots
RN(t
splitlinestTruetdifflibt unified_difftjoin(ttext1ttext2tlines1tlines2tdiffs((sW/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pydoc.pyt print_diffsÞs
    t PyDocDocTestcBsƒeZejejjdkdƒd„ƒZejejjdkdƒd„ƒZd„Z    d„Z
d„Z d„Z d„Z RS(    is)Docstrings are omitted with -O2 and abovecCs˜ttƒ\}}tjtƒ}tjdkrNddl}|j|ƒ}n|}t|||ft    }||kr”t
||ƒ|j dƒndS(Ntwin32iÿÿÿÿs%outputs are not equal, see diff above( RRtinspectt
getabsfiletsystplatformt
nturl2patht pathname2urltexpected_html_patterntexpected_html_data_docstringsR3tfail(tselftresulttdoc_loctmod_fileR:tmod_urlt expected_html((sW/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pydoc.pyt test_html_docés    cCs\ttƒ\}}ttjtƒ|ft}||krXt||ƒ|jdƒndS(Ns%outputs are not equal, see diff above(R#Rtexpected_text_patternR6R7texpected_text_data_docstringsR3R>(R?R@RAt expected_text((sW/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pydoc.pyt test_text_docús  cCs,ttjƒ\}}|j|ddƒdS(NRs'MODULE DOCS incorrectly includes a link(R#txmltetreet assertEqual(R?R@RA((sW/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pydoc.pyttest_issue8225scCsjddd„ƒY}ddd„ƒY}tj|ƒƒ}tj|ƒƒ}|j|jddƒ|ƒdS(NtAcBseZdZRS(i*(t__name__t
__module__(((sW/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pydoc.pyRN stBcBseZRS((RORP(((sW/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pydoc.pyRQs(((R t
render_docRLR (R?RNRQtadoctbdoc((sW/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pydoc.pyttest_non_str_name
s
cCs3d}t|ƒ}t|}|j||dƒdS(Nstest.i_am_not_heres&documentation for missing module found(Rtmissing_patternRL(R?tmissing_moduleR@R&((sW/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pydoc.pyt test_not_heres
 
 cCs9d}t|ƒ}t|jƒ}|j||dƒdS(Ns test.i_am_not_here sLwhite space was not stripped from module name or other error output mismatch(RRVRRL(R?RWR@R&((sW/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pydoc.pyttest_input_strips
  cCsetj}|j|dƒdƒ|j|dƒdƒ|j|dƒdƒ|j|dƒdƒdS(Ns<function stripid at 0x88dcee4>s<function stripid>s <function stripid at 0x01F65390>t42s<type 'exceptions.Exception'>(R tstripidRL(R?R[((sW/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pydoc.pyt test_stripid$s    (RORPtunittesttskipIfR8tflagstoptimizeRERIRMRURXRYR\(((sW/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pydoc.pyR4çs
               tPydocImportTestcBs,eZd„Zd„Zd„Zd„ZRS(cCs&tjtƒ|_|jttƒdS(N(tostmkdirRttest_dirt
addCleanupR(R?((sW/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pydoc.pytsetUp4sc    CsÝd}d dddj|ƒdj|ƒfdj|ƒ|ff}tjjt|ƒtjd    }xt|D]l\}}t|d
ƒ}|jd j|ƒƒWdQXt|d tƒ}t    ||f}|j
||ƒqiWdS(Nt testmod_xyzzyt i_am_not_herestest.i_am_not_here_eitherti_am_not_here_eitherstest.i_am_not_here.neither_am_isi_am_not_here.neither_am_isi_am_not_here.{}stest.{}tpytws
import {}
t
PYTHONPATH(RhRh(stest.i_am_not_here_eitherRi(stest.i_am_not_here.neither_am_isi_am_not_here.neither_am_i( tformatRbtpathR-RtextseptopentwriteRtbadimport_patternRL(    R?tmodnamet    testpairstsourcefnt importstringt expectedinmsgtfR@R&((sW/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pydoc.pyttest_badimport8s  cCstjjtdƒ}tj|ƒtjj|dƒtjd}t|dƒ}|jdƒWdQXtdddtƒ}|j    d    |ƒdS(
Nt    syntaxerrt__init__RjRksinvalid python syntax = $1
tzqwykjvs-kRlR(
RbRnR-RRcRoRpRqRRL(R?tpkgdirt    badsyntaxRxR@((sW/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pydoc.pyttest_apropos_with_bad_packageNs  cCsjtjjtdƒ|_tj|jdƒ|jtj|jƒtdddtƒ}|j    d|ƒdS(Nt
unreadableiR|s-kRlR(
RbRnR-Rtunreadable_dirRcRetrmdirRRL(R?R@((sW/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pydoc.pyt test_apropos_with_unreadable_dirXs
(RORPRfRyRRƒ(((sW/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pydoc.pyRa2s            
tTestDescriptionscBs,eZd„Zd„Zd„Zd„ZRS(cCs3ddlm}tj|ƒ}|jd|ƒdS(Niÿÿÿÿ(t pydocfodderR…(ttestR…R RRtassertIn(R?R…R((sW/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pydoc.pyt test_moduleescCsuddd„ƒY}|ƒ}|jtj|ƒdƒ|jtj|ƒdƒdt}|j|tj|ƒƒdS(NtCcBseZdZRS(s Classic class(RORPt__doc__(((sW/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pydoc.pyR‰lssclass Cs instance of Csinstance of C in module %s((RLR tdescribeROR‡RR(R?R‰tcR&((sW/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pydoc.pyttest_classic_classks     
cCsxdtfd„ƒY}|ƒ}|jtj|ƒdƒ|jtj|ƒdƒdt}|j|tj|ƒƒdS(NR‰cBseZdZRS(sNew-style class(RORPRŠ(((sW/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pydoc.pyR‰tssclass CsC in module %s object(tobjectRLR R‹ROR‡RR(R?R‰RŒR&((sW/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pydoc.pyt
test_classss     
cCswtdddgdtƒ}tƒ}t|ƒWdQX|jƒ}|jd|ƒ|jd|ƒ|jd|ƒdS(NtNTtabctdeftrenamet_1t_replacet_asdict(RR*RthelptgetvalueR‡(R?Rthelp_iothelptext((sW/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pydoc.pyt!test_namedtuple_public_underscore|s  (RORPRˆRRR›(((sW/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pydoc.pyR„cs                t
TestHelpercBseZd„Zd„ZRS(cCs)|jttjjƒttjƒƒdS(N(RLtsortedR tHelpertkeywordstkeywordtkwlist(R?((sW/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pydoc.pyt test_keywords‡scCs£x_d D]W}|jtj|ƒƒytj|ƒWqtk
r]|jdjtƒƒqXqWx:d D]2}|jtj|ƒƒ|j    ttj|ƒqiWdS(Ntstrs str.translates__builtin__.strs__builtin__.str.translatesfinding the doc of {!r} failedtnot__builtin__tstrrrsstrr.translatesstr.trrrranslates__builtin__.strrrs__builtin__.str.trrranslate(sstrs str.translates__builtin__.strs__builtin__.str.translate(R¤R¥sstrr.translatesstr.trrrranslates__builtin__.strrrs__builtin__.str.trrranslate(
tassertIsNotNoneR tlocateRRt ImportErrorR>Rmtot assertIsNonet assertRaises(R?tname((sW/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pydoc.pyt test_builtin‹s
 
(RORPR¢R­(((sW/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pydoc.pyRœ†s    cCs,ztjjttttƒWdtƒXdS(N(R†t test_supportt run_unittestR4RaR„RœR(((sW/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pydoc.pyt    test_mains   t__main__(s.dictionary for instance variables (if defined)s2list of weak references to the object (if defined)(RR(,RbR8R+t __builtin__RR R6R R]t    xml.etreeRJttest.test_supportR†t collectionsRttest.script_helperRRRRRRR®tHAVE_DOCSTRINGStexpected_data_docstringsRRFttupleRGR<R=RVRrRRR#R3tTestCaseR4RaR„RœR°RO(((sW/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_pydoc.pyt<module>sJ           "     9      ]          
                   K1#