Your IP : 216.73.216.85


Current Path : /opt/alt/python36/lib64/python3.6/test/__pycache__/
Upload File :
Current File : //opt/alt/python36/lib64/python3.6/test/__pycache__/test_pydoc.cpython-36.opt-2.pyc

3

��2a'��
@s�ddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlmZddlmZddlm Z ddlm!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)ddlm*Z*yddl+Z+Wne,k
�r:dZ+YnXGdd�d�Z-ej.j/�rZd9Z0nd:Z0d
j1�Z2e3dd�e0D��Z4dj1�Z5e3dd�e0D��Z6dj7dej8�Z9dZ:dj1�Z;dj1�Z<dj1�Z=dj1�Z>dj1�Z?dd�Z@dd�ZAdd�ZBd d!�ZCd"d#�ZDGd$d%�d%ejE�ZFGd&d'�d'ejE�ZGGd(d)�d)eF�ZHGd*d+�d+ejE�ZIejJe+d,�Gd-d.�d.ejE��ZKGd/d0�d0eF�ZLGd1d2�d2ejE�ZMGd3d4�d4ejE�ZNe$d5d6��ZOePd7k�r�eO�dS);�N)�StringIO)�
namedtuple)�assert_python_ok)	�TESTFN�rmtree�
reap_children�reap_threads�captured_output�captured_stdout�captured_stderr�unlink�requires_docstrings)�	pydoc_modc@seZdZdS)�nonasciiN)�__name__�
__module__�__qualname__�rr�//opt/alt/python36/lib64/python3.6/test_pydoc.pyr'sr�.dictionary for instance variables (if defined)�2list of weak references to the object (if defined)��aq
NAME
    test.pydoc_mod - This is a test module for test_pydoc
%s
CLASSES
    builtins.object
        A
        B
        C
    
    class A(builtins.object)
     |  Hello and goodbye
     |  
     |  Methods defined here:
     |  
     |  __init__()
     |      Wow, I have no function!
     |  
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |  
     |  __dict__%s
     |  
     |  __weakref__%s
    
    class B(builtins.object)
     |  Data descriptors defined here:
     |  
     |  __dict__%s
     |  
     |  __weakref__%s
     |  
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |  
     |  NO_MEANING = 'eggs'
     |  
     |  __annotations__ = {'NO_MEANING': <class 'str'>}
    
    class C(builtins.object)
     |  Methods defined here:
     |  
     |  get_answer(self)
     |      Return say_no()
     |  
     |  is_it_true(self)
     |      Return self.get_answer()
     |  
     |  say_no(self)
     |  
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |  
     |  __dict__
     |      dictionary for instance variables (if defined)
     |  
     |  __weakref__
     |      list of weak references to the object (if defined)

FUNCTIONS
    doc_func()
        This function solves all of the world's problems:
        hunger
        lack of Python
        war
    
    nodoc_func()

DATA
    __xyz__ = 'X, Y and Z'

VERSION
    1.2.3.4

AUTHOR
    Benjamin Peterson

CREDITS
    Nobody

FILE
    %s
ccs|]}|rd|ndVqdS)z
     |      rNr)�.0�srrr�	<genexpr>�sra*
<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="builtins.html#object">builtins.object</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="test.pydoc_mod.html#A">A</a>
</font></dt><dt><font face="helvetica, arial"><a href="test.pydoc_mod.html#B">B</a>
</font></dt><dt><font face="helvetica, arial"><a href="test.pydoc_mod.html#C">C</a>
</font></dt></dl>
</dd>
</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>(<a href="builtins.html#object">builtins.object</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>

<hr>
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>
</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="builtins.html#object">builtins.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>

<dl><dt><strong>__annotations__</strong> = {'NO_MEANING': &lt;class 'str'&gt;}</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="C">class <strong>C</strong></a>(<a href="builtins.html#object">builtins.object</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%%">Methods defined here:<br>
<dl><dt><a name="C-get_answer"><strong>get_answer</strong></a>(self)</dt><dd><tt>Return&nbsp;<a href="#C-say_no">say_no</a>()</tt></dd></dl>

<dl><dt><a name="C-is_it_true"><strong>is_it_true</strong></a>(self)</dt><dd><tt>Return&nbsp;self.<a href="#C-get_answer">get_answer</a>()</tt></dd></dl>

<dl><dt><a name="C-say_no"><strong>say_no</strong></a>(self)</dt></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</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>__xyz__</strong> = 'X, Y and Z'</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)� z&nbsp;N)�replace)rrrrrrsz~No Python documentation found for %r.
Use help() to get the interactive help utility.
Use help(str) for help on the str class.�
z7problem in %s - ModuleNotFoundError: No module named %ra/
Help on class DA in module %s:

class DA(builtins.object)
 |  Data descriptors defined here:
 |  
 |  __dict__%s
 |  
 |  __weakref__%s
 |  
 |  ham
 |  
 |  ----------------------------------------------------------------------
 |  Data and other attributes inherited from Meta:
 |  
 |  ham = 'spam'
z�
Help on class Class in module %s:

class Class(builtins.object)
 |  Data and other attributes inherited from Meta:
 |  
 |  LIFE = 42
z�
Help on class Class1 in module %s:

class Class1(builtins.object)
 |  Data and other attributes inherited from Meta1:
 |  
 |  one = 1
a
Help on class Class2 in module %s:

class Class2(Class1)
 |  Method resolution order:
 |      Class2
 |      Class1
 |      builtins.object
 |  
 |  Data and other attributes inherited from Meta1:
 |  
 |  one = 1
 |  
 |  ----------------------------------------------------------------------
 |  Data and other attributes inherited from Meta3:
 |  
 |  three = 3
 |  
 |  ----------------------------------------------------------------------
 |  Data and other attributes inherited from Meta2:
 |  
 |  two = 2
z�
Help on class C in module %s:

class C(builtins.object)
 |  Data and other attributes defined here:
 |  
 |  here = 'present!'
cOs,||f}tdtjf|�|�\}}}|j�S)Nz-B)r�pydoc�__file__�strip)Zmodule_name�args�envZrc�out�errrrr�	run_pydocVs
r&cCs<tj�}|j|�}|jt�pd}|r0d|d}|j�|fS)Nrz
<br><a href="z">Module Docs</a>)r�HTMLDoc�	docmodule�	getdoclocrr!)�module�doc�output�locrrr�get_pydoc_html`s
r.cCs6tjj}||tjjt���}tj�}|j||d�}|S)N)�basedir)�os�path�dirname�realpathr r�TextDocr))r*r2r/r+r-rrr�get_pydoc_linkis
r5cCsRtj�}|jt�pd}|r&d|d}|j|�}tjd�}|jd|�}|j�|fS)Nrz
MODULE DOCS
    rz.)	rr4r)rr(�re�compile�subr!)r*r+r-r,Zpattrrr�get_pydoc_textqs

r9cCs4|jd�\}}}|jd�\}}}|jd�\}}}|S)Nz</head>z<title>z</title>)�	partition)�text�header�_�titlerrr�get_html_titlesr?c@s.eZdZddd�Zejd	dd��Zdd�ZdS)
�
PydocBaseTestNcs&|ptjjt�g�d��fdd�	}|S)Nrcs�|p�||�S)Nr)r1�prefix�onerror)�default_path�
walk_packagesrr�wrapper�sz8PydocBaseTest._restricted_walk_packages.<locals>.wrapper)NrN)r0r1r2r )�selfrDr1rEr)rCrDr�_restricted_walk_packages�sz'PydocBaseTest._restricted_walk_packagesccs,tj}|j||�t_z
dVWd|t_XdS)N)�pkgutilrDrG)rFr1rDrrr�restrict_walk_packages�s
z$PydocBaseTest.restrict_walk_packagescCs&tj|d�}t|�}|j|||�|S)Nz	text/html)r�_url_handlerr?�assertEqual)rF�urlZexpected_titler;�resultrrr�call_url_handler�szPydocBaseTest.call_url_handler)N)N)rrrrG�
contextlib�contextmanagerrIrNrrrrr@�s

	r@c@s�eZdZdZejejjdkd�eje	ed�o2ej
�d�edd����Zejejjdkd�eje	ed�olej
�d�edd	����Z
d
d�Zdd
�Zdd�Zdd�Zdd�Zdd�Zejejjdkd�dd��Zdd�Zdd�Zejejjdkd�eje	ed��oej
�d�edd����Zdd �Zd!d"�Zejejjdkd�d#d$��Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Z d1d2�Z!dS)3�PydocDocTestNrz)Docstrings are omitted with -O2 and above�gettracez1trace function introduces __locals__ unexpectedlycCsDtt�\}}tjt�}tjj|�}t|||ft}|j	||�dS)N)
r.r�inspect�
getabsfile�urllib�parseZquote�expected_html_pattern�expected_html_data_docstringsrK)rFrM�doc_locZmod_fileZmod_urlZ
expected_htmlrrr�
test_html_doc�s
zPydocDocTest.test_html_doccCs6tt�\}}t|fttjt�f}|j||�dS)N)r9r�expected_text_pattern�expected_text_data_docstringsrSrTrK)rFrMrY�
expected_textrrr�
test_text_doc�s
zPydocDocTest.test_text_doccCs4ddl}Gdd�d|j�}tj|�}|jd|�dS)Nrc@seZdZdZdZdS)zIPydocDocTest.test_text_enum_member_with_value_zero.<locals>.BinaryIntegerr�N)rrrZzero�onerrrr�
BinaryInteger�sraz<BinaryInteger.zero: 0>)�enum�IntEnumr�
render_doc�assertIn)rFrbrar+rrr�%test_text_enum_member_with_value_zero�s
z2PydocDocTest.test_text_enum_member_with_value_zerocCsttjj�}|jd|�dS)Nzxml.etree.elementtree)r5�xml�etreeZElementTreere)rFZdoc_linkrrr�,test_mixed_case_module_names_are_lower_cased�sz9PydocDocTest.test_mixed_case_module_names_are_lower_casedcCs ttj�\}}|j|dd�dS)Nrz'MODULE DOCS incorrectly includes a link)r9rgrhrK)rFrMrYrrr�test_issue8225�szPydocDocTest.test_issue8225cCs&tj}zdt_tj�Wd|t_XdS)N)�sys�stdinr�getpager)rFZprevious_stdinrrr�test_getpager_with_stdin_none�s
z*PydocDocTest.test_getpager_with_stdin_nonecCsLGdd�d�}Gdd�d�}tj|��}tj|��}|j|jdd�|�dS)Nc@seZdZdZdS)z)PydocDocTest.test_non_str_name.<locals>.A�*N)rrrrrrr�A�srpc@seZdZdS)z)PydocDocTest.test_non_str_name.<locals>.BN)rrrrrrr�B�srq)rrdrKr)rFrprqZadocZbdocrrr�test_non_str_name�s
zPydocDocTest.test_non_str_namecCs,d}tt|�d�}t|}|j||d�dS)Nztest.i_am_not_here�asciiz&documentation for missing module found)�strr&�missing_patternrK)rF�missing_modulerM�expectedrrr�
test_not_here�s
zPydocDocTest.test_not_herez)Docstrings are omitted with -OO and abovecCs*tddd�}tjjdd�}|j||�dS)Nztest.test_pydoc.nonasciirs)ZPYTHONIOENCODING�backslashreplace)r&r�__doc__�encodere)rFrMZencodedrrr�test_not_ascii�szPydocDocTest.test_not_asciicCs.d}tt|�d�}t|j�}|j||�dS)Nz test.i_am_not_here rs)rtr&rur!rK)rFrvrMrwrrr�test_input_strip�szPydocDocTest.test_input_stripcCsJtj}|j|d�d�|j|d�d�|j|d�d�|j|d�d�dS)Nz<function stripid at 0x88dcee4>z<function stripid>z <function stripid at 0x01F65390>Z42z<type 'exceptions.Exception'>)r�stripidrK)rFr~rrr�test_stripid�s


zPydocDocTest.test_stripidcCs�t}tj}dd�}d|_t�}tj|d�}tt�\}}d}dj�}	t	j
|	�}	|	t}
|t_z�td��v}td��b}|j|�|j
�j�}
|
|fttjt�f}|jd|j
��|jd|j
��|j||
�WdQRXWdQRXWd|t_XdS)	NcSsdd�S)NcSs|S)Nr)�xrrr�<lambda>szJPydocDocTest.test_help_output_redirect.<locals>.<lambda>.<locals>.<lambda>rrrrrr�sz8PydocDocTest.test_help_output_redirect.<locals>.<lambda>)r,ztest.pydoc_modz9
        Help on module test.pydoc_mod in test:

        �stdout�stderrr)r[rrm�maxDiffr�Helperr9r�lstrip�textwrap�dedentr	�help�getvaluer!r\rSrTrK)rFZold_patternZgetpager_oldZgetpager_new�buf�helperZunusedrYr*Zhelp_headerZexpected_help_patternr,r%rMr]rrr�test_help_output_redirects0



$z&PydocDocTest.test_help_output_redirectc
Cs^tdddgdd�}t��}tj|�WdQRX|j�}|jd|�|jd|�|jd|�dS)	N�NT�abc�defT)�renameZ_1�_replace�_asdict)rr
rr�r�re)rFr��help_io�helptextrrr�!test_namedtuple_public_underscore3sz.PydocDocTest.test_namedtuple_public_underscorecCs�|jtt�xpd
D]h}ttd|d��8}|dkr@tdj|�|d�td|d�td|d�WdQRXtjti�}|j|d	�qWdS)N�
ISO-8859-1�UTF-8�w)�encodingz#coding: {})�fileu"""line 1: héz
line 2: hi"""uline 1: hé)r�r�)	�
addCleanuprr�open�print�formatr�synopsisrK)rFr�Zscriptr�rrr�
test_synopsis<s
zPydocDocTest.test_synopsiscCs.tjj�d}tj}tj|�}|j||�dS)Nr)r0rz�
splitlines�
__cached__rr�rK)rFrw�filenamer�rrr�test_synopsis_sourcelessGs
z%PydocDocTest.test_synopsis_sourcelesscCs�tjj��v}tjj|d�}tjj|�}t	|d��}|j
d�WdQRXtj|�t
j|i�}|j|�t
j|i�}|j|�WdQRXdS)Nzfoomod42.pyr�zfoo = 1)�test�support�temp_cwdr0r1�join�	importlib�util�cache_from_sourcer��write�
py_compiler7rr��assertIsNone)rF�test_dir�	init_pathZcached_path�fobjr�Zsynopsis_cachedrrr�"test_synopsis_sourceless_empty_docPs

z/PydocDocTest.test_synopsis_sourceless_empty_doccCsd}|jtj|�d�dS)Nz#I Am A Doc


Here is my description�
I Am A Doc�
Here is my description)r�r�)rKrZsplitdoc)rFZexample_stringrrr�test_splitdoc_with_description\sz+PydocDocTest.test_splitdoc_with_descriptioncCs@tj�}|jtj|j��|jtjtj��|jtjd��dS)NzI am not a method)rZDoc�
assertTrueZ_is_some_method�fail�int�__add__�assertFalse)rFr+rrr�test_is_object_or_methodasz%PydocDocTest.test_is_object_or_methodc
Cs*tjj��}|jtj|��WdQRXdS)N)r�r�r�r�r�	ispackage)rFr�rrr� test_is_package_when_not_packagejsz-PydocDocTest.test_is_package_when_not_packagec
CsPtjj��<}tjj|d�}t|d�j�|jt	j
|��tj|�WdQRXdS)Nz__init__.pyr�)r�r�r�r0r1r�r��closer�rr��remove)rFr�r�rrr�test_is_package_when_is_packagens
z,PydocDocTest.test_is_package_when_is_packagecCs`Gdd�dt�}ttt��}|j|d<|d=|d=|j|d<|j|d<tj|�}|j||�dS)Nc@seZdZdd�ZdS)z/PydocDocTest.test_allmethods.<locals>.TestClasscSsdS)NTr)rFrrr�method_returning_true|szEPydocDocTest.test_allmethods.<locals>.TestClass.method_returning_trueN)rrrr�rrrr�	TestClass{sr�r�rz�	__class__�__subclasshook__�__init_subclass__)	�object�dict�varsr�r�r�rZ
allmethodsZassertDictEqual)rFr�rw�methodsrrr�test_allmethodsus



zPydocDocTest.test_allmethodscspGdd�d��G�fdd�d��}tj|�}tjdd|�}|j|dt�tj|tj�d�}|j|d	t�dS)
Nc@s"eZdZddd�ZeZdd�ZdS)z+PydocDocTest.test_method_aliases.<locals>.ANcSsdS)Nr)rFZ	aboveThisrrr�tkraise�sz3PydocDocTest.test_method_aliases.<locals>.A.tkraisecSsdS)Nr)rFrrr�a_size�sz2PydocDocTest.test_method_aliases.<locals>.A.a_size)N)rrrr�Zliftr�rrrrrp�s
rpcs eZdZddd�ZeZ�jZdS)z+PydocDocTest.test_method_aliases.<locals>.BNc[sdS)Nr)rFZtagOrIdZcnf�kwrrr�
itemconfigure�sz9PydocDocTest.test_method_aliases.<locals>.B.itemconfigure)N)rrrr�Z
itemconfigr�Zb_sizer)rprrrq�s
rqz.ra�Python Library Documentation: class B in module %s

class B(A)
 |  Method resolution order:
 |      B
 |      A
 |      builtins.object
 |  
 |  Methods defined here:
 |  
 |  b_size = a_size(self)
 |  
 |  itemconfig = itemconfigure(self, tagOrId, cnf=None, **kw)
 |  
 |  itemconfigure(self, tagOrId, cnf=None, **kw)
 |      Configure resources of an item TAGORID.
 |  
 |  ----------------------------------------------------------------------
 |  Methods inherited from A:
 |  
 |  a_size(self)
 |      Return size
 |  
 |  lift = tkraise(self, aboveThis=None)
 |  
 |  tkraise(self, aboveThis=None)
 |      Raise this widget in the stacking order.
 |  
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from A:
 |  
 |  __dict__
 |      dictionary for instance variables (if defined)
 |  
 |  __weakref__
 |      list of weak references to the object (if defined)
)ZrendereraPython Library Documentation: class B in module %s

<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)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%%"><dl><dt>Method resolution order:</dt>
<dd>B</dd>
<dd>A</dd>
<dd><a href="builtins.html#object">builtins.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="B-b_size"><strong>b_size</strong></a> = <a href="#B-a_size">a_size</a>(self)</dt></dl>

<dl><dt><a name="B-itemconfig"><strong>itemconfig</strong></a> = <a href="#B-itemconfigure">itemconfigure</a>(self, tagOrId, cnf=None, **kw)</dt></dl>

<dl><dt><a name="B-itemconfigure"><strong>itemconfigure</strong></a>(self, tagOrId, cnf=None, **kw)</dt><dd><tt>Configure&nbsp;resources&nbsp;of&nbsp;an&nbsp;item&nbsp;TAGORID.</tt></dd></dl>

<hr>
Methods inherited from A:<br>
<dl><dt><a name="B-a_size"><strong>a_size</strong></a>(self)</dt><dd><tt>Return&nbsp;size</tt></dd></dl>

<dl><dt><a name="B-lift"><strong>lift</strong></a> = <a href="#B-tkraise">tkraise</a>(self, aboveThis=None)</dt></dl>

<dl><dt><a name="B-tkraise"><strong>tkraise</strong></a>(self, aboveThis=None)</dt><dd><tt>Raise&nbsp;this&nbsp;widget&nbsp;in&nbsp;the&nbsp;stacking&nbsp;order.</tt></dd></dl>

<hr>
Data descriptors inherited from A:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table>)rrdr6r8rKrr')rFrqr+r)rpr�test_method_aliases�s
%
(z PydocDocTest.test_method_aliases)"rrrr��unittest�skipIfrk�flags�optimize�hasattrrRr
rZr^rfrirjrnrrrxr|r}rr�r�r�r�r�r�r�r�r�r�r�rrrrrQ�sJ
	

$		rQc@szeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Ze	j
d
�dd��Ze	j
d
�dd��Ze	j
d�dd��Z
dd�ZdS)�PydocImportTestcCs$tjt�|_|jtt�tj�dS)N)r0�mkdirrr�r�rr��invalidate_caches)rFrrr�setUp�szPydocImportTest.setUpc	Cs�d}d
dddj|�dfdj|�dj|�ff}tjjt|�tjd}x`|D]X\}}t|d	��}|jd
j|��WdQRXt|td�j	d�}t
||f}|j||�qJWdS)NZ
testmod_xyzzy�
i_am_not_here�test.i_am_not_here_either�test.i_am_not_here.neither_am_i�test.i_am_not_herezi_am_not_here.{}ztest.{}�pyr�z
import {}
)�
PYTHONPATHrs)r�r�)r�r�)r�r�)r�r0r1r�r�extsepr�r�r&�decode�badimport_patternrK)	rF�modnameZ	testpairsZsourcefnZimportstringZ
expectedinmsg�frMrwrrr�test_badimport�szPydocImportTest.test_badimportc-Cstjjtd�}tj|�tjj|d�tjd}t|d��}|jd�WdQRX|jtgd���t	��"}t
��}tjd�WdQRXWdQRX|j
|j�d�|j
|j�d�t	��"}t
��}tjd�WdQRXWdQRX|j
|j�j�d�|j
|j�d�WdQRXdS)	NZ	syntaxerr�__init__r�r�zinvalid python syntax = $1
)r1Zxyzzyr)r0r1r�rr�r�r�r�rIr
rr�aproposrKr�r!)rF�pkgdirZ	badsyntaxr�r$r%rrr�test_apropos_with_bad_package
s 
z-PydocImportTest.test_apropos_with_bad_packagecCs�tjjtd�|_tj|jd�|jtj|j�|jtgd��4t	��"}t
��}tjd�WdQRXWdQRXWdQRX|j
|j�d�|j
|j�d�dS)NZ
unreadabler)r1ZSOMEKEYr)r0r1r�rZunreadable_dirr�r��rmdirrIr
rrr�rKr�)rFr$r%rrr� test_apropos_with_unreadable_dir"s(z0PydocImportTest.test_apropos_with_unreadable_dircCs�tjjtd�}tj|�|jt|�tjj|d�}t|d��}|jd�WdQRXt	j
tj	|�j�}z^tj||t	j
@�|jtgd��"t��}tjd�WdQRXWdQRX|jd|j��Wdtj||�XdS)NZwalkpkgz__init__.pyr�zfoo = 1)r1r)r0r1r�rr�r�rr�r��stat�S_IMODE�st_mode�chmod�S_IEXECrIr
rr�rer�)rFr�r�r�Zcurrent_moder�rrr�test_apropos_empty_doc1s
z&PydocImportTest.test_apropos_empty_docc Cs�tjjtd�}tj|�tjj|d�}t|ddd��}|jd�WdQRX|jtgd��ptt	j�}t	jj
dt�z@|jtd	��ddl
}WdQRX|jd
d�}d}|j||�Wd|t	jdd�<XWdQRXdS)
N�test_error_packagez__init__.pyZwtrs)r�zraise ValueError("ouch")
)r1rZouchzsearch?key=test_error_packagezPydoc: Search Resultsz8<a href="test_error_package.html">test_error_package</a>)r0r1r�rr�r�r�rI�tuplerk�insertZassertRaisesRegex�
ValueErrorr�rNre)rFr�Zinitr�Zsaved_pathsr�r;�foundrrr�test_url_search_package_errorAs 

z-PydocImportTest.test_url_search_package_errorz(causes undesirable side-effects (#20128)c	CsZd}d}d}|||}t�}tj|d�}|d�|j�j�}t|j��}|j||�dS)Nr��)r,�modules)rrr�r�r!�lenr�ZassertGreaterEqual)	rFZnum_header_linesZnum_module_lines_minZnum_footer_linesrwr,r�rMZ	num_linesrrr�test_modulesXszPydocImportTest.test_modulesc
CsHd}t�}tj|d�}t��}|d�WdQRX|j�}|j||�dS)Nzpydoc - )r,z
modules pydoc)rrr�r
r�re)rFrwr,r�r�rMrrr�test_modules_searchhsz#PydocImportTest.test_modules_searchz+some buildbots are not cooperating (#20128)c
CsLd}t�}tj|d�}t��}|d�WdQRX|j�}|j|j|��dS)Nzgc - )r,zmodules garbage)rrr�r
r�r��
startswith)rFrwr,r�r�rMrrr�test_modules_search_builtinusz+PydocImportTest.test_modules_search_builtincCsJtjtj�}|j|t�|j|jd�|j|jtj�|j|jtj�dS)Nr)rZ
importfiler ZassertIsNotrKr�__spec__)rFZloaded_pydocrrr�test_importfile�s
zPydocImportTest.test_importfileN)rrrr�r�r�r�r�r�r��skipr�r�r�rrrrrr��s
r�c@steZdZdd�Zdd�Zdd�Zdd�Zed	d
��Zdd�Z	e
d
d��Zdd�Zdd�Z
e
dd��Ze
dd��ZdS)�TestDescriptionscCs&ddlm}tj|�}|jd|�dS)Nr)�pydocfodderr)r�rrrdre)rFrr+rrr�test_module�s
zTestDescriptions.test_modulecCsVGdd�d�}|�}|jtj|�d�|jtj|�d�dt}|j|tj|��dS)Nc@seZdZdS)z&TestDescriptions.test_class.<locals>.CN)rrrrrrr�C�srzclass CzC in module %s object)rKrZdescriberrerd)rFr�crwrrr�
test_class�szTestDescriptions.test_classcCs�tjtjttjtjttjfd�dd�}tjd�}Gdd�dtj|tjtt	f�}|j
tj|�j
�dd�|j
tj|�j
�d	d
�dS)N)�datar��returncSsdS)Nr)r	r�rrr�foo�sz/TestDescriptions.test_typing_pydoc.<locals>.foo�Tc@seZdZdS)z-TestDescriptions.test_typing_pydoc.<locals>.CN)rrrrrrrr�srr_z=ffoooo(data:List[Any], x:int) -> Iterator[Tuple[int, Any]]rzclass CC(typing.Mapping)���)�typingZListZAnyr��IteratorZTupleZTypeVarZGeneric�MappingrtrKrrdr�)rFrrrrrr�test_typing_pydoc�s
"
"z"TestDescriptions.test_typing_pydoccCs�xPdD]H}|jtj|��ytj|�Wqtk
rL|jdj|��YqXqWx,d
D]$}|jtj|��|jttj|�qXWdS)Nrt�
str.translate�builtins.str�builtins.str.translatezfinding the doc of {!r} failed�notbuiltins�strrr�strr.translate�str.trrrranslate�builtins.strrr�builtins.str.trrranslate)rtrrr)rrrrrr)	ZassertIsNotNonerZlocaterd�ImportErrorr�r�r��assertRaises)rF�namerrr�test_builtin�szTestDescriptions.test_builtincCs"tjtj|��}|jd�}|dS)Nrr)rZplainrd�split)�or;�linesrrr�_get_summary_line�s
z"TestDescriptions._get_summary_linecCs|j|jtjj�d�dS)Nzwrap(self, text))rKr"r��TextWrapper�wrap)rFrrr�test_unbound_python_method�sz+TestDescriptions.test_unbound_python_methodcCs|j|jtjj�d�dS)Nzdump(self, obj, /))rKr"�_pickle�Pickler�dump)rFrrr�test_unbound_builtin_method�sz,TestDescriptions.test_unbound_builtin_methodcCs tj�}|j|j|j�d�dS)Nz2wrap(text) method of textwrap.TextWrapper instance)r�r#rKr"r$)rF�trrr�test_bound_python_method�sz)TestDescriptions.test_bound_python_methodcCs~tddddg�}tj|�}|j|jd�|jd��|j|jd�|jd��Gdd�d�}Gdd�d�}tj|�tj|�dS)	N�PersonZnicknameZ	firstnameZagegroupc@seZdZdZdS)zMTestDescriptions.test_field_order_for_named_tuples.<locals>.NonIterableFieldsN)rrr�_fieldsrrrr�NonIterableFields�sr.c@seZdZggZdS)zMTestDescriptions.test_field_order_for_named_tuples.<locals>.NonHashableFieldsN)rrrr-rrrr�NonHashableFields�sr/)rrrdZ
assertLess�index)rFr,rr.r/rrr�!test_field_order_for_named_tuples�s

z2TestDescriptions.test_field_order_for_named_tuplescCs(t�}tj|�}|j|j|j�d�dS)Nz/dump(obj, /) method of _pickle.Pickler instance)rr&r'rKr"r()rFr�prrr�test_bound_builtin_method�s
z*TestDescriptions.test_bound_builtin_methodcCs|j|jtj�d�dS)Nz0stat(path, *, dir_fd=None, follow_symlinks=True))rKr"r0r�)rFrrr�test_module_level_callable�sz+TestDescriptions.test_module_level_callableN)rrrrrrr�staticmethodr"r%r
r)r+r1r3r4rrrrr�s	rz!Threading required for this test.c@seZdZdd�ZdS)�PydocServerTestcCszdd�}tj|dd�}|jd|jj�tj�}d}x4|jrftjd�|jr4tj�||kr4|j�Pq4W|j	|j
d�dS)NcSsd||f}|S)Nzthe URL sent was: (%s, %s)r)rLZcontent_typer;rrr�my_url_handler�sz3PydocServerTest.test_server.<locals>.my_url_handlerr)ZportZ	localhostr_g{�G�z�?)rZ
_start_serverreZ	docserverZaddress�timeZservingZsleep�stoprK�error)rFr7ZserverthreadZ	starttimeZtimeoutrrr�test_server�s
zPydocServerTest.test_serverN)rrrr;rrrrr6�sr6c@seZdZdd�Zdd�ZdS)�PydocUrlHandlerTestcCs*tj}|jt|dd�|jt|dd�dS)Nrprrq�foobar)rrJr�	TypeError)rFr�rrr�test_content_type_err
sz)PydocUrlHandlerTest.test_content_type_errcCsPdddddddddddg}|j��$x|D]\}}|j||�q*WWdQRXdS)Nr�Pydoc: Index of Modules�get?key=r0�topics�
Pydoc: Topics�keywords�Pydoc: Keywordsr�Pydoc: module pydoc�
get?key=pydoc�search?key=pydoc�Pydoc: Search Results�
topic?key=def�Pydoc: KEYWORD def�topic?key=STRINGS�Pydoc: TOPIC STRINGSr=�Pydoc: Error - foobar)rr@)rAr@)r0r@)rBrC)rDrE)rrF)rGrF)rHrI)rJrK)rLrM)r=rN)rIrN)rFZrequestsrLr>rrr�test_url_requestss
z%PydocUrlHandlerTest.test_url_requestsN)rrrr?rOrrrrr<sr<c@seZdZdd�ZdS)�
TestHelpercCs|jttjj�ttj��dS)N)rK�sortedrr�rD�keyword�kwlist)rFrrr�
test_keywords'szTestHelper.test_keywordsN)rrrrTrrrrrP&srPc@s�eZdZejejjdkd�ejeed�o.ej	�d�dd���Z
ejejjdkd�ejeed�odej	�d�dd���Zejejjdkd�ejeed�o�ej	�d�d	d
���Zejejjdkd�ejeed�o�ej	�d�dd���Z
d
d�ZdS)�PydocWithMetaClassesrz)Docstrings are omitted with -O2 and aboverRz1trace function introduces __locals__ unexpectedlycCs�Gdd�dt�}Gdd�d|d�}tdd�tD��}t�}tj|d�}||�ttf|dd	�}|j�j	�}|j
||�dS)
NcseZdZ�fdd�Z�ZS)z=PydocWithMetaClasses.test_DynamicClassAttribute.<locals>.Metacs|dkrdSt�j|�S)N�hamZspam)�super�__getattr__)rFr)r�rrrX2szIPydocWithMetaClasses.test_DynamicClassAttribute.<locals>.Meta.__getattr__)rrrrX�
__classcell__rr)r�r�Meta1srZc@seZdZejdd��ZdS)z;PydocWithMetaClasses.test_DynamicClassAttribute.<locals>.DAcSsdS)NZeggsr)rFrrrrV7sz?PydocWithMetaClasses.test_DynamicClassAttribute.<locals>.DA.hamN)rrr�types�DynamicClassAttributerVrrrr�DA6sr])�	metaclasscss|]}|rd|ndVqdS)z	
 |      rNr)rrrrrr:szBPydocWithMetaClasses.test_DynamicClassAttribute.<locals>.<genexpr>)r,r)�typer��expected_data_docstringsrrr��!expected_dynamicattribute_patternrr�r!rK)rFrZr]r\r,r�r]rMrrr�test_DynamicClassAttribute,s
z/PydocWithMetaClasses.test_DynamicClassAttributecCs`Gdd�dt�}Gdd�d|d�}t�}tj|d�}||�tt}|j�j�}|j||�dS)Ncs$eZdZdd�Z�fdd�Z�ZS)zHPydocWithMetaClasses.test_virtualClassAttributeWithOneMeta.<locals>.MetacSsddddgS)Nr�rr�LIFEr)�clsrrr�__dir__JszPPydocWithMetaClasses.test_virtualClassAttributeWithOneMeta.<locals>.Meta.__dir__cs|dkrdSt�j|�S)Nrcro)rWZ_Meta__getattr)rFr)r�rrrXLszTPydocWithMetaClasses.test_virtualClassAttributeWithOneMeta.<locals>.Meta.__getattr__)rrrrerXrYrr)r�rrZIsrZc@seZdZdS)zIPydocWithMetaClasses.test_virtualClassAttributeWithOneMeta.<locals>.ClassN)rrrrrrr�ClassPsrf)r^)r,)	r_rrr��"expected_virtualattribute_pattern1rr�r!rK)rFrZrfr,r�r]rMrrr�%test_virtualClassAttributeWithOneMetaDsz:PydocWithMetaClasses.test_virtualClassAttributeWithOneMetacs�Gdd�dt��Gdd�dt��G��fdd�d���}Gdd�d�d	�}Gd
d�d||d	�}d}}t�}tj|d
�}||�tt}|j�j�}	|j||	�t�}tj|d
�}||�t	t}
|j�j�}|j|
|�dS)Ncs$eZdZdd�Z�fdd�Z�ZS)zIPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Meta1cSsddddgS)Nr�rrr`r)rdrrrre_szQPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Meta1.__dir__cs|dkrdSt�j|�S)Nr`r_)rWrX)rFr)r�rrrXaszUPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Meta1.__getattr__)rrrrerXrYrr)r�r�Meta1^srics$eZdZdd�Z�fdd�Z�ZS)zIPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Meta2cSsddddgS)Nr�rr�twor)rdrrrrefszQPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Meta2.__dir__cs|dkrdSt�j|�S)Nrjr)rWrX)rFr)r�rrrXhszUPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Meta2.__getattr__)rrrrerXrYrr)r�r�Meta2esrkcs*eZdZ��fdd�Z�fdd�Z�ZS)zIPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Meta3cs,tttddddg�j|��j|����S)Nr�rr�three)�listrQ�setre)rd)rirkrrremszQPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Meta3.__dir__cs|dkrdSt�j|�S)Nrlr�)rWrX)rFr)r�rrrXqszUPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Meta3.__getattr__)rrrrerXrYr)rirk)r�r�Meta3lsroc@seZdZdS)zJPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Class1N)rrrrrrr�Class1usrp)r^c@seZdZdS)zJPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Class2N)rrrrrrr�Class2wsrqF)r,)
r_rrr��"expected_virtualattribute_pattern2rr�r!rK�"expected_virtualattribute_pattern3)rFrorprqZfail1Zfail2r,r�Zexpected_text1Zresult1Zexpected_text2Zresult2r)rirkr�%test_virtualClassAttributeWithTwoMetaYs$	z:PydocWithMetaClasses.test_virtualClassAttributeWithTwoMetacCs`Gdd�dt�}Gdd�d|d�}t�}tj|d�}||�tt}|j�j�}|j||�dS)Nc@seZdZdd�ZdS)z.PydocWithMetaClasses.test_buggy_dir.<locals>.McSsddddgS)Nr�r�missing�herer)rdrrrre�sz6PydocWithMetaClasses.test_buggy_dir.<locals>.M.__dir__N)rrrrerrrr�M�srwc@seZdZdZdS)z.PydocWithMetaClasses.test_buggy_dir.<locals>.Czpresent!N)rrrrvrrrrr�sr)r^)r,)	r_rrr��!expected_missingattribute_patternrr�r!rK)rFrwrr,r�r]rMrrr�test_buggy_dir�sz#PydocWithMetaClasses.test_buggy_dirc
Cs4t��}tjd�WdQRX|j�}|jd|�dS)Nz	enum.Enumz
class Enum)r
rr�r�re)rFr�r�rrr�test_resolve_false�sz'PydocWithMetaClasses.test_resolve_falseN)rrrr�r�rkr�r�r�rRrbrhrtryrzrrrrrU+s"+rUcCs*ztjjttttttt	�Wdt
�XdS)N)r�r�Zrun_unittestrQr�rr6r<rPrUrrrrr�	test_main�s
r{�__main__)rr)rrrr)rrrr)Qr0rk�builtinsrO�importlib.utilr�rSrr�rRr&rHr6r��stringZtest.supportr�r8r[rr�Zurllib.parserUZ	xml.etreergZxml.etree.ElementTreer��ior�collectionsrZtest.support.script_helperrrrrrr	r
rrr
rZ	threadingrrr�ZHAVE_DOCSTRINGSr`r!r[r�r\rWrXr�lineseprur�rargrrrsrxr&r.r5r9r?ZTestCaser@rQr�rZ
skipUnlessr6r<rPrUr{rrrrr�<module>s�,

T
{
			
	Nc
v