Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.12/test/test_pydoc/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.12/test/test_pydoc/__pycache__/test_pydoc.cpython-312.opt-2.pyc

�

)Μg����ddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlZddlZddlZddlZddlZddlZddlZddlZddlmZddlmZddlmZm Z ddlm!Z!ddlm"Z"ddlm#Z#ddl$m%Z%m&Z&m'Z'dd	lm(Z(dd
lm)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0ddl1m2Z2m3Z3m4Z4ddl5m6Z6dd
l5m7Z7Gd�d�Z8ejBjrrdZ:ndZ:djw�Z<e=d�e:D��Z>dZ?e=d�e:D��Z@dj�dej��ZCdZDdjw�ZEdjw�ZFdjw�ZGdjw�ZHdjw�ZId�ZJd�ZKd �ZLd!�ZMd"�ZNd#�ZOd$�ZPd%�ZQGd&�d'ej��ZSGd(�d)ej��ZTGd*�d+eS�ZUGd,�d-ej��ZVGd.�d/ej��ZWej�e-xse.d0�Gd1�d2ej���ZYGd3�d4eS�ZZGd5�d6ej��Z[Gd7�d8ej��Z\Gd9�d:ej��Z]d;�Z^e_d<k(rej��yy)=�N)�StringIO)�
namedtuple)�urlopen�
urlcleanup)�support)�
import_helper)�	os_helper)�assert_python_ok�assert_python_failure�spawn_python)�threading_helper)�
reap_children�captured_output�captured_stdout�captured_stderr�
is_emscripten�is_wasi�requires_docstrings�MISSING_C_DOCSTRINGS)�TESTFN�rmtree�unlink)�	pydoc_mod)�pydocfodderc��eZdZ	y)�nonasciiN��__name__�
__module__�__qualname__���7/usr/local/lib/python3.12/test/test_pydoc/test_pydoc.pyrr(s�� �r"r)�!dictionary for instance variables�%list of weak references to the objectr$r%)�r&r&r&a�
NAME
    test.test_pydoc.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)
     |
     |  ----------------------------------------------------------------------
     |  Class methods defined here:
     |
     |  __class_getitem__(item)
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |
     |  __dict__
     |      dictionary for instance variables
     |
     |  __weakref__
     |      list of weak references to the object

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'
    c_alias = test.test_pydoc.pydoc_mod.C[int]
    list_alias1 = typing.List[int]
    list_alias2 = list[int]
    type_union1 = typing.Union[int, str]
    type_union2 = int | str

VERSION
    1.2.3.4

AUTHOR
    Benjamin Peterson

CREDITS
    Nobody

FILE
    %s
c#�.K�|]
}|rd|znd���y�w)z
     |      r&Nr!��.0�ss  r#�	<genexpr>r+�s'����&I�/G�!�?@�&6��&:�R�&G�/G���a{
test.test_pydoc.pydoc_mod (version 1.2.3.4)
This is a test module for test_pydoc

Modules
    types
    typing

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__
            dictionary for instance variables
        __weakref__
            list of weak references to the object

class B(builtins.object)
    Data descriptors defined here:
        __dict__
            dictionary for instance variables
        __weakref__
            list of weak references to the object
    ----------------------------------------------------------------------
    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)
    ----------------------------------------------------------------------
    Class methods defined here:
        __class_getitem__(item)
    ----------------------------------------------------------------------
    Data descriptors defined here:
        __dict__
            dictionary for instance variables
        __weakref__
             list of weak references to the object

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'
    c_alias = test.test_pydoc.pydoc_mod.C[int]
    list_alias1 = typing.List[int]
    list_alias2 = list[int]
    type_union1 = typing.Union[int, str]
    type_union2 = int | str

Author
    Benjamin Peterson

Credits
    Nobody
c#�@K�|]}|jdd����y�w)� �&nbsp;N)�replacer(s  r#r+r+�s$����&I�/G�!�'(�i�i��X�&>�/G�s�z~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!'
c�t�	||fz}tdtjg|��i|��\}}}|j�S�Nz-B)r
�pydoc�__file__�strip��module_name�args�env�rc�out�errs      r#�	run_pydocr>5sA����;�.� �D�#�D�%�.�.�G�4�G�3�G�L�B��S��9�9�;�r"c�t�	||fz}tdtjg|��i|��\}}}|j�Sr3)rr4r5r6r7s      r#�run_pydoc_failr@?sA����;�.� �D�(��u�~�~�L��L��L�L�B��S��9�9�;�r"c��	tj�}|j|�}|jt�xsd}|rd|zdz}|j�|fS)Nr&z
<br><a href="z">Module Docs</a>)r4�HTMLDoc�	docmodule�	getdoclocrr6)�module�doc�output�locs    r#�get_pydoc_htmlrIGsU��,�
�-�-�/�C�
�]�]�6�
"�F�

�-�-�	�
"�
(�b�C�
���$�';�;���<�<�>�3��r"c�0�tjdd|�S)Nz.r&)�re�sub)rFs r#�
clean_textrMPs��
�6�6�%��S�!�!r"c	��	tjj}tjj}||||t����}tj�}|j||��}|S)N)�basedir)�os�path�abspath�dirnamer5r4�TextDocrD)rErRrSrOrFrHs      r#�get_pydoc_linkrUTsZ��2��g�g�o�o�G��g�g�o�o�G��g�g�g�h�&7�8�9�:�G�
�-�-�/�C�

�-�-���-�
0�C��Jr"c���	tj�}|jt�xsd}|rd|zdz}|j	|�}t|�}|j
�|fS)Nr&z
MODULE DOCS
    r1)r4rTrDrrCrMr6)rErFrHrGs    r#�get_pydoc_textrW]s^��,�
�-�-�/�C�

�-�-�	�
"�
(�b�C�
�#�c�)�D�0��
�]�]�6�
"�F�
��
�F��<�<�>�3��r"c��|jd�\}}}|jd�\}}}|jd�\}}}|S)Nz</head>z<title>z</title>)�	partition)�text�header�_�titles    r#�get_html_titler^hsE���>�>�)�,�L�F�A�q��"�"�9�-�K�A�q�%��/�/�*�-�K�E�1�a��Lr"c	��	|jdd�}|jdd�}tjdd|�}tj|ddd	d
dd�}|S)
Nz<dd>r1z<hr>�F----------------------------------------------------------------------z<.*?>r&r/r.z&gt;�>z&lt;�<)r0rKrLr4)�htmls r#�	html2textrdpsZ����<�<���%�D��<�<���'�D�
�6�6�'�2�t�$�D��=�=��x��f�c�6�3�G�D��Kr"c�F�eZdZd�Zdd�Zejdd��Zd�Zy)�
PydocBaseTestc�R�|jtjdt�y�Nr4��assertIs�sys�modulesr4��selfs r#�tearDownzPydocBaseTest.tearDown}s��	
�
�
�c�k�k�'�*�E�2r"Nc�j���	|xs$tjjt�g�d��fd�	}|S)Nc� ���|xs�||�S�Nr!)rQ�prefix�onerror�default_path�
walk_packagess   ��r#�wrapperz8PydocBaseTest._restricted_walk_packages.<locals>.wrapper�s��� ��!5��v�w�G�Gr")Nr&N)rPrQrSr5)rnrvrQrwrus `  @r#�_restricted_walk_packagesz'PydocBaseTest._restricted_walk_packages�s/���	��:������� 9�:��	H��r"c#�K�tj}|j||�t_	d��|t_y#|t_wxYw�wrr)�pkgutilrvrx)rnrQrvs   r#�restrict_walk_packagesz$PydocBaseTest.restrict_walk_packages�sB�����-�-�
� $� >� >�}�?C�!E���	2��$1�G�!��M�G�!�s�,A�?�A�
A�Ac�n�tj|d�}t|�}|j|||�|S)Nz	text/html)r4�_url_handlerr^�assertEqual)rn�url�expected_titlerZ�results     r#�call_url_handlerzPydocBaseTest.call_url_handler�s5���!�!�#�{�3����%��������6��r"rr)	rrr rorx�
contextlib�contextmanagerr{r�r!r"r#rfrf|s+��3�����2��2�r"rfc��eZdZdZd�Zejeed�xrej�d�e
d���Zejeed�xrej�d�e
d���Zd�Z
d�Zd	�Zd
�Zd�Zd�Ze
d
��Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zejeed�xrej�d�ej:j=d�e
d����Zejeed�xrej�d�e
ej:j=d�d����Z d�Z!d�Z"ej:j=d�d��Z#ejeed�xrej�d�e
ej:j=d�d����Z$d�Z%d�Z&d �Z'd!�Z(d"�Z)d#�Z*e
d$��Z+d%�Z,d&�Z-d'�Z.d(�Z/d)�Z0e
d*��Z1d+�Z2y),�PydocDocTestNc�R�|jtjdt�yrhrirms r#rozPydocDocTest.tearDown�����
�
�c�k�k�'�*�E�2r"�gettrace�1trace function introduces __locals__ unexpectedlyc�D�tt�\}}t|�}|j�D�cgc]}|j	���}}|D�cgc]}|s�|��	}}|d=t
j�}|D�cgc]}|s�|j	���}}|j
||�tjt�}tjj|�}|j||�|j||�|j||�ycc}wcc}wcc}w�N�)
rIrrd�
splitlinesr6�html2text_of_expectedr~�inspect�
getabsfile�urllib�parse�quote�assertIn)	rnr��doc_loc�text_result�line�
text_lines�expected_lines�mod_file�mod_urls	         r#�
test_html_doczPydocDocTest.test_html_doc�s���)��3������'��/:�/E�/E�/G�H�/G�t�d�j�j�l�/G�
�H�'1�:�z�t�T�d�z�
�:��q�M�.�9�9�;��3A�J�>�4�T�$�*�*�,�>��J�����^�4��%�%�i�0���,�,�$�$�X�.���
�
�g�v�&��
�
�h��'��
�
�g�v�&��I��:��Ks�D�
D�D�6D�>Dc��tt�\}}t|ftzt	j
t�fzz}|j
||�yrr)rWr�expected_text_pattern�expected_text_data_docstringsr�r�r~)rnr�r��
expected_texts    r#�
test_text_doczPydocDocTest.test_text_doc�sQ��)��3����-� �
�5�6� �+�+�I�6�8�9�:�
�	
�����/r"c��ddl}Gd�d|j�}tj|�}|j	d|�y)Nrc��eZdZdZdZy)�IPydocDocTest.test_text_enum_member_with_value_zero.<locals>.BinaryIntegerrr�N)rrr �zero�oner!r"r#�
BinaryIntegerr��s���D��Cr"r�zBinaryInteger.zero)�enum�IntEnumr4�
render_docr�)rnr�r�rFs    r#�%test_text_enum_member_with_value_zeroz2PydocDocTest.test_text_enum_member_with_value_zero�s8��	�	�D�L�L�	����}�-���
�
�*�C�0r"c�n�ttjj�}|j	d|�y)Nzxml.etree.elementtree)rU�xml�etree�ElementTreer�)rn�doc_links  r#�,test_mixed_case_module_names_are_lower_casedz9PydocDocTest.test_mixed_case_module_names_are_lower_cased�s%��!�#�)�)�"7�"7�8���
�
�-�x�8r"c�b�ttj�\}}|j|dd�y)Nr&z'MODULE DOCS incorrectly includes a link)rWr�r�r~)rnr�r�s   r#�test_issue8225zPydocDocTest.test_issue8225�s'��(����3��������"�&O�Pr"c��tj}	dt_tj�|t_y#|t_wxYwrr)rk�stdinr4�getpager)rn�previous_stdins  r#�test_getpager_with_stdin_nonez*PydocDocTest.test_getpager_with_stdin_none�s0������	'��C�I��N�N��&�C�I���C�I�s	�=�
A
c���Gd�d�}Gd�d�}tj|��}tj|��}|j|jdd�|�y)Nc��eZdZdZy)�)PydocDocTest.test_non_str_name.<locals>.A�*Nrr!r"r#�Ar��s���Hr"r�c��eZdZy)�)PydocDocTest.test_non_str_name.<locals>.BNrr!r"r#�Br�����r"r�)r4r�r~r0)rnr�r��adoc�bdocs     r#�test_non_str_namezPydocDocTest.test_non_str_name�sU��	�	�	�	������$�������$��������c�3�/��6r"c�j�d}tt|�d�}t|z}|j||d�y)N�test.i_am_not_here�asciiz&documentation for missing module found)�strr@�missing_patternr~�rn�missing_moduler��expecteds    r#�
test_not_herezPydocDocTest.test_not_here�s7��-���^�N�3�W�=��"�^�3������6�4�	6r"c��tdd��}tjjdd�}|j	||�y)Nz#test.test_pydoc.test_pydoc.nonasciir�)�PYTHONIOENCODING�backslashreplace)r>r�__doc__�encoder�)rnr��encodeds   r#�test_not_asciizPydocDocTest.test_not_ascii�s7���@�SZ�[���"�"�)�)�'�3E�F���
�
�g�v�&r"c��d}tt|�d�}t|j�z}|j	||�y)Nz test.i_am_not_here r�)r�r@r�r6r~r�s    r#�test_input_stripzPydocDocTest.test_input_strip�s;��/���^�N�3�W�=��"�^�%9�%9�%;�;������6�*r"c���tj}|j|d�d�|j|d�d�|j|d�d�|j|d�d�y)Nz<function stripid at 0x88dcee4>z<function stripid>z <function stripid at 0x01F65390>�42z<type 'exceptions.Exception'>)r4�stripidr~)rnr�s  r#�test_stripidzPydocDocTest.test_stripid�sl���-�-������!B�C�-�	/�����!C�D�-�	/�	
�������-�����!@�A�8�	:r"c��	tj�}|jt�}d}|j	||�y)Nz� |  Built-in subclasses:
 |      async_generator
 |      BaseException
 |      builtin_function_or_method
 |      bytearray
 |      ... and \d+ other subclasses)r4rT�docclass�object�assertRegex�rnrFrZ�snips    r#�)test_builtin_with_more_than_four_childrenz6PydocDocTest.test_builtin_with_more_than_four_children	s;��	�(�m�m�o���|�|�F�#��8��	
����t�$r"c��	tj�}|jt�}d}|j	||�y)Nzc |  Built-in subclasses:
 |      FloatingPointError
 |      OverflowError
 |      ZeroDivisionError)r4rTr��ArithmeticErrorr�r�s    r#�test_builtin_with_childz$PydocDocTest.test_builtin_with_child(s9��	�$�m�m�o���|�|�O�,��,��	
�
�
�d�D�!r"c��	tj�}|jt�}d}|j	||�|jd|�y)Nz^ |  Built-in subclasses:
 |      ArithmeticError
 |      AssertionError
 |      AttributeError�ZeroDivisionError)r4rTr��	Exceptionr��assertNotInr�s    r#�test_builtin_with_grandchildz)PydocDocTest.test_builtin_with_grandchildCsJ��	�*�m�m�o���|�|�I�&��)��	
�
�
�d�D�!����,�d�3r"c�|�	tj�}|jt�}|j	d|�y�NzBuilt-in subclasses)r4rTr�r�r��rnrFrZs   r#�test_builtin_no_childz"PydocDocTest.test_builtin_no_childcs4��	�,�m�m�o���|�|�-�.�����.��5r"c�|�	tj�}|jt�}|j	d|�yr�)r4rTr��typer�r�s   r#�test_builtin_on_metaclassesz(PydocDocTest.test_builtin_on_metaclassess3��	�
�m�m�o���|�|�D�!�����.��5r"c�.�tdzj�}td�5}|jd�\}}|j	�j�dd}|djd�|d<|j
||�ddd�y#1swYyxYw)N�abdz-chelp()sabdi����i����rzhelp> )r�r�r�communicate�decode�removeprefixr~)rn�elines�procr<r\�oliness      r#�test_fail_help_clizPydocDocTest.test_fail_help_cli�s���!�E�)�5�5�7��
�-�
(�D��%�%�f�-�F�C���Z�Z�\�,�,�.�r�"�5�F��q�	�.�.�x�8�F�1�I����V�V�,�	)�
(�
(�s�AB�Bc�:�t�5}tj|��}|jd�tdz}|j||j
�j�jdtj��ddd�y#1swYyxYw)N�rGr�r1)rr4�Helper�helpr�r~�getvaluer6r0rP�linesep)rn�buf�helperr�s    r#�test_fail_help_output_redirectz+PydocDocTest.test_fail_help_output_redirect�sg��
�Z�3��\�\��-�F��K�K���&��.�H����X�s�|�|�~�';�';�'=�'E�'E�d�B�J�J�'W�X�	�Z�Z�s�A=B�Bzpydoc.pagerc���d|_tt�\}}d}dj�}t	j
|�}|tz}td�5}td�5}t�5}	tj|	��}
|
j|�|	j�j�}||ftztj t�fzz}|j#d|j��|j#d|j��|j#||�ddd�ddd�ddd�|j%�y#1swY�*xYw#1swY�.xYw#1swY�2xYw)Nztest.test_pydoc.pydoc_modzO
        Help on module test.test_pydoc.pydoc_mod in test.test_pydoc:

        �stdout�stderrr�r&)�maxDiffrWr�lstrip�textwrap�dedentr�rrr4r�r�r�r6r�r�r�r~�assert_not_called)
rn�
pager_mock�unusedr�rE�help_header�expected_help_patternrGr=rrr�r�s
             r#�test_help_output_redirectz&PydocDocTest.test_help_output_redirect�s9�����(��3����,���
�F�H�	��o�o�k�2�� +�.C� C��
�X�
&�&�
�X�
&�#�
�Z�3��\�\��-�F��K�K����\�\�^�)�)�+�F�1�$�J�9�:�$�/�/�	�:�<�=�>�M�
���R����!2�3����R�����0����]�F�3��'�'�	�$�$�&��Z��'�
&��'�
&�s=�E-�!E!�,CE�,E!�4E-�E�E!�!E*	�&E-�-E6c������fd�}d�_|dd�|dd�|dd�|dd	�|d
d�|dd�|d
d�|dd�|dd�|dd�|tjjd�y)Nc
�8��	td�5}td�5}t�5}tj|��}|j	|�|j�j
�}�jd|j�d|�d����jd|j�d|�d����j||d|�d����j�ddd�ddd�ddd�y#1swY�xYw#1swY�xYw#1swYyxYw)Nrrr�r&zfailed on request "�")�msg)
rrr4r�r�r�r6r~r�r)	�request�expected_text_partrGr=rrr�rrns	       ��r#�run_pydoc_for_requestzVPydocDocTest.test_help_output_redirect_various_requests.<locals>.run_pydoc_for_request�s����I� ��*�f� ��*�c���s����S�1�����G�$�����-�-�/��� � ��V�_�_�%6�>Q�RY�QZ�Z[�<\� �]�� � ��S�\�\�^�;N�w�i�WX�9Y� �Z��
�
�0�&�@S�T[�S\�\]�>^�
�_��,�,�.��+�+�*����+�*��+�*�s:�D�D�B:C8�D�'D�8D�=D�D
	�	D�D�keywordsz&Here is a list of the Python keywords.�symbolsz)Here is a list of the punctuation symbols�topicsz#Here is a list of available topics.�%zThe power operator�Truezclass bool(int)�False�Nonezclass NoneType(object)�assertzThe "assert" statement�TYPESzThe standard type hierarchyzpydoc.Helper.helpz&Help on function help in pydoc.Helper:z&Help on function help in module pydoc:)rr4r�r�)rnrrs`` r#�*test_help_output_redirect_various_requestsz7PydocDocTest.test_help_output_redirect_various_requests�s����	/����	�j�*R�S��i�)T�U��h�(M�N�	�c�#7�8��f�&7�8��g�'8�9��f�&>�?��h�(@�A��g�'D�E��1�3[�\��e�l�l�/�/�1Y�Zr"c���t�5}tj�}|jd�ddd�j	�}|jd|�y#1swY�,xYw)N�with�The "with" statement)rr4r��	showtopicr�r�)rn�showtopic_ior�helptexts    r#�test_showtopiczPydocDocTest.test_showtopic�sP��
�
�,��\�\�^�F����V�$�� �(�(�*���
�
�,�h�7�	�
�s�&A�A%c���t�5}tj�}|jd�d}|j	||j�j
��ddd�y#1swYyxYw)Nr�� no documentation found for 'abd')rr4r�r%r~r�r6)rnr&rr�s    r#�test_fail_showtopicz PydocDocTest.test_fail_showtopic�sV��
�
�,��\�\�^�F����U�#�9�H����X�|�'<�'<�'>�'D�'D�'F�G�	�
�
�s�AA*�*A3c��t�5}tj|��}|jd�d}|j	||j�j
��ddd�|j�y#1swY�xYw)Nr�r�r*)rr4r�r%r~r�r6r)rnrrrr�s     r#�#test_fail_showtopic_output_redirectz0PydocDocTest.test_fail_showtopic_output_redirect�sd��
�Z�3��\�\��-�F����U�#�9�H����X�s�|�|�~�';�';�'=�>�	�	�$�$�&�
�Z�s�AA<�<Bc��d|_td�5}td�5}t�5}tj|��}|jd�|j
�j�}|jd|j
��|jd|j
��|jd|�ddd�ddd�ddd�|j�y#1swY�*xYw#1swY�.xYw#1swY�2xYw)Nrrr�r#r&r$)rrrr4r�r%r�r6r~r�r)rnrrGr=rrr�s       r#�test_showtopic_output_redirectz+PydocDocTest.test_showtopic_output_redirects������
�X�
&�&�
�X�
&�#�
�Z�3��\�\��-�F����V�$��\�\�^�)�)�+�F����R����!2�3����R�����0��M�M�0�&�9�
�'�'�	�$�$�&��Z��'�
&��'�
&�s:�D�C7�BC+�C7�
D�+C4�0C7�7D	�<D�Dc���d�}dti|_td�5}tj|�ddd�j�}|j
d|�y#1swY�,xYw)Nc��yr�r!��a�b�cs   r#�<lambda>zAPydocDocTest.test_lambda_with_return_annotation.<locals>.<lambda>���qr"�returnrzlambda (a, b, c) -> int��int�__annotations__rr4r�r�r��rn�func�help_ior's    r#�"test_lambda_with_return_annotationz/PydocDocTest.test_lambda_with_return_annotationsT�� �� (�#����
�X�
&�'��J�J�t��'��#�#�%���
�
�/��:�'�
&�s�A�A&c���d�}tttd�|_td�5}tj|�ddd�j�}|j
d|�y#1swY�,xYw)Nc��yr�r!r2s   r#r6zDPydocDocTest.test_lambda_without_return_annotation.<locals>.<lambda>r7r"r2rzlambda (a: int, b: int, c: int)r9r<s    r#�%test_lambda_without_return_annotationz2PydocDocTest.test_lambda_without_return_annotationsW�� ��%(�s��=���
�X�
&�'��J�J�t��'��#�#�%���
�
�7��B�'�
&�s�A'�'A0c���d�}ttttd�|_td�5}tj|�ddd�j�}|j
d|�y#1swY�,xYw)Nc��yr�r!r2s   r#r6zLPydocDocTest.test_lambda_with_return_and_params_annotation.<locals>.<lambda>'r7r")r3r4r5r8rz&lambda (a: int, b: int, c: int) -> intr9r<s    r#�-test_lambda_with_return_and_params_annotationz:PydocDocTest.test_lambda_with_return_and_params_annotation&sY�� ��%(�s���L���
�X�
&�'��J�J�t��'��#�#�%���
�
�>��I�'�
&�s�A,�,A5c�8�tdddg�}t�5}tj|�ddd�j	�}|jd|�|jd|�|jd|�|jd|�y#1swY�bxYw)N�Person�nickname�	firstnamezAlias for field number 0zAlias for field number 1�rrr4r�r�r�)rnrGr>r's    r#�test_namedtuple_fieldsz#PydocDocTest.test_namedtuple_fields.s}���H�z�;�&?�@��
�
�'��J�J�v����#�#�%���
�
�j�(�+��
�
�k�8�,��
�
�0�(�;��
�
�0�(�;�
�
�s�B�Bc��tdddgd��}t�5}tj|�ddd�j	�}|jd|�|jd|�|jd|�y#1swY�PxYw)	N�NT�abc�defT)�rename�_1�_replace�_asdictrJ)rnrMr>r's    r#�!test_namedtuple_public_underscorez.PydocDocTest.test_namedtuple_public_underscore8sm��
��u�e�n�T�
:��
�
�'��J�J�r�N���#�#�%���
�
�d�H�%��
�
�j�(�+��
�
�i��*��
�s�B�B	c�b�|jtt�dD]�}ttd|��5}|dk7rt	dj|�|��t	d|��t	d|��ddd�t
jti�}|j|d	���y#1swY�8xYw)
N)z
ISO-8859-1�UTF-8�w��encodingrVz#coding: {})�fileu"""line 1: héz
line 2: hi"""uline 1: hé)	�
addCleanuprr�open�print�formatr4�synopsisr~)rnrY�scriptr_s    r#�
test_synopsiszPydocDocTest.test_synopsisAs��������'�/�H��f�c�H�5���w�&��-�.�.�x�8�v�F��(�v�6��o�F�3�	6�
�~�~�f�b�1�H����X��7�0�5�5�s�<B%�%B.	c���tjd�}|jj�d}|jj
}t
j|�}|j||�y)NrPr)	r�import_fresh_moduler�r��__spec__�cachedr4r_r~)rnrPr��filenamer_s     r#�test_synopsis_sourcelessz%PydocDocTest.test_synopsis_sourcelessLsV��
�
.�
.�t�
4���:�:�(�(�*�1�-���;�;�%�%���>�>�(�+������8�,r"c��tj�5}tjj	|d�}t
jj|�}t|d�5}|jd�ddd�tj|�tj|i�}|j|�tj|i�}|j|�ddd�y#1swY�uxYw#1swYyxYw)Nzfoomod42.pyrW�foo = 1)r	�temp_cwdrPrQ�join�	importlib�util�cache_from_sourcer\�write�
py_compile�compiler4r_�assertIsNone)rn�test_dir�	init_path�cached_path�fobjr_�synopsis_cacheds       r#�"test_synopsis_sourceless_empty_docz/PydocDocTest.test_synopsis_sourceless_empty_docUs���
�
�
�
!�X������X�}�=�I�#�.�.�:�:�9�E�K��i��%���
�
�9�%�&����y�)��~�~�i��4�H����h�'�#�n�n�[�"�=�O����o�.�"�
!�&�%��"�
!�s%�AC3�!C'�3A+C3�'C0	�,C3�3C<c�R�d}|jtj|�d�y)Nz#I Am A Doc


Here is my description)z
I Am A Docz
Here is my description)r~r4�splitdoc)rn�example_strings  r#�test_splitdoc_with_descriptionz+PydocDocTest.test_splitdoc_with_descriptionas$��A���������7�C�	Er"c��tj�5}|jtj|��ddd�y#1swYyxYwrr)r	rj�assertFalser4�	ispackage)rnrss  r#� test_is_package_when_not_packagez-PydocDocTest.test_is_package_when_not_packagefs3��
�
�
�
!�X����U�_�_�X�6�7�"�
!�
!�s�%A�Ac�<�tj�5}tjj	|d�}t|d�j
�|jtj|��tj|�ddd�y#1swYyxYw)N�__init__.pyrW)r	rjrPrQrkr\�close�
assertTruer4r�remove)rnrsrts   r#�test_is_package_when_is_packagez,PydocDocTest.test_is_package_when_is_packagejsd��
�
�
�
!�X������X�}�=�I���C� �&�&�(��O�O�E�O�O�H�5�6��I�I�i� �	"�
!�
!�s�A4B�Bc��Gd�dt�}ttt��}|j|d<|d=|d=|j|d<|j
|d<t
j|�}|j||�y)Nc��eZdZd�Zy)�/PydocDocTest.test_allmethods.<locals>.TestClassc��y)NTr!rms r#�method_returning_truezEPydocDocTest.test_allmethods.<locals>.TestClass.method_returning_truexs��r"N)rrr r�r!r"r#�	TestClassr�ws��
r"r�r�r��	__class__�__subclasshook__�__init_subclass__)	r��dict�varsr�r�r�r4�
allmethods�assertDictEqual)rnr�r��methodss    r#�test_allmethodszPydocDocTest.test_allmethodsqs���	��	�
��V��%��,5�,K�,K��(�)��Y���[�!�(1�'A�'A��#�$�(1�(C�(C��$�%��"�"�9�-�����W�h�/r"c���Gd�d��G�fd�d��}tj|�}t|�}|j|dtz�tj|tj
���}dt�d�}t
|�}|jd	�D�cgc]}|s�|j���}}|D]}|j||��ycc}w)
Nc��eZdZdd�ZeZd�Zy)�+PydocDocTest.test_method_aliases.<locals>.ANc��yrrr!)rn�	aboveThiss  r#�tkraisez3PydocDocTest.test_method_aliases.<locals>.A.tkraise�s��>r"c��yrrr!rms r#�a_sizez2PydocDocTest.test_method_aliases.<locals>.A.a_size�s��!r"rr)rrr r��liftr�r!r"r#r�r��s��
?��D�
"r"r�c�4��eZdZdd�ZeZW�j
Zy)�+PydocDocTest.test_method_aliases.<locals>.BNc��yrrr!)rn�tagOrId�cnf�kws    r#�
itemconfigurez9PydocDocTest.test_method_aliases.<locals>.B.itemconfigure�s��=r"rr)rrr r��
itemconfigr��b_size)r�s�r#r�r��s���
>�&�J��X�X�Fr"r�amPython 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
 |
 |  __weakref__
 |      list of weak references to the object
��rendererz1
Python Library Documentation

class B in module a�
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
        __weakref__
            list of weak references to the object
r1)
r4r�rMr~rrBrd�splitr6r�)	rnr�rFr��as_textr�r��
expected_liner�s	        @r#�test_method_aliasesz PydocDocTest.test_method_aliases�s����	"�	"�	��	����q�!����o������%�J�K%�%	�N���q�5�=�=�?�;����*���
�:�C�.��3@�3F�3F�t�3L�U�3L�4�PT�$�*�*�,�3L��U�+�M��M�M�-��1�,��Vs�#C�+Cc�T�ddl}t|�\}}t|�\}}tt�\}}tt�\}}|jD]U}|�d�}d|�d�}	|j||�|j|	|�|j
||�|j
|	|��Wy)Nrz = _Featurez<strong>z</strong> = _Feature)�
__future__rWrIr�all_feature_namesr�r�)
rnr��future_textr\�future_html�pydoc_mod_text�pydoc_mod_html�feature�txtrcs
          r#�test__future__importsz"PydocDocTest.test__future__imports�s���	�'�
�3���Q�'�
�3���Q�*�9�5����*�9�5����!�3�3�G��I�[�)�C��g�Y�&:�;�D��M�M�#�{�+��M�M�$��,����S�.�1����T�>�2�
4r")3rrr rro�unittest�skipIf�hasattrrkr�rr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�mock�patchrr!r(r+r-r/r?rBrErKrTrargrxr|r�r�r�r�r�r!r"r#r�r��s����G�3��X�_�_�W�S�*�-�@�,�#�,�,�.�H�J��
'��J�
'��X�_�_�W�S�*�-�@�,�#�,�,�.�H�J��0��J�0�1�9�
Q�
'�
7�6��'��'�
+�:�%�>"�64�@6�8	6�-�Y��X�_�_�W�S�*�-�@�,�#�,�,�.�H�J�
�]�]����'��'��(�J�'�<�X�_�_�W�S�*�-�@�,�#�,�,�.�H�J��
�]�]����'�'[�(��J�'[�T8�H��]�]����'�'�(�'��X�_�_�W�S�*�-�@�,�#�,�,�.�H�J��
�]�]����'�'�(��J�'�";�C�J�<�+�	8��-��-�
/�E�
8�!�0�2�W2��W2�r3r"r�c��eZdZd�Zd�Zd�Zd�Zeje	jed�d���Zd�Z
e	jd�d	��Ze	jd�d
��Ze	jd�d��Zd
�Zy)�PydocImportTestc��tjt�|_|j	t
t�t
j�yrr)rP�mkdirrrsr[rrl�invalidate_cachesrms r#�setUpzPydocImportTest.setUp�s,������(��
������'��#�#�%r"c��d}ddddj|�dfdj|�dj|�ff}tjjt|�tj
zdz}|D]w\}}t
|d	�5}|jd
j|��ddd�t|t��jd�}t||fz}|j||��yy#1swY�IxYw)
N�
testmod_xyzzy)�
i_am_not_herer�)�test.i_am_not_here_eitherr�)ztest.i_am_not_here.neither_am_ir�zi_am_not_here.{}r�ztest.{}�pyrWz
import {}
)�
PYTHONPATHr�)r^rPrQrkr�extsepr\ror@r��badimport_patternr~)	rn�modname�	testpairs�sourcefn�importstring�
expectedinmsg�fr�r�s	         r#�test_badimportzPydocImportTest.test_badimport�s���"��.�F�E�
�
&�
&�w�
/��A�
�
�
�g�
&�	�(8�(8��(A�B��	��7�7�<�<���0�2�9�9�<�t�C��+4�'�L�-��h��$�����
�,�,�\�:�;�%�#�G��?�F�F�w�O�F�(�G�]�+C�C�H����X�v�.�,5�$�$�s�!C0�0C9	c��tjjtd�}tj|�tjj|d�tj
zdz}t
|d�5}|jd�ddd�|jtg��5t�5}t�5}tjd�ddd�ddd�|jj�d�|jj�d�t�5}t�5}tjd�ddd�ddd�|j|j�j�d�|j|j�d�ddd�y#1swY��/xYw#1swY��xYw#1swY��xYw#1swY��xYw#1swY��xYw#1swYyxYw)	N�	syntaxerr�__init__r�rWzinvalid python syntax = $1
�rQ�xyzzyr&)rPrQrkrr�r�r\ror{rrr4�aproposr~r�r6)rn�pkgdir�	badsyntaxr�r<r=s      r#�test_apropos_with_bad_packagez-PydocImportTest.test_apropos_with_bad_packagesd�������f�k�2��
������G�G�L�L���4�r�y�y�@�4�G�	�
�)�S�
!�Q�
�G�G�2�3�"�
�
(�
(�v�h�
(�
7� �"�c�$�&�#��M�M�'�*�'�#�
���S�\�\�^�R�0����S�\�\�^�R�0� �"�c�$�&�#��M�M�+�.�'�#�
���S�\�\�^�1�1�3�[�A����S�\�\�^�R�0�8�
7�"�
!��'�&��#�"��'�&��#�"��8�
7�sz�:F9�+G6�6G�G�G�AG6�1G*�<G�G*�AG6�9G�G�G�G	�G6�G'�#G*�*G3	�/G6�6G?c�h�tjjtd�|_tj
|jd�|j
tj|j�|jtg��5t�5}t�5}tjd�ddd�ddd�ddd�|jj�d�|jj�d�y#1swY�ZxYw#1swY�^xYw#1swY�bxYw)N�
unreadablerr��SOMEKEYr&)rPrQrkr�unreadable_dirr�r[�rmdirr{rrr4r�r~r�)rnr<r=s   r#� test_apropos_with_unreadable_dirz0PydocImportTest.test_apropos_with_unreadable_dir's��� �g�g�l�l�6�<�@���
����$�$�a�(�������$�"5�"5�6��
(�
(�v�h�
(�
7� �"�c�$�&�#��M�M�)�,�'�#�8�
	
��������,���������,�	'�&��#�"��8�
7�s<�D(�D�!D�7D�?D(�D�D�D%	�!D(�(D1zcannot remove x bitc�^�tjjtd�}tj|�|jt|�tjj|d�}t|d�5}|jd�ddd�tjtj|�j�}	tj||tjz�|jtg��5t�5}t!j"d�ddd�ddd�|j%dj'��tj||�y#1swY��xYw#1swY�TxYw#1swY�XxYw#tj||�wxYw)N�walkpkgr�rWrir�r&)rPrQrkrr�r[rr\ro�stat�S_IMODE�st_mode�chmod�S_IEXECr{rr4r�r�r�)rnr�rtrv�current_moders      r#�test_apropos_empty_docz&PydocImportTest.test_apropos_empty_doc6s�������f�i�0��
����������'��G�G�L�L���7�	�
�)�S�
!�T��J�J�y�!�"��|�|�B�G�G�F�O�$;�$;�<��	+��H�H�V�\�T�\�\�M�9�:��,�,�6�(�,�;�_�=N�RX��
�
�b�!�>O�;��M�M�)�V�_�_�%6�7��H�H�V�\�*�"�
!��
>O�=N��;�;��
�H�H�V�\�*�sH�<E0�	?F�F�E<�)F�1(F�0E9�<F	�F�F�
F�F,c���tjjtd�}tj|�tjj|d�}t|dd��5}|j
d�ddd�|jtg��5ttj�}tjjdt�	|jtd	�5ddl
}ddd�|jd
d�}d}|j||�|tjdd	ddd�y#1swY��xYw#1swY�XxYw#|tjddwxYw#1swYyxYw)
N�test_error_packager��wtr�rXzraise ValueError("ouch")
r�r�ouchzsearch?key=test_error_package�Pydoc: Search Resultsz8<a href="test_error_package.html">test_error_package</a>)rPrQrkrr�r\ror{�tuplerk�insert�assertRaisesRegex�
ValueErrorr�r�r�)rnr��initr��saved_pathsr�rZ�founds        r#�test_url_search_package_errorz-PydocImportTest.test_url_search_package_errorHs�������f�&:�;��
������w�w�|�|�F�M�2��
�$��w�
/�1�
�G�G�4�5�0�
�
(�
(�v�h�
(�
7�����/�K��H�H�O�O�A�v�&�

*��+�+�J��?�-�@��,�,�-L�+�-��-���
�
�e�T�*�)������8�
7�0�
/��@�?��*�������8�
7�sH�(D>�>E.�E�.E
�3.E�!E.�>E�
E	�E�E+�+E.�.E7z(causes undesirable side-effects (#20128)c��d}d}d}||z|z}t�}tj|��}|d�|j�j	�}t|j
��}|j||�y)N���r�rl)rr4r�r�r6�lenr��assertGreaterEqual)	rn�num_header_lines�num_module_lines_min�num_footer_linesr�rGrr��	num_liness	         r#�test_moduleszPydocImportTest.test_modules_s|���� ����#�&:�:�=M�M��������V�,���y�����"�(�(�*����)�)�+�,�	����	�8�4r"c���d}t�}tj|��}t�5}|d�ddd�j	�}|j||�y#1swY�,xYw)Nzpydoc - r�z
modules pydoc)rr4r�rr�r��rnr�rGrr>r�s      r#�test_modules_searchz#PydocImportTest.test_modules_searchosX����������V�,��
�
�'��?�#���!�!�#���
�
�h��'�	�
�s�	A!�!A*z+some buildbots are not cooperating (#20128)c��d}t�}tj|��}t�5}|d�ddd�j	�}|j|j
|��y#1swY�:xYw)Nzgc - r�zmodules garbage)rr4r�rr�r��
startswithrs      r#�test_modules_search_builtinz+PydocImportTest.test_modules_search_builtin|s`����������V�,��
�
�'��$�%���!�!�#������)�)�(�3�4�	�
�s�	A/�/A8c��	tjtj�}|j|t�|j	|j
d�|j	|jtj�|j	|jtj�ttjd<y#ttjd<wxYwrh)	r4�
importfiler5�assertIsNotr~rrdrkrl)rn�loaded_pydocs  r#�test_importfilezPydocImportTest.test_importfile�s���	)� �+�+�E�N�N�;�L����\�5�1����\�2�2�G�<����\�2�2�E�N�N�C����\�2�2�E�N�N�C�#(�C�K�K�� ��5�C�K�K�� �s�B)C�CN)rrr r�r�r�r�r	�skip_unless_working_chmodr�r�rr�r��skiprrrrr!r"r#r�r��s���&�
/�*1�*
-��(�(��X�_�_�]�$9�:�+�;�)�+� *�.�X�]�]�=�>�
5�?�
5��X�]�]�=�>�
(�?�
(��X�]�]�@�A�	5�B�	5�	)r"r�c�v�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
ed	��Zed
��Z
d�Zed��Zd
�Zd�Zed��Zed��Zd�Zd�Zed��Zed��Zed��Zed��Zed��Zed��Zed��Zed��Zed��Zed��Z ed��Z!d�Z"d�Z#ed ��Z$y!)"�TestDescriptionsc�R�|jtjdt�yrhrirms r#rozTestDescriptions.tearDown�r�r"c�Z�tjt�}|jd|�y)Nr)r4r�rr��rnrFs  r#�test_modulezTestDescriptions.test_module�s �����{�+���
�
�m�S�)r"c��Gd�d�}|�}|jtj|�d�|jtj|�d�dtz}|j	|tj
|��y)Nc��eZdZy)�&TestDescriptions.test_class.<locals>.CNrr!r"r#�Cr���r"rzclass CzC in module %s object)r~r4�describerr�r�)rnrr5r�s    r#�
test_classzTestDescriptions.test_class�sd��"�"�
�C���������*�I�6��������*�C�0�*�X�5���
�
�h�� 0� 0�� 3�4r"c�R�|jtjtjt
�d�tjtjt
tj��}|jd|�|jd|�ts?|jtjj�j�d|�|jtjtt
�d�tjtt
tj��}|jd|�|jd|�ts@|jtjj�j�d|�yy)	N�
_GenericAliasr�z_GenericAlias in module typingzList = class list(object)r�GenericAliaszGenericAlias in module builtinsz
class list(object))r~r4r�typing�Listr:r��	plaintextr�r�listr�r6r�rs  r#�test_generic_aliasz#TestDescriptions.test_generic_alias�s�����������C�(8�9�?�K����v�{�{�3�/�%�/�/�J���
�
�6��<��
�
�1�3�7�#��M�M�$�,�,�,�,�.�9�9�;�A�>��D��������S�	�2�N�C����t�C�y�5�?�?�C���
�
�7��=��
�
�,�c�2�#��M�M�$�,�,�,�,�.�9�9�;�A�>��D�$r"c��|jtjtjt
tf�d�tjtjt
tftj��}|jd|�|jd|�tjjrI|jtjjj�j�d|�|jtjt
tz�d�tjt
tztj��}|jd|�|jd|�tsJ|jtjjj�j�d|�yy)	N�_UnionGenericAliasr�z#_UnionGenericAlias in module typingzUnion = typing.Unionr�	UnionTypez UnionType in module types objectz!
class UnionType(builtins.object))r~r4rr�Unionr:r�r�r!r�r�r6r�r�typesr&rs  r#�test_union_typez TestDescriptions.test_union_type�s2�����������S�#�X�(>�?�AU�V����v�|�|�C��H�5����P���
�
�;�S�A��
�
�,�c�2��<�<����M�M�&�,�,�.�.�4�4�6�A�A�C�A�F��L��������c�	�2�K�@����s�S�y�5�?�?�C���
�
�8�#�>��
�
�:�C�@�#��M�M�%�/�/�1�1�7�7�9�D�D�F�q�I�3�O�$r"c��|jtjtj�d�tj
tjtj��}|jd|�tjjr\|jd|�|jtjjj�j�d|�y|jd|�y)N�_SpecialFormr�z_SpecialForm in module typingzNoReturn = typing.NoReturnrz%NoReturn = class _SpecialForm(_Final))r~r4rr�NoReturnr�r!r�r�r6r�rs  r#�test_special_formz"TestDescriptions.test_special_form�s������������8�.�I����v������I���
�
�5�s�;��?�?�"�"��M�M�6��<��M�M�&�/�/�1�1�7�7�9�D�D�F�q�I�3�O��M�M�A�3�Gr"c	�<�dtjtjdtdtjtj
ttjffd�}tjd�}Gd�dtj|tjttf�}|jtj|�j�dd	�|jtj|�j�d
d�y)N�data�xr8c��yrrr!)r/r0s  r#�fooz/TestDescriptions.test_typing_pydoc.<locals>.foo�s��r"�Tc��eZdZy)�-TestDescriptions.test_typing_pydoc.<locals>.CNrr!r"r#rr5�rr"r���z?ffoooo(data: List[Any], x: int) -> Iterator[Tuple[int, Any]]r�z2class CC(collections.abc.Mapping, typing.Generic))rr �Anyr:�Iterator�Tuple�TypeVar�Generic�Mappingr�r~r4r�r�)rnr2r3rs    r#�test_typing_pydocz"TestDescriptions.test_typing_pydoc�s���	�f�k�k�&�*�*�-�	��	�!�?�?�6�<�<��V�Z�Z��+H�I�	�
�N�N�3���A����q�!�6�>�>�#�s�(�#;�A�����)�)�#�.�9�9�;�B�?�9�	:�	
����)�)�!�,�7�7�9�!�<�P�	Rr"c��dD]<}|jtj|��	tj|��>dD]K}|jtj|��|jttj|��My#t$r#|jdj
|��Y��wxYw)N)r�z
str.translatezbuiltins.strzbuiltins.str.translatezfinding the doc of {!r} failed)�notbuiltins�strrrzstrr.translatezstr.trrrranslatezbuiltins.strrrzbuiltins.str.trrranslate)	�assertIsNotNoner4�locater��ImportError�failr^rr�assertRaises)rn�names  r#�test_builtinzTestDescriptions.test_builtin�s���/�D�
� � ����d�!3�4�
I�� � ��&�
/�1�D�
���e�l�l�4�0�1����k�5�+;�+;�T�B�	1���
I��	�	�:�A�A�$�G�H�
I�s�B�)B?�>B?c�~�tjtj|��}|jd�}|dS�Nr1r�)r4�plainr�r���orZ�liness   r#�_get_summary_linez"TestDescriptions._get_summary_line�s2���{�{�5�+�+�A�.�/���
�
�4� ���Q�x�r"c��tjtj|��}|jd�}dj	|dd�SrI)r4rJr�r�rkrKs   r#�_get_summary_linesz#TestDescriptions._get_summary_lines�s>���{�{�5�+�+�A�.�/���
�
�4� ���y�y��q�r��#�#r"c�v�|j|jtjj�d�y)Nzwrap(self, text))r~rNr	�TextWrapper�wraprms r#�test_unbound_python_methodz+TestDescriptions.test_unbound_python_method�s,������/�/��0D�0D�0I�0I�J��	 r"c�v�|j|jtjj�d�y)Nz1dump(self, obj, /) unbound _pickle.Pickler method)r~rN�_pickle�Pickler�dumprms r#�test_unbound_builtin_methodz,TestDescriptions.test_unbound_builtin_method�s+������/�/����0D�0D�E�?�	Ar"c��tj�}|j|j|j�d�y)Nz2wrap(text) method of textwrap.TextWrapper instance)r	rRr~rNrS)rn�ts  r#�test_bound_python_methodz)TestDescriptions.test_bound_python_methods3��� � �"������/�/����7�@�	Br"c��tdgd��}tj|�}|j|j	d�|j	d��|j|j	d�|j	d��Gd�d�}Gd�d	�}tj|�tj|�y)
NrG)rHrI�agegrouprHrIr^c��eZdZdZy)�MTestDescriptions.test_field_order_for_named_tuples.<locals>.NonIterableFieldsN�rrr �_fieldsr!r"r#�NonIterableFieldsr`
s���Gr"rcc��eZdZggZy)�MTestDescriptions.test_field_order_for_named_tuples.<locals>.NonHashableFieldsNrar!r"r#�NonHashableFieldsres	���d�Gr"rf)rr4r��
assertLess�index)rnrGr*rcrfs     r#�!test_field_order_for_named_tuplesz2TestDescriptions.test_field_order_for_named_tupless����H�&K�L�����V�$��������
�+�Q�W�W�[�-A�B��������,�a�g�g�j�.A�B�	�	�	�	�	���*�+�
���*�+r"c��t�}tj|�}|j|j	|j
�d�y)Nz/dump(obj, /) method of _pickle.Pickler instance)rrVrWr~rNrX)rnr*�ps   r#�test_bound_builtin_methodz*TestDescriptions.test_bound_builtin_methods9���J���O�O�A�������/�/����7�=�	?r"c�b�|j|jtj�d�y)Nz0stat(path, *, dir_fd=None, follow_symlinks=True))r~rNrPr�rms r#�test_module_level_callablez+TestDescriptions.test_module_level_callables%������/�/����8�>�	@r"c�b�|j|jtj�d�y)Nz*lower(self, /) unbound builtins.str method)r~rNr��lowerrms r#�"test_unbound_builtin_method_noargsz3TestDescriptions.test_unbound_builtin_method_noargs$s$������/�/��	�	�:�8�	:r"c�Z�|j|jdj�d�y)Nr&z'lower() method of builtins.str instance)r~rNrprms r#� test_bound_builtin_method_noargsz1TestDescriptions.test_bound_builtin_method_noargs(s$������/�/����9�5�	7r"c�:�Gd�d�}|j|j|jd�d�|j|j|j�d�|j	dtjtj|���y)Nc��eZdZed��Zy)�-TestDescriptions.test_staticmethod.<locals>.Xc��	yrrr!�r0�ys  r#�smz0TestDescriptions.test_staticmethod.<locals>.X.sm/s��%�r"N)rrr �staticmethodrzr!r"r#�Xrv.s��
�
��
r"r|rzzsm(x, y)
    A static method
zJ
 |  Static methods defined here:
 |
 |  sm(x, y)
 |      A static method
)r~rP�__dict__rzr�r4rJr��rnr|s  r#�test_staticmethodz"TestDescriptions.test_staticmethod,s���	�	�
	
����0�0����D�1A�B�1�	2�	
����0�0����6�9�	�	
�
�
��
�[�[��!�!�!�$�%�	'r"c�:�Gd�d�}|j|j|jd�d�|j|j|j�d�|j	dtjtj|���y)Nc��eZdZed��Zy)�,TestDescriptions.test_classmethod.<locals>.Xc��	yrrr!)�clsr0s  r#�cmz/TestDescriptions.test_classmethod.<locals>.X.cmDs��$�r"N)rrr �classmethodr�r!r"r#r|r�Cs��
�
��
r"r|r�zcm(...)
    A class method
zFcm(x) class method of test.test_pydoc.test_pydoc.X
    A class method
zE
 |  Class methods defined here:
 |
 |  cm(x)
 |      A class method
)r~rPr}r�r�r4rJr�r~s  r#�test_classmethodz!TestDescriptions.test_classmethodAs���	�	�
	
����0�0����D�1A�B�0�	1�	
����0�0����6�9�	�	
�
�
��
�[�[��!�!�!�$�%�	'r"c�|�|j|jtj�d�|j|jtj
�d�|j|jtj�d�|j|jtj�d�y)N�	numerator�realr9�obj)
r~rNr:r��floatr�r�r9�
memoryviewr�rms r#�test_getset_descriptorz'TestDescriptions.test_getset_descriptorVs���	
����/�/��
�
�>��L�����/�/��
�
�;�V�D�����/�/�	���?��H�����/�/�
���?��Gr"c���|j|jtj�d�|j|jtj
�d�|j|jtj
�d�|j|jtj�d�|j|jtj�d�y)Nr��start�fget�value)r~rN�complexr��ranger��slice�propertyr��
StopIterationr�rms r#�test_member_descriptorz'TestDescriptions.test_member_descriptor_s���	
����/�/����=�v�F�����/�/����<�g�F�����/�/����<�g�F�����/�/��
�
�>��G�����/�/�
�0C�0C�D�g�Nr"c�n�Gd�d�}|j|j|j�d�y)Nc��eZdZdZy)�4TestDescriptions.test_slot_descriptor.<locals>.PointrxN)rrr �	__slots__r!r"r#�Pointr�ks�� �Ir"r�r0)r~rNr0)rnr�s  r#�test_slot_descriptorz%TestDescriptions.test_slot_descriptoris+��	!�	!�����/�/����8�#�>r"c�t�Gd�d�}|j|j|jd�d�y)Nc��eZdZy)�6TestDescriptions.test_dict_attr_descriptor.<locals>.NSNrr!r"r#�NSr�qr�r"r�r})r~rNr})rnr�s  r#�test_dict_attr_descriptorz*TestDescriptions.test_dict_attr_descriptoros3��	�	�����/�/����J�0G�H�#�	%r"c��|j|jttj�j
�d�|j|jttj�j�d�|j|jttj�j�d�|j|jttj�j�d�y)N�width�debug�major�max)r~rNr�rk�	hash_infor��flagsr��version_infor��
float_infor�rms r#� test_structseq_member_descriptorz1TestDescriptions.test_structseq_member_descriptorvs�������/�/��S�]�]�0C�0I�0I�J� �	"�����/�/��S�Y�Y��0E�0E�F� �	"�����/�/��S�5E�5E�0F�0L�0L�M� �	"�����/�/��S�^�^�0D�0H�0H�I��	 r"c�r�tdd�}|j|j|j�d�y)N�Box)r��heightz    Alias for field number 0
)rr~rPr�)rnr�s  r#� test_namedtuple_field_descriptorz1TestDescriptions.test_namedtuple_field_descriptor�s3���� 3�4������0�0����;�>�	r"c���Gd�d�}|j|j|j�d�|jdt	j
t	j|���y)Nc��eZdZed��Zy)�,TestDescriptions.test_property.<locals>.Rectc�6�	|j|jzSrr)rW�hrms r#�areaz1TestDescriptions.test_property.<locals>.Rect.area�s��&��v�v�����&r"N)rrr r�r�r!r"r#�Rectr��s��
�
'��
'r"r�z    Area of the rect
z#
 |  area
 |      Area of the rect
)r~rPr�r�r4rJr�)rnr�s  r#�
test_propertyzTestDescriptions.test_property�s^��	'�	'�	
����0�0����;�>�	�	
�
�
���[�[��!�!�$�'�(�	*r"c���Gd�d��G�fd�d�}|j|j|j�dt�d��d|j_|j|j|j�dt�d��d	|j_|j|j|j�d
�y)Nc��eZdZd�Zy)�?TestDescriptions.test_custom_non_data_descriptor.<locals>.Descrc��|�|Sy�Nr�r!�rnr�r�s   r#�__get__zGTestDescriptions.test_custom_non_data_descriptor.<locals>.Descr.__get__�����;��K�r"N)rrr r�r!r"r#�Descrr��s��
r"r�c���eZdZW��Zy)�;TestDescriptions.test_custom_non_data_descriptor.<locals>.XN�rrr �attr�r�s�r#r|r���
����7�Dr"r|rbzH.TestDescriptions.test_custom_non_data_descriptor.<locals>.Descr object>�Custom descriptorz_.TestDescriptions.test_custom_non_data_descriptor.<locals>.Descr object>
    Custom descriptor
r2zfoo(...)
    Custom descriptor
)r~rPr�rr��rnr|r�s  @r#�test_custom_non_data_descriptorz0TestDescriptions.test_custom_non_data_descriptor�s����	�	�
	�	�	
����0�0����8�?�
��S�;W�	X�-���������0�0����8�?�
���;�	�
 ���������0�0����8�;�	r"c�x��Gd�d��G�fd�d�}|j|j|j�d�d|j_|j|j|j�d�d|j_|j|j|j�d	�y)
Nc��eZdZd�Zd�Zy)�;TestDescriptions.test_custom_data_descriptor.<locals>.Descrc��|�|Syr�r!r�s   r#r�zCTestDescriptions.test_custom_data_descriptor.<locals>.Descr.__get__�r�r"c��ddzy)Nr�rr!r�s   r#�__set__zCTestDescriptions.test_custom_data_descriptor.<locals>.Descr.__set__�s	���!�r"N)rrr r�r�r!r"r#r�r��s��
�
r"r�c���eZdZW��Zy)�7TestDescriptions.test_custom_data_descriptor.<locals>.XNr�r�s�r#r|r��r�r"r|r&r�z    Custom descriptor
r2zfoo
    Custom descriptor
)r~rPr�r�rr�s  @r#�test_custom_data_descriptorz,TestDescriptions.test_custom_data_descriptor�s����	�	�	�	�	
����0�0����8�"�=�,���������0�0����8�;�	� ���������0�0����8�;�	r"c�
�dtfd�}tjtjj	|��}|jd|�tj�j	|�}|jd|�y)Nr8c��K�y�wr�r!)�igns r#�
coro_functionz=TestDescriptions.test_async_annotation.<locals>.coro_function�s	�����s�zasync coro_functionz4async <a name="-coro_function"><strong>coro_function)r:r4rJr!�documentr�rB)rnr�rZrcs    r#�test_async_annotationz&TestDescriptions.test_async_annotation�sd��	��	��{�{�5�?�?�3�3�M�B�C���
�
�+�T�2��}�}��'�'�
�6���
�
�B��	r"c��d�}tjtjj|��}|j	d|�tj
�j|�}|j	d|�y)Nc�K�d���y�wr�r!r!r"r#�an_async_generatorzLTestDescriptions.test_async_generator_annotation.<locals>.an_async_generator�s�����G�s�	zasync an_async_generatorz>async <a name="-an_async_generator"><strong>an_async_generator)r4rJr!r�r�rB)rnr�rZrcs    r#�test_async_generator_annotationz0TestDescriptions.test_async_generator_annotation�s_��	��{�{�5�?�?�3�3�4F�G�H���
�
�0�$�7��}�}��'�'�(:�;���
�
�L��	r"c�t�d�}tj�j|�}|jd|�y)Nc��	yrrr!r!r"r#�a_fn_with_https_linkzHTestDescriptions.test_html_for_https_links.<locals>.a_fn_with_https_link�s��+�r"z3<a href="https://localhost/">https://localhost/</a>)r4rBr�r�)rnr�rcs   r#�test_html_for_https_linksz*TestDescriptions.test_html_for_https_links�s2��	��}�}��'�'�(<�=���
�
�A��	
r"N)%rrr rorrr#r)r-r=rGr{rNrPrTrrYr\rirlrnrqrsrr�r�r�r�r�r�r�r�r�r�r�r�r�r!r"r#rr�s���3�*�
5�
E�
P�H�
R�C�"�����$��$� ��A��A�
B�,� �?��?��@��@�:�7��'��'�(�'��'�(�H��H��O��O��?��?�
�%��%�� �� ������
*��
*�����0����0
�
��	
��	
r"rc�l�eZdZd�Zd�Zejfd�Zejfd�Zd�Z	d�Z
d�Zd�Zy	)
�PydocFodderTestc�R�|jtjdt�yrhrirms r#rozPydocFodderTest.tearDown�r�r"c��|j�}d\}}|�|j|�}|�|j||�}|||S)N)rN)r�rh)rnrZ�	beginline�endlinerM�
beginindex�endindexs       r#�
getsectionzPydocFodderTest.getsection�sO�����!��&��
�H�� ����Y�/�J����{�{�7�J�7�H��Z��)�)r"c��tj�}|j|�}t|�}|tj
urdnd}|j
|d|�d�d�}|jd|�|jd|�|jd|�|jd	|�|jd
|�|jd|�|jd|�|jd
|�|jd|�|j
|d|�d�d�}|jd|�|tj
urdnd}|jd|z|�|jd|�|jd|�|jd|�|j
|d|�d�d�}|jd|�|jd|�y)N�defined here�inherited from Bz |  Methods �:zJ |  ----------------------------------------------------------------------z# |  A_method_alias = A_method(self)z# |  B_method_alias = B_method(self)z; |  A_staticmethod(x, y) from test.test_pydoc.pydocfodder.Az/ |  A_staticmethod_alias = A_staticmethod(x, y)z6 |  global_func(x, y) from test.test_pydoc.pydocfodderz) |  global_func_alias = global_func(x, y)zL |  global_func2_alias = global_func2(x, y) from test.test_pydoc.pydocfodderz* |  __repr__(self, /) from builtins.objectz# |  object_repr = __repr__(self, /)z |  Static methods zV |  A_classmethod_ref = A_classmethod(x) class method of test.test_pydoc.pydocfodder.Ar&�. class method of test.test_pydoc.pydocfodder.Bz( |  B_classmethod_ref = B_classmethod(x)zN |  A_method_ref = A_method() method of test.test_pydoc.pydocfodder.A instancez> |  get(key, default=None, /) method of builtins.dict instancezI |  dict_get = get(key, default=None, /) method of builtins.dict instancez |  Class methods z |  B_classmethod(x)z* |  B_classmethod_alias = B_classmethod(x))r4rTr�rMrr�r�r��rnr�rFr��whererM�notes       r#�test_text_doc_routines_in_classz/PydocFodderTest.test_text_doc_routines_in_class�s����m�m�o�����c�"���F�#��"%����"6��<N������,�u�g�Q�(?��Q���
�
�;�U�C��
�
�;�U�C��
�
�S�UZ�[��
�
�G��O��
�
�N�PU�V��
�
�A�5�I��
�
�d�fk�l��
�
�B�E�J��
�
�;�U�C�����*=�e�W�A�(F��X���
�
�n�pu�v��K�M�M�)�r�/_���
�
�@�4�G��O��
�
�f�hm�n��
�
�V�X]�^��
�
�a�ch�i�����*<�U�G�1�(E��W���
�
�,�e�4��
�
�B�E�Jr"c�D�tj�}|j|�}t|�}|tj
urdnd}|j
|d|�d�d�}|jd|�|jd|�|jd|�|jd	|�|jd
|�|jd|�|jd|�|jd
|�|jd|�|j
|d|�d�d�}|jd|�|tj
urdnd}|jd|z|�|jd|�|j
|d|�d�d�}|jd|�|jd|�y)Nr�r�zMethods r�r`zA_method_alias = A_method(self)zB_method_alias = B_method(self)z7A_staticmethod(x, y) from test.test_pydoc.pydocfodder.Az+A_staticmethod_alias = A_staticmethod(x, y)z2global_func(x, y) from test.test_pydoc.pydocfodderz%global_func_alias = global_func(x, y)zHglobal_func2_alias = global_func2(x, y) from test.test_pydoc.pydocfodderz&__repr__(self, /) from builtins.objectzobject_repr = __repr__(self, /)zStatic methods zRA_classmethod_ref = A_classmethod(x) class method of test.test_pydoc.pydocfodder.Ar&r�z$B_classmethod_ref = B_classmethod(x)zJA_method_ref = A_method() method of test.test_pydoc.pydocfodder.A instancezClass methods zB_classmethod(x)z&B_classmethod_alias = B_classmethod(x))r4rBr�rdrr�r�r�r�s       r#�test_html_doc_routines_in_classz/PydocFodderTest.test_html_doc_routines_in_classsw���m�m�o�����c�"���6�"��"%����"6��<N������(�5�'��(;�V�D���
�
�7��?��
�
�7��?��
�
�O�QV�W��
�
�C�U�K��
�
�J�E�R��
�
�=�u�E��
�
�`�bg�h��
�
�>��F��
�
�7��?�����/�%���(B�F�K���
�
�j�lq�r��K�M�M�)�r�/_���
�
�<�t�C�U�K��
�
�b�di�j�����.���q�(A�6�J���
�
�(�%�0��
�
�>��Fr"c�B�|jtj�yrr)r�r�Drms r#�)test_text_doc_inherited_routines_in_classz9PydocFodderTest.test_text_doc_inherited_routines_in_class2����,�,�[�]�]�;r"c�B�|jtj�yrr)r�rr�rms r#�)test_html_doc_inherited_routines_in_classz9PydocFodderTest.test_html_doc_inherited_routines_in_class5r�r"c��tj�}|jt�}t	|�}|j|dd�}|j
d|�|j
d|�|j
d|�|j
d|�|j
d|�|j
d|�|j
d	|�|j
d
|�|j
d|�|j
d|�|j
d
|�|j
d|�|j
d|�|j
d|�|j
d|�y)N�	FUNCTIONS�FILEz)    global_func_alias = global_func(x, y)z    A_staticmethod(x, y)z/    A_staticmethod_alias = A_staticmethod(x, y)z&    A_classmethod(x) class method of Az7    A_classmethod2 = A_classmethod(x) class method of Az7    A_classmethod3 = A_classmethod(x) class method of Bz#    A_method() method of A instancez/    A_method2 = A_method() method of A instancez/    A_method3 = A_method() method of B instancez-    A_staticmethod_ref = A_staticmethod(x, y)z@    A_staticmethod_ref2 = A_staticmethod(y) method of B instancez>    get(key, default=None, /) method of builtins.dict instancezI    dict_get = get(key, default=None, /) method of builtins.dict instancez    B_method(self)z    B_method2 = B_method(self))r4rTrCrrMr�r��rnrFr�rMs    r#� test_text_doc_routines_in_modulez0PydocFodderTest.test_text_doc_routines_in_module8s���m�m�o�����{�+���F�#�������V�<���
�
�A�5�I��
�
�0�%�8��
�
�G��O��
�
�>��F��
�
�O�QV�W��
�
�O�QV�W��
�
�;�U�C��
�
�G��O��
�
�G��O��
�
�E�u�M��
�
�X�Z_�`��
�
�V�X]�^��
�
�a�ch�i��
�
�*�E�2��
�
�6��>r"c��tj�}|jt�}t	|�}|j|dd�}|j
d|�|j
d|�|j
d|�|j
d|�|j
d|�|j
d|�|j
d|�|j
d	|�|j
d
|�|j
d|�|j
d|�|j
d
|�|j
d|�|j
d|�|j
d|�y)Nz
 Functionsz& global_func_alias = global_func(x, y)z A_staticmethod(x, y)z, A_staticmethod_alias = A_staticmethod(x, y)z"A_classmethod(x) class method of Az4 A_classmethod2 = A_classmethod(x) class method of Az4 A_classmethod3 = A_classmethod(x) class method of Bz  A_method() method of A instancez, A_method2 = A_method() method of A instancez, A_method3 = A_method() method of B instancez* A_staticmethod_ref = A_staticmethod(x, y)z= A_staticmethod_ref2 = A_staticmethod(y) method of B instancez; get(key, default=None, /) method of builtins.dict instancezF dict_get = get(key, default=None, /) method of builtins.dict instancez B_method(self)z B_method2 = B_method(self))r4rBrCrrdr�r�rs    r#� test_html_doc_routines_in_modulez0PydocFodderTest.test_html_doc_routines_in_moduleQs���m�m�o�����{�+���6�"�������d�;���
�
�>��F��
�
�-�u�5��
�
�D�e�L��
�
�:�E�B��
�
�L�e�T��
�
�L�e�T��
�
�8�%�@��
�
�D�e�L��
�
�D�e�L��
�
�B�E�J��
�
�U�W\�]��
�
�S�UZ�[��
�
�^�`e�f��
�
�'��/��
�
�3�U�;r"N)
rrr ror�rr�r�r�r�r�rrr!r"r#r�r��s>��3�*�3>�-�-�K�83>�-�-�G�4<�<�?�2<r"r�z/Socket server not available on Emscripten/WASI.c��eZdZ	d�Zd�Zy)�PydocServerTestc�R�|jtjdt�yrhrirms r#rozPydocServerTest.tearDownqr�r"c	�:��d�}tj|dd���|j�jd�|j	�j
�|j
�fd��|jd�j�|j
t�|jdttjj�jd��j��|jdttjj�jd	��j���j�|j!�j
�|j#�j$�|j#�j�y)
Nc��d|�d|�d�}|S)Nzthe URL sent was: (z, �)r!)r�content_typerZs   r#�my_url_handlerz3PydocServerTest.test_server.<locals>.my_url_handlerws��36��E�D��Kr"�	localhostr)�hostname�portc�@���jr�j�SdSrr)�serving�stop)�serverthreads�r#r6z-PydocServerTest.test_server.<locals>.<lambda>�s���<�+?�+?�L�%�%�'�I�T�Ir"s$the URL sent was: (/test, text/html)z/tests'the URL sent was: (/test.css, text/css)z	/test.css)r4�
_start_serverr~�errorr�rr[r�rrrr�r��urljoin�readrr~rr�	docserver)rnrrs  @r#�test_serverzPydocServerTest.test_serverts<���	��*�*�� ����
	
����+�+�T�2�����,�,�-����I�	�	
�
�
�k�<�#3�#3�4����
�#����3��F�L�L�(�(��)9�)9�7�C�D�I�I�K�	�	
���6��F�L�L�(�(��)9�)9�;�G�H�M�M�O�	�
	��������-�-�.����,�0�0�1����,�*�*�+r"N)rrr rorr!r"r#rrks��
(�3� ,r"rc��eZdZ	d�Zd�Zy)�PydocUrlHandlerTestc��tj}|jt|dd�|jt|dd�y)Nr�r&r��foobar)r4r}rE�	TypeError)rnr�s  r#�test_content_type_errz)PydocUrlHandlerTest.test_content_type_err�s5���������)�Q��R�0����)�Q��X�6r"c�F�gd�}|jtjdt�	|j	�5|D]\}}|j||��	ddd�ttjd<y#1swY�!xYw#ttjd<wxYw)N))r&�Pydoc: Index of Modules)zget?key=r )rhr )rz
Pydoc: Topics)rzPydoc: Keywords)r4�Pydoc: module pydoc)z
get?key=pydocr!)zsearch?key=pydocr�)z
topic?key=defzPydoc: KEYWORD def)ztopic?key=STRINGSzPydoc: TOPIC STRINGS)rzPydoc: Error - foobarr4)rjrkrlr4r{r�)rn�requestsrr]s    r#�test_url_requestsz%PydocUrlHandlerTest.test_url_requests�s�����	
�
�
�c�k�k�'�*�E�2�	)��,�,�.�"*�J�C���)�)�#�u�5�#+�/�
$)�C�K�K�� �/�.��
$)�C�K�K�� �s"�B�A;�B�;B�B�B N)rrr rr#r!r"r#rr�s��&�7�
)r"rc��eZdZd�Zy)�
TestHelperc��|jttjj�tt
j��yrr)r~�sortedr4r�r�keyword�kwlistrms r#�
test_keywordszTestHelper.test_keywords�s-��������� 5� 5�6�����/�	1r"N)rrr r*r!r"r#r%r%�s��1r"r%c���eZdZd�Zej
eed�xrej�d�e	d���Z
ej
eed�xrej�d�e	d���Zej
eed�xrej�d�e	d���Zej
eed�xrej�d�e	d���Z
d�Zy	)
�PydocWithMetaClassesc�R�|jtjdt�yrhrirms r#rozPydocWithMetaClasses.tearDown�r�r"r�r�c�>�Gd�dt�}Gd�d|��}td�tD��}t�}t	j
|��}||�ttf|ddzz}|j�j�}|j||�y)	Nc���eZdZ�fd�Z�xZS)�=PydocWithMetaClasses.test_DynamicClassAttribute.<locals>.Metac�.��|dk(ryt�|�|�S)N�ham�spam��super�__getattr__�rnrFr�s  �r#r6zIPydocWithMetaClasses.test_DynamicClassAttribute.<locals>.Meta.__getattr__�s����5�=�!��w�*�4�0�0r")rrr r6�
__classcell__�r�s@r#�Metar0�s
���
1�
1r"r:c�0�eZdZejd��Zy)�;PydocWithMetaClasses.test_DynamicClassAttribute.<locals>.DAc��y)N�eggsr!rms r#r2z?PydocWithMetaClasses.test_DynamicClassAttribute.<locals>.DA.ham�s��r"N)rrr r(�DynamicClassAttributer2r!r"r#�DAr<�s��
�
(�
(�
�)�
r"r@��	metaclassc3�.K�|]
}|rd|znd���y�w)z	
 |      r&Nr!r(s  r#r+zBPydocWithMetaClasses.test_DynamicClassAttribute.<locals>.<genexpr>�s'����.I�/G�!�CD�l�Q�.>��.K�/G�r,r�r�)r�r��expected_data_docstringsrr4r��!expected_dynamicattribute_patternrr�r6r~)rnr:r@r�rGrr�r�s        r#�test_DynamicClassAttributez/PydocWithMetaClasses.test_DynamicClassAttribute�s���	1�4�	1�
	�4�	�).�.I�/G�.I�)I�%�������V�,���r�
�9���;�B�Q�?�?�A�
����"�(�(�*�������/r"c��Gd�dt�}Gd�d|��}t�}tj|��}||�tt
z}|j
�j�}|j||�y)Nc�$��eZdZd�Z�fd�Z�xZS)�HPydocWithMetaClasses.test_virtualClassAttributeWithOneMeta.<locals>.Metac�
�gd�S)N)r�rr�LIFEr!�r�s r#�__dir__zPPydocWithMetaClasses.test_virtualClassAttributeWithOneMeta.<locals>.Meta.__dir__�s��F�Fr"c�.��|dk(ryt�|�|�S)NrKr�)r5�_Meta__getattrr7s  �r#r6zTPydocWithMetaClasses.test_virtualClassAttributeWithOneMeta.<locals>.Meta.__getattr__�s����&�=���w�(��.�.r"�rrr rMr6r8r9s@r#r:rI�s���
G�
/�
/r"r:c��eZdZy)�IPydocWithMetaClasses.test_virtualClassAttributeWithOneMeta.<locals>.ClassNrr!r"r#�ClassrR�r�r"rSrAr�)	r�rr4r��"expected_virtualattribute_pattern1rr�r6r~)rnr:rSrGrr�r�s       r#�%test_virtualClassAttributeWithOneMetaz:PydocWithMetaClasses.test_virtualClassAttributeWithOneMeta�se��	/�4�	/�	�d�	�������V�,���u�
�:�X�E�
����"�(�(�*�������/r"c�(�
��Gd�dt��
Gd�dt��G�
�fd�d�
��}Gd�d�
�	�}Gd
�d||�	�}t�}tj|��}||�tt
z}|j
�j�}|j||�t�}tj|��}||�tt
z}|j
�j�}	|j||	�y)
Nc�$��eZdZd�Z�fd�Z�xZS)�IPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Meta1c�
�gd�S)N)r�rrr�r!rLs r#rMzQPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Meta1.__dir__����E�Er"c�.��|dk(ryt�|�|�S)Nr�r�r4r7s  �r#r6zUPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Meta1.__getattr__������%�<���w�*�4�0�0r"rPr9s@r#�Meta1rX�����
F�
1�
1r"r]c�$��eZdZd�Z�fd�Z�xZS)�IPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Meta2c�
�gd�S)N)r�rr�twor!rLs r#rMzQPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Meta2.__dir__�rZr"c�.��|dk(ryt�|�|�S)Nrbr�r4r7s  �r#r6zUPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Meta2.__getattr__�r\r"rPr9s@r#�Meta2r`�r^r"rdc�,���eZdZ��fd�Z�fd�Z�xZS)�IPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Meta3c
���tttgd��j|�z�j|�z���S)N)r�rr�three)r"r'�setrM)r�r]rds ��r#rMzQPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Meta3.__dir__sC����F�3�D��M�M�#�&�'�).���s�);�<�$=�>�?�?r"c�.��|dk(ryt�|�|�S)Nrhr�r4r7s  �r#r6zUPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Meta3.__getattr__s����'�>���w�*�4�0�0r"rP)r�r]rds@��r#�Meta3rfs���
?�
1�
1r"rkc��eZdZy)�JPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Class1Nrr!r"r#�Class1rmr�r"rnrAc��eZdZy)�JPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Class2Nrr!r"r#�Class2rp
r�r"rqr�)
r�rr4r��"expected_virtualattribute_pattern2rr�r6r~�"expected_virtualattribute_pattern3)rnrkrnrqrGr�expected_text1�result1�expected_text2�result2r]rds          @@r#�%test_virtualClassAttributeWithTwoMetaz:PydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta�s����	1�D�	1�	1�D�	1�	1�E�5�	1�	�u�	�	�V�u�	�������V�,���v��;�h�F���/�/�#�)�)�+�������1�������V�,���v��;�h�F���/�/�#�)�)�+�������1r"c��Gd�dt�}Gd�d|��}t�}tj|��}||�tt
z}|j
�j�}|j||�y)Nc��eZdZd�Zy)�.PydocWithMetaClasses.test_buggy_dir.<locals>.Mc�
�gd�S)N)r�r�missing�herer!rLs r#rMz6PydocWithMetaClasses.test_buggy_dir.<locals>.M.__dir__!s��C�Cr"N)rrr rMr!r"r#�Mr{ s��
Dr"rc��eZdZdZy)�.PydocWithMetaClasses.test_buggy_dir.<locals>.Czpresent!N)rrr r~r!r"r#rr�#s���Dr"rrAr�)	r�rr4r��!expected_missingattribute_patternrr�r6r~)rnrrrGrr�r�s       r#�test_buggy_dirz#PydocWithMetaClasses.test_buggy_dirsg��	D��	D�	�!�	�������V�,���q�	�9�H�D�
����"�(�(�*�������/r"c��t�5}tjd�ddd�j�}|j	d|�y#1swY�,xYw)Nz	enum.Enumz
class Enum)rr4r�r�r�)rnr>r's   r#�test_resolve_falsez'PydocWithMetaClasses.test_resolve_false,sB���
�'��J�J�{�#���#�#�%���
�
�l�H�-��
�s�A�AN)rrr ror�r�r�rkr�rrFrUrxr�r�r!r"r#r,r,�s��3��X�_�_�W�S�*�-�@�,�#�,�,�.�H�J��0��J�0�(�X�_�_�W�S�*�-�@�,�#�,�,�.�H�J��0��J�0�"�X�_�_�W�S�*�-�@�,�#�,�,�.�H�J��'2��J�'2�R�X�_�_�W�S�*�-�@�,�#�,�,�.�H�J��0��J�0�.r"r,c�8�eZdZd�Zd	d�Zd�Zd�Zd�Zd�Zd�Z	y)
�TestInternalUtilitiesc�H�tj�}|j|_tj
j
|jd�|_|j|j�t	j�x|_}dtj|g|_
y)N�nonexistentr&)�tempfile�TemporaryDirectoryrF�argv0dirrPrQrk�argv0r[�cleanup�getcwd�
abs_curdir�curdir�curdir_spellings)rn�tmpdirr�s   r#r�zTestInternalUtilities.setUp7sj���,�,�.������
��W�W�\�\�&�+�+�}�=��
�������'�')�y�y�{�2���*�!#�R�Y�Y�
� ;��r"Nc�J�|�|j}tj||�Srr)r�r4�_get_revised_path)rn�
given_pathr�s   r#r�z'TestInternalUtilities._get_revised_path?s%���=��J�J�E��&�&�z�5�9�9r"c���tjj�}|jD]2}t	|j|��D]}|j
|���4|Srr)rkrQ�copyr�r��countr�)rn�
clean_path�spelling�__s    r#�_get_starting_pathz(TestInternalUtilities._get_starting_pathFsQ���X�X�]�]�_�
��-�-�H��J�,�,�X�6�7���!�!�(�+�8�.��r"c��|j�}|jg|z}|j|j|�|�yrr)r�r�r~r�)rnr��
expected_paths   r#�,test_sys_path_adjustment_adds_missing_curdirzBTestInternalUtilities.test_sys_path_adjustment_adds_missing_curdirNs<���,�,�.�
����)�J�6�
�����/�/�
�;�]�Kr"c��|j�}|jg|z}|jg|z}|j|j	|�|�||jgz}|j|j	|�|�yrr)r�r�r�r~r�)rnr�r��leading_argv0dir�trailing_argv0dirs     r#�*test_sys_path_adjustment_removes_argv0_dirz@TestInternalUtilities.test_sys_path_adjustment_removes_argv0_dirSs{���,�,�.�
����)�J�6�
� �M�M�?�Z�7������/�/�0@�A�=�Q�&�$�-�-��8������/�/�0A�B�M�Rr"c����fd�}�j�}�jg|z}�jg|z}�j||�|�|�jgz}�jg|z}�j||�|�y)Nc�F���j|tj��S)N)r�)r�r4r5)r�rns �r#r�z\TestInternalUtilities.test_sys_path_adjustment_protects_pydoc_dir.<locals>._get_revised_path\s����)�)�*�E�N�N�)�K�Kr")r�r�r�r~)rnr�r�r�r�r�s`     r#�+test_sys_path_adjustment_protects_pydoc_dirzATestInternalUtilities.test_sys_path_adjustment_protects_pydoc_dir[s����	L��,�,�.�
� �M�M�?�Z�7�����)�,<�<�
����*�+;�<�m�L�&�$�-�-��8�����)�,=�=�
����*�+<�=�}�Mr"c���|j�}|jD]�}|j|��5|g|z}|j|j	|��||gz}|j|j	|��|j
g|z}|j|j	|��||j
gz}|j|j	|��ddd���y#1swY��xYw)N)�curdir_spelling)r�r��subTestrrr�r�)rnr�r��leading_curdir�trailing_curdirr�r�s       r#�5test_sys_path_adjustment_when_curdir_already_includedzKTestInternalUtilities.test_sys_path_adjustment_when_curdir_already_includedfs����,�,�.�
��-�-�H����h��7�"*��j�!8���!�!�$�"8�"8��"H�I�",��z�"9���!�!�$�"8�"8��"I�J�$(�M�M�?�^�#C� ��!�!�$�"8�"8�9I�"J�K�$3�t�}�}�o�$E�!��!�!�$�"8�"8�9J�"K�L�8�7�.�7�7�s�B-C*�*C3	rr)
rrr r�r�r�r�r�r�r�r!r"r#r�r�5s)��<�:��L�
S�	N�Mr"r�c��tj�}tjtjg|���tjt
�yrr)r
�threading_setupr��addModuleCleanup�threading_cleanupr)�thread_infos r#�setUpModuler�us8��"�2�2�4�K����.�@�@�O�;�O����m�,r"�__main__)arPrkr��importlib.utilrlr�r4rpr(rVrzrKr�r��test.support�testr(rr��
unittest.mock�urllib.parser��	xml.etreer��xml.etree.ElementTreer	�ior�collectionsr�urllib.requestrrrrr	�test.support.script_helperr
rrr
rrrrrrrr�test.support.os_helperrrr�test.test_pydocrrr�HAVE_DOCSTRINGSrDr6r�r�r�r��expected_html_data_docstringsr0rr�r�rErTrrrsr�r>r@rIrMrUrWr^rd�TestCaserfr�r�rr�r�rrr%r,r�r�r�mainr!r"r#�<module>r�s���	�
���������	�����
��������"�.��&�"�M�M�)�E�E�E�<�;�%�'�	�	��<�<��� ��
 0��\�x
�E�G�y�|!&�&I�/G�&I�!I��M��^!&�&I�/G�&I�!I��,�-4�G�D�"�*�*�,E��N��%� 
�E�G�!"�$&�
�E�G�#�&�
�E�G�#�&�,
�E�G�-#�0%�
�E�G�"����"��	��	� �H�%�%� �FT	3�8�$�$�T	3�n[)�m�[)�|X
�x�(�(�X
�v
y<�h�'�'�y<�x������W�5��%,�h�'�'�%,�	�%,�P!)�-�!)�H1��"�"�1�q.�8�,�,�q.�h=M�H�-�-�=M�@-��z���H�M�M�O�r"

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists