
    4hhc                    b   S SK r S SKrS SKrS SKrS SKrS SKrS SKrS SKrS SK	r	S SK
r
S SKrS SKrS SKrS SKrS SKrS SKrS SKrS SKrS SKrS SKrS SKrS SKrS SKrS SKrS SKrS SKJr  S SKJr  S SK J!r!J"r"  S SKJ#r#  S SKJ$r$  S SKJ%r%  S SK&J'r'J(r(J)r)  S S	KJ*r*  S S
KJ+r+J,r,J-r-J.r.J/r/J0r0J1r1  S SK2J3r3J4r4J5r5  S SK6J7r7  S SK6J8r8   " S S5      r9\RF                  Rt                  (       a  Sr;OSr;SRy                  5       r=\>" S \; 5       5      r?Sr@\>" S \; 5       5      rASR                  S\R                  5      rDSrESRy                  5       rFSRy                  5       rGSRy                  5       rHSRy                  5       rISRy                  5       rJS rKS rLS  rMS! rNS" rOS# rPS$ rQS% rR " S& S'\R                  5      rT " S( S)\R                  5      rU " S* S+\T5      rV " S, S-5      rW " S. S/\W5      rX " S0 S1\R                  5      rY " S2 S3\R                  5      rZ\R                  " \.=(       d    \/S45       " S5 S6\R                  5      5       r\ " S7 S8\T5      r] " S9 S:\R                  5      r^ " S; S<\R                  5      r_ " S= S>\R                  5      r`S? ra\bS@:X  a  \R                  " 5         gg)A    N)StringIO)
namedtuple)urlopen
urlcleanup)support)import_helper)	os_helper)assert_python_okassert_python_failurespawn_python)threading_helper)reap_childrencaptured_stdoutcaptured_stderris_emscriptenis_wasirequires_docstringsMISSING_C_DOCSTRINGS)TESTFNrmtreeunlink)	pydoc_mod)pydocfodderc                       \ rS rSrSrg)nonascii+    N__name__
__module____qualname____firstlineno____static_attributes__r       C/opt/python-3.13.8/usr/lib/python3.13/test/test_pydoc/test_pydoc.pyr   r   +   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              #   >   #    U  H  nU(       a  S U-   OSv   M     g7f)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              #   F   #    U  H  nUR                  S S5      v   M     g7f) &nbsp;N)replacer*   s     r%   r-   r-      s&      &I/G! '(iiX&>&>/Gs   !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                 n    X4-   n[        S[        R                  /UQ70 UD6u  p4nUR                  5       $ Nz-B)r
   pydoc__file__stripmodule_nameargsenvrcouterrs         r%   	run_pydocr@   8  s8    
 . D#D%..G4G3GLBS99;r$   c                 n    X4-   n[        S[        R                  /UQ70 UD6u  p4nUR                  5       $ r5   )r   r6   r7   r8   r9   s         r%   run_pydoc_failrB   B  s8     . D(u~~LLLLBS99;r$   c                     [         R                  " 5       nUR                  U 5      nUR                  [        5      =(       d    SnU(       a  SU-   S-   nUR                  5       U4$ )Nr(   z<br><a href="z">Module Docs</a>)r6   HTMLDoc	docmodule	getdoclocr   r8   )moduledocoutputlocs       r%   get_pydoc_htmlrK   J  sR    
--/C]]6"F
--	
"
(bC
$';;<<>3r$   c                 2    [         R                  " SSU 5      $ )Nz.r(   )resub)rH   s    r%   
clean_textrO   S  s    66%S!!r$   c           	          [         R                  R                  n[         R                  R                  nU" U" U" U" [        5      5      5      5      n[
        R                  " 5       nUR                  XS9nU$ )N)basedir)ospathabspathdirnamer7   r6   TextDocrF   )rG   rT   rU   rQ   rH   rJ   s         r%   get_pydoc_linkrW   W  sU    ggooGggooGgggh&789:G
--/C
---
0CJr$   c                     [         R                  " 5       nUR                  [        5      =(       d    SnU(       a  SU-   S-   nUR	                  U 5      n[        U5      nUR                  5       U4$ )Nr(   z
MODULE DOCS
    r3   )r6   rV   rF   r   rE   rO   r8   )rG   rH   rJ   rI   s       r%   get_pydoc_textrY   `  s[    
--/C
--	
"
(bC
#c)D0]]6"FF<<>3r$   c                     U R                  S5      u  n  nUR                  S5      u    p#UR                  S5      u  n  nU$ )Nz</head>z<title>z</title>)	partition)textheader_titles       r%   get_html_titler`   k  sC    >>),LFAq""9-KAq//*-KE1aLr$   c           	          U R                  SS5      n U R                  SS5      n [        R                  " SSU 5      n [        R                   " U SSS	S
SS5      n U $ )Nz<dd>r3   z<hr>F----------------------------------------------------------------------z<.*?>r(   r1   r0   z&gt;>z&lt;<)r2   rM   rN   r6   )htmls    r%   	html2textrf   s  sU    
 <<%D<<'D66'2t$D==xfc63GDKr$   c                   R    \ rS rSrS rSS jr\R                  SS j5       rS r	Sr
g)	PydocBaseTesti  c                 R    U R                  [        R                  S   [        5        g Nr6   assertIssysmodulesr6   selfs    r%   tearDownPydocBaseTest.tearDown  s     	ckk'*E2r$   Nc                 v   ^^ U=(       d$    [         R                  R                  [        5      /mSUU4S jjnU$ )Nc                 (   > T" U =(       d    TX5      $ Nr   )rS   prefixonerrordefault_pathwalk_packagess      r%   wrapper8PydocBaseTest._restricted_walk_packages.<locals>.wrapper  s     !5vGGr$   )Nr(   N)rR   rS   rU   r7   )rp   ry   rS   rz   rx   s    `  @r%   _restricted_walk_packages'PydocBaseTest._restricted_walk_packages  s0    
 : 9:	H 	Hr$   c              #      #    [         R                  nU R                  UU5      [         l         S v   U[         l        g ! U[         l        f = f7fru   )pkgutilry   r|   )rp   rS   ry   s      r%   restrict_walk_packages$PydocBaseTest.restrict_walk_packages  sA     -- $ > >}?C!E	2$1G!MG!s   ,A? AAAc                 n    [         R                  " US5      n[        U5      nU R                  XBU5        U$ )Nz	text/html)r6   _url_handlerr`   assertEqual)rp   urlexpected_titler\   results        r%   call_url_handlerPydocBaseTest.call_url_handler  s3    !!#{3%6r$   r   ru   )r   r    r!   r"   rq   r|   
contextlibcontextmanagerr   r   r#   r   r$   r%   rh   rh     s+    3 2 2r$   rh   c                      \ rS rSrSrS r\R                  " \" \	S5      =(       a    \	R                  " 5       S5      \S 5       5       r\R                  " \" \	S5      =(       a    \	R                  " 5       S5      \S 5       5       rS rS	 rS
 rS rS rS r\S 5       rS rS rS rS rS rS rS rS rS r\R                  " \" \	S5      =(       a    \	R                  " 5       S5      \R<                  R?                  S5      \S 5       5       5       r \R                  " \" \	S5      =(       a    \	R                  " 5       S5      \\R<                  R?                  S5      S 5       5       5       r!\R                  " \" \	S5      =(       a    \	R                  " 5       S5      \S 5       5       r"S r#S r$\R<                  R?                  S5      S 5       r%\R                  " \" \	S5      =(       a    \	R                  " 5       S5      \\R<                  R?                  S5      S 5       5       5       r&S  r'S! r(S" r)S# r*S$ r+S% r,S& r-\S' 5       r.S( r/S) r0S* r1S+ r2S, r3\S- 5       r4S. r5S/ r6S0r7g)1PydocDocTesti  Nc                 R    U R                  [        R                  S   [        5        g rj   rk   ro   s    r%   rq   PydocDocTest.tearDown      ckk'*E2r$   gettrace1trace function introduces __locals__ unexpectedlyc                 `   [        [        5      u  p[        U5      nUR                  5        Vs/ s H  oDR	                  5       PM     nnU Vs/ s H  oD(       d  M  UPM     nnUS	 [
        R                  5       nU Vs/ s H  oD(       d  M  UR	                  5       PM     nnU R                  XV5        [        R                  " [        5      n[        R                  R                  U5      nU R                  X5        U R                  Xq5        U R                  X!5        g s  snf s  snf s  snf N   )rK   r   rf   
splitlinesr8   html2text_of_expectedr   inspect
getabsfileurllibparsequoteassertIn)	rp   r   doc_loctext_resultline
text_linesexpected_linesmod_filemod_urls	            r%   test_html_docPydocDocTest.test_html_doc  s     )3'/:/E/E/GH/Gtjjl/G
H'1:ztTdz
:qM.99;3AJ>4T,$**,>J4%%i0,,$$X.g&h'g& I: Ks   D!
D&D&?
D+D+c                     [        [        5      u  p[        U4[        -   [        R
                  " [        5      4-   -  nU R                  X15        g ru   )rY   r   expected_text_patternexpected_text_data_docstringsr   r   r   )rp   r   r   expected_texts       r%   test_text_docPydocDocTest.test_text_doc  sM     )3- 
56 ++I689: 	/r$   c                     SS K n " S SUR                  5      n[        R                  " U5      nU R	                  SU5        g )Nr   c                       \ rS rSrSrSrSrg)IPydocDocTest.test_text_enum_member_with_value_zero.<locals>.BinaryIntegeri  r   r   r   N)r   r    r!   r"   zerooner#   r   r$   r%   BinaryIntegerr     s    DCr$   r   zBinaryInteger.zero)enumIntEnumr6   
render_docr   )rp   r   r   rH   s       r%   %test_text_enum_member_with_value_zero2PydocDocTest.test_text_enum_member_with_value_zero  s8     		DLL 	 }-*C0r$   c                 n    [        [        R                  R                  5      nU R	                  SU5        g )Nzxml.etree.elementtree)rW   xmletreeElementTreer   )rp   doc_links     r%   ,test_mixed_case_module_names_are_lower_cased9PydocDocTest.test_mixed_case_module_names_are_lower_cased  s%    !#))"7"78-x8r$   c                 `    [        [        R                  5      u  pU R                  USS5        g )Nr(   z'MODULE DOCS incorrectly includes a link)rY   r   r   r   )rp   r   r   s      r%   test_issue8225PydocDocTest.test_issue8225  s%    (3"&OPr$   c                     [         R                  n S [         l        [        R                  " 5         U[         l        g ! U[         l        f = fru   )rm   stdinr6   getpager)rp   previous_stdins     r%   test_getpager_with_stdin_none*PydocDocTest.test_getpager_with_stdin_none  s0    	'CINN&CICIs	    > Ac                      " S S5      n " S S5      n[         R                  " U" 5       5      n[         R                  " U" 5       5      nU R                  UR                  SS5      U5        g )Nc                       \ rS rSrSr Srg))PydocDocTest.test_non_str_name.<locals>.Ai  *   r   Nr   r   r$   r%   Ar     s    Hr$   r   c                       \ rS rSrSrg))PydocDocTest.test_non_str_name.<locals>.Bi  r   Nr   r   r$   r%   Br         r$   r   )r6   r   r   r2   )rp   r   r   adocbdocs        r%   test_non_str_namePydocDocTest.test_non_str_name  sU    	 		 	$$c3/6r$   c                 h    Sn[        [        U5      S5      n[        U-  nU R                  X2S5        g )Ntest.i_am_not_hereasciiz&documentation for missing module found)strrB   missing_patternr   rp   missing_moduler   expecteds       r%   test_not_herePydocDocTest.test_not_here  s5    -^N3W="^34	6r$   c                 z    [        SSS9n[        R                  R                  SS5      nU R	                  X!5        g )Nz#test.test_pydoc.test_pydoc.nonasciir   )PYTHONIOENCODINGbackslashreplace)r@   r   __doc__encoder   )rp   r   encodeds      r%   test_not_asciiPydocDocTest.test_not_ascii  s5    @SZ[""))'3EFg&r$   c                     Sn[        [        U5      S5      n[        UR                  5       -  nU R	                  X25        g )Nz test.i_am_not_here r   )r   rB   r   r8   r   r   s       r%   test_input_stripPydocDocTest.test_input_strip  s9    /^N3W="^%9%9%;;*r$   c                     [         R                  nU R                  U" S5      S5        U R                  U" S5      S5        U R                  U" S5      S5        U R                  U" S5      S5        g )Nz<function stripid at 0x88dcee4>z<function stripid>z <function stripid at 0x01F65390>42z<type 'exceptions.Exception'>)r6   stripidr   )rp   r   s     r%   test_stripidPydocDocTest.test_stripid  sl    --!BC-	/!CD-	/ 	-!@A8	:r$   c                 ~    [         R                  " 5       nUR                  [        5      nSnU R	                  X#5        g )Nz |  Built-in subclasses:
 |      async_generator
 |      BaseException
 |      builtin_function_or_method
 |      bytearray
 |      ... and \d+ other subclasses)r6   rV   docclassobjectassertRegexrp   rH   r\   snips       r%   )test_builtin_with_more_than_four_children6PydocDocTest.test_builtin_with_more_than_four_children  s4    * mmo||F#8 	$r$   c                 ~    [         R                  " 5       nUR                  [        5      nSnU R	                  X25        g )Nzc |  Built-in subclasses:
 |      FloatingPointError
 |      OverflowError
 |      ZeroDivisionError)r6   rV   r   ArithmeticErrorr   r   s       r%   test_builtin_with_child$PydocDocTest.test_builtin_with_child+  s2    & mmo||O,, 	d!r$   c                     [         R                  " 5       nUR                  [        5      nSnU R	                  X25        U R                  SU5        g )Nz^ |  Built-in subclasses:
 |      ArithmeticError
 |      AssertionError
 |      AttributeErrorZeroDivisionError)r6   rV   r   	Exceptionr   assertNotInr   s       r%   test_builtin_with_grandchild)PydocDocTest.test_builtin_with_grandchildF  sC    , mmo||I&) 	d!,d3r$   c                 |    [         R                  " 5       nUR                  [        5      nU R	                  SU5        g NzBuilt-in subclasses)r6   rV   r   r   r   rp   rH   r\   s      r%   test_builtin_no_child"PydocDocTest.test_builtin_no_childf  s/    . mmo||-..5r$   c                 |    [         R                  " 5       nUR                  [        5      nU R	                  SU5        g r  )r6   rV   r   typer   r  s      r%   test_builtin_on_metaclasses(PydocDocTest.test_builtin_on_metaclasses  s.     mmo||D!.5r$   c                 4   [         S-  R                  5       n[        S5       nUR                  S5      u  p4UR	                  5       R                  5       SS nUS   R                  S5      US'   U R                  X5        S S S 5        g ! , (       d  f       g = f)Nabdz-chelp()s   abdiir   zhelp> )r   r   r   communicatedecoderemoveprefixr   )rp   elinesprocr>   r^   oliness         r%   test_fail_help_cliPydocDocTest.test_fail_help_cli  s~    !E)557-(D%%f-FCZZ\,,.r"5Fq	..x8F1IV,	 )((s   AB		
Bc                 >   [        5        n[        R                  " US9nUR                  S5        [        S-  nU R                  X1R                  5       R                  5       R                  S[        R                  5      5        S S S 5        g ! , (       d  f       g = f)NrI   r  r3   )r   r6   Helperhelpr   r   getvaluer8   r2   rR   linesep)rp   bufhelperr   s       r%   test_fail_help_output_redirect+PydocDocTest.test_fail_help_output_redirect  se    Z3\\-FKK&.HX||~';';'='E'EdBJJ'WX	 ZZs   A:B
Bpydoc.pagerc                    S U l         [        [        5      u  p#SnSR                  5       n[        R
                  " U5      nU[        -   n[        5        n[        5        n[        5       n	[        R                  " U	S9n
U
R                  U5        U	R                  5       R                  5       nUU4[        -   [         R"                  " [        5      4-   -  nU R%                  SUR                  5       5        U R%                  SUR                  5       5        U R%                  X5        S S S 5        S S S 5        UR'                  5         g ! , (       d  f       N'= f! , (       d  f       N0= f)Nztest.test_pydoc.pydoc_modzO
        Help on module test.test_pydoc.pydoc_mod in test.test_pydoc:

        r  r(   )maxDiffrY   r   lstriptextwrapdedentr   r   r   r   r6   r  r  r  r8   r   r   r   r   assert_not_called)rp   
pager_mockunusedr   rG   help_headerexpected_help_patternrI   r?   r  r  r   r   s                r%   test_help_output_redirect&PydocDocTest.test_help_output_redirect  s    (3, FH 	 ook2 +.C C&/*;s*C\\-FKK\\^))+F1$J9:$//	:<=>M R!23R0]3 +< 	$$& +<*;s%   ECE'E
E	E
E'c                   ^ ^ UU 4S jnS T l         U" SS5        U" SS5        U" SS5        U" SS	5        U" S
S5        U" SS5        U" SS5        U" SS5        U" SS5        U" SS5        U" [        R                  R                  S5        g )Nc           	        > [        5        n[        5        n[        5       n[        R                  " US9nUR                  U 5        UR                  5       R                  5       nTR                  SUR                  5       SU  S3S9  TR                  SUR                  5       SU  S3S9  TR                  XSU  S3S9  TR                  5         S S S 5        S S S 5        g ! , (       d  f       N= f! , (       d  f       g = f)Nr  r(   zfailed on request "")msg)r   r   r   r6   r  r  r  r8   r   r   r$  )	requestexpected_text_partrI   r?   r  r  r   r%  rp   s	          r%   run_pydoc_for_requestVPydocDocTest.test_help_output_redirect_various_requests.<locals>.run_pydoc_for_request  s     "fo.?3jS1G$--/  V__%6>QRYQZZ[<\ ]  S\\^;NwiWX9Y Z0@ST[S\\]>^_,,. /@"".?.?""s#   C1B8C C1 
C.	*C11
C?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.%zThe power operatorTruezclass bool(int)FalseNonezclass NoneType(object)assertThe "assert" statementTYPESThe standard type hierarchypydoc.Helper.help&Help on function help in pydoc.Helper:&Help on function help in module pydoc:)r   r6   r  r  )rp   r%  r1  s   `` r%   *test_help_output_redirect_various_requests7PydocDocTest.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13[\ell//1YZr$   c                   ^  U 4S jnU" SSS5        U" SSS5        U" SSS5        U" S	S	S
5        U" SSS5        U" SSS5        U" [         R                  R                  SS5        U" SSS5        U" [        SS5        U" SSS5        U" [        R                  SS5        U" [        R
                  SS5        U" [        R                  SS5        U" [        [           SS5        U" SSS5        U" [        SS5        g )Nc           	      >  > [        5        n[        5        n[        R                  R	                  S5       nTR                  [        U 5      5         [        R                  " 5       nUR                  U 5        TR                  SUR                  5       5        TR                  SUR                  5       5        UR                  5         [        UR                  R                  S   5      nTR                  UR!                  5       S   U5        TR                  UR                  R                  S   SU 35        S S S 5        S S S 5        S S S 5        S S S 5        g ! , (       d  f       N'= f! , (       d  f       N0= f! , (       d  f       N9= f! , (       d  f       g = f)Nr  r(   r3   r   r   zHelp on )r   r   unittestmockpatchsubTestreprr6   r  r  r   r  assert_called_oncerO   	call_argsr;   r   )	r/  whatexpected_first_linerI   r?   r%  r  r   rp   s	           r%   run_pydoc_pager<PydocDocTest.test_help_output_pager.<locals>.run_pydoc_pager  s$   !#v!#s--%%m4
,,tG}-G$  S\\^4  v'89--/#J$8$8$=$=a$@A  !2!2!4Q!79LM  !5!5!:!:1!=$?PQ . 5 $ $# .- 54 $# $#sR   F E=E,C(E	:E,E=
F
E)%E,,
E:6E==
F	F
Fr6  EXPRESSIONSzOperator precedencer7  zbool objectzHelp on bool object:Tr:  r;  r<  r=  r>  r?  zHelper.helpr@  r   z%Help on class str in module builtins:z	str.upperz!Help on method_descriptor in str:zHelp on method_descriptor:zstr.__add__zHelp on wrapper_descriptor:zint.numeratorz1Help on getset descriptor builtins.int.numerator:listz(Help on GenericAlias in module builtins:rm   zHelp on built-in module sys:)
r6   r  r  r   upper__add__int	numeratorrQ  rm   )rp   rN  s   ` r%   test_help_output_pager#PydocDocTest.test_help_output_pager  s   	R 	],AB/EFm-CD(,DE*GH+-@@	B))=@	Bu&MNU$KL[2UV		;0LM]4QRK	MS	6B	Du&DEU$BCr$   c                     [        5        n[        R                  " 5       nUR                  S5        S S S 5        WR	                  5       nU R                  SU5        g ! , (       d  f       N1= f)NwithThe "with" statement)r   r6   r  	showtopicr  r   )rp   showtopic_ior  helptexts       r%   test_showtopicPydocDocTest.test_showtopic  sP    ,\\^FV$   ((*,h7	 s   'A
A+c                     [        5        n[        R                  " 5       nUR                  S5        SnU R	                  X1R                  5       R                  5       5        S S S 5        g ! , (       d  f       g = f)Nr   no documentation found for 'abd')r   r6   r  r[  r   r  r8   )rp   r\  r  r   s       r%   test_fail_showtopic PydocDocTest.test_fail_showtopic  sT    ,\\^FU#9HX'<'<'>'D'D'FG	 s   AA**
A8c                    [        5        n[        R                  " US9nUR                  S5        SnU R	                  XBR                  5       R                  5       5        S S S 5        UR                  5         g ! , (       d  f       N= f)Nr  r  ra  )r   r6   r  r[  r   r  r8   r$  )rp   r%  r  r  r   s        r%   #test_fail_showtopic_output_redirect0PydocDocTest.test_fail_showtopic_output_redirect  sb    Z3\\-FU#9HX||~';';'=>	  	$$& Zs   AA99
Bc                     S U l         [        5        n[        5        n[        5       n[        R
                  " US9nUR                  S5        UR                  5       R                  5       nU R                  SUR                  5       5        U R                  SUR                  5       5        U R                  SU5        S S S 5        S S S 5        UR                  5         g ! , (       d  f       N'= f! , (       d  f       N0= f)Nr  rY  r(   rZ  )r   r   r   r   r6   r  r[  r  r8   r   r   r$  )rp   r%  rI   r?   r  r  r   s          r%   test_showtopic_output_redirect+PydocDocTest.test_showtopic_output_redirect)  s     &/*;s*C\\-FV$\\^))+FR!23R0MM0&9 +< 	$$& +<*;s#   C/B C=C/
C,	(C//
C=c                     S nS[         0Ul        [        5        n[        R                  " U5        S S S 5        WR                  5       nU R                  SU5        g ! , (       d  f       N1= f)Nc                     gr   r   abcs      r%   <lambda>APydocDocTest.test_lambda_with_return_annotation.<locals>.<lambda>>      qr$   returnzlambda (a, b, c) -> intrT  __annotations__r   r6   r  r  r   rp   funchelp_ior]  s       r%   "test_lambda_with_return_annotation/PydocDocTest.test_lambda_with_return_annotation=  sR      (#'JJt ##%/: s   A
A+c                     S n[         [         [         S.Ul        [        5        n[        R                  " U5        S S S 5        WR                  5       nU R                  SU5        g ! , (       d  f       N1= f)Nc                     gr   r   rl  s      r%   rp  DPydocDocTest.test_lambda_without_return_annotation.<locals>.<lambda>F  rr  r$   rl  zlambda (a: int, b: int, c: int)rt  rv  s       r%   %test_lambda_without_return_annotation2PydocDocTest.test_lambda_without_return_annotationE  sU     %(s='JJt ##%7B s   A''
A5c                     S n[         [         [         [         S.Ul        [        5        n[        R                  " U5        S S S 5        WR                  5       nU R                  SU5        g ! , (       d  f       N1= f)Nc                     gr   r   rl  s      r%   rp  LPydocDocTest.test_lambda_with_return_and_params_annotation.<locals>.<lambda>N  rr  r$   )rm  rn  ro  rs  z&lambda (a: int, b: int, c: int) -> intrt  rv  s       r%   -test_lambda_with_return_and_params_annotation:PydocDocTest.test_lambda_with_return_and_params_annotationM  sW     %(sL'JJt ##%>I s   A,,
A:c                 D   [        SSS/5      n[        5        n[        R                  " U5        S S S 5        WR	                  5       nU R                  SU5        U R                  SU5        U R                  SU5        U R                  SU5        g ! , (       d  f       Ng= f)NPersonnickname	firstnamezAlias for field number 0zAlias for field number 1r   r   r6   r  r  r   )rp   r  rx  r]  s       r%   test_namedtuple_fields#PydocDocTest.test_namedtuple_fieldsU  s}    Hz;&?@'JJv ##%j(+k8,0(;0(; s   B
Bc                    [        SSS/SS9n[        5        n[        R                  " U5        S S S 5        WR	                  5       nU R                  SU5        U R                  SU5        U R                  SU5        g ! , (       d  f       NU= f)	NNTabcdefT)rename_1_replace_asdictr  )rp   r  rx  r]  s       r%   !test_namedtuple_public_underscore.PydocDocTest.test_namedtuple_public_underscore_  sm    uenT:'JJrN ##%dH%j(+i* s   A>>
Bc                 \   U R                  [        [        5        S H{  n[        [        SUS9 nUS:w  a  [	        SR                  U5      US9  [	        SUS9  [	        SUS9  S S S 5        [        R                  " [        0 5      nU R                  US	5        M}     g ! , (       d  f       N@= f)
N)z
ISO-8859-1UTF-8wencodingr  z#coding: {})fileu   """line 1: hézline 2: hi"""u   line 1: hé)	
addCleanupr   r   openprintformatr6   synopsisr   )rp   r  scriptr  s       r%   test_synopsisPydocDocTest.test_synopsish  s    '/HfcH5w&-..x8vF(v6oF3	 6
 ~~fb1HX7 055s   4B
B+	c                 .  ^  S7U 4S jjnU" SS5        U" SS5        U" SS5        U" SS5        U" S	S 5        U" S
S5        U" SS5        U" SS5        U" SS5        U" SS 5        U" SS 5        U" SS 5        U" SS5        U" SS5        U" SS5        U" SS5        U" SS5        U" SS5        U" SS 5        U" S S!5        U" S"S 5        U" S#S 5        U" S$S%5        U" S&S 5        U" S'S(5        U" S)S*5        U" S+S 5        U" S,S-S.S/9  U" S0S S1S/9  [         R                  " S2S1S39 nUR                  S45        UR                  5         UR	                  S55        [
        R                  " U5      nT R                  US65        S S S 5        g ! , (       d  f       g = f)8Nc                    > [        U [        5      (       a  [        U 5      nO)[        R                  " [        R
                  " U 5      US9nU   [        R                  " U5      nTR                  XA5        S S S 5        g ! , (       d  f       g = f)Nr  )	
isinstancer   r   ioTextIOWrapperBytesIOr6   source_synopsisr   )sourcer   r  source_filer   rp   s        r%   check0PydocDocTest.test_source_synopsis.<locals>.checkt  s`    &#&&&v. ..rzz&/AHU..{;  2 s   (A??
Bz"""Single line docstring."""zSingle line docstring.z7"""First line of docstring.
Second line.
Third line."""zFirst line of docstring.z9"""First line of docstring.\nSecond line.\nThird line."""z&"""  Whitespace around docstring.  """zWhitespace around docstring.zimport sys
"""No docstring"""z$  
"""Docstring after empty line."""zDocstring after empty line.z(# Comment
"""Docstring after comment."""zDocstring after comment.z3  # Indented comment
"""Docstring after comment."""z""""""r(   z"""Embedded null byte"""z"""Embedded null byte""" u   """Café and résumé."""u   Café and résumé.z'''Triple single quotes'''zTriple single quotesz"Single double quotes"zSingle double quotesz'Single single quotes'zSingle single quotesz"""split\
line"""	splitlinez#"""Unrecognized escape \sequence"""zUnrecognized escape \sequencez"""Invalid escape seq\uence"""zr"""Raw \stri\ng"""zRaw \stri\ngzb"""Bytes literal"""zf"""f-string"""z("""Concatenated""" \
"string" 'literals'Concatenatedstringliteralsz"""String""" + """expression"""z("""In parentheses""")zIn parenthesesz,("""Multiple lines """
"""in parentheses""")zMultiple lines in parentheses()s%   # coding: iso-8859-15
"""uro sign"""u   €uro signziso-8859-15r  s   """"""zutf-8zw+)moder  z"""Real file test."""
r   zReal file test.ru   )tempfileNamedTemporaryFilewriteflushseekr6   r  r   )rp   r  	temp_filer   s   `   r%   test_source_synopsis!PydocDocTest.test_source_synopsiss  s   	3 	,&	(I(	*K(	*6,	..	5+	-9(	*D(	*h	b	)	*	)#	%*$	&&$	&&$	&#	4.	0/	%	 $		<*	,/	&	 =-	/d	:m	5mW	& ((dWEOO56OONN1**95FV%67 FEEs   "AF
Fc                     [         R                  " S5      nUR                  R                  5       S   nUR                  R
                  n[        R                  " U5      nU R                  XB5        g )NrR   r   )	r   import_fresh_moduler   r   __spec__cachedr6   r  r   )rp   rR   r   filenamer  s        r%   test_synopsis_sourceless%PydocDocTest.test_synopsis_sourceless  sT    ..t4::((*1-;;%%>>(+,r$   c                    [         R                  " 5        n[        R                  R	                  US5      n[
        R                  R                  U5      n[        US5       nUR                  S5        S S S 5        [        R                  " U5        [        R                  " U0 5      nU R                  U5        [        R                  " U0 5      nU R                  U5        S S S 5        g ! , (       d  f       N}= f! , (       d  f       g = f)Nzfoomod42.pyr  foo = 1)r	   temp_cwdrR   rS   join	importlibutilcache_from_sourcer  r  
py_compilecompiler6   r  assertIsNone)rp   test_dir	init_pathcached_pathfobjr  synopsis_cacheds          r%   "test_synopsis_sourceless_empty_doc/PydocDocTest.test_synopsis_sourceless_empty_doc  s    !XX}=I#..::9EKi%

9% &y)~~i4Hh'#nn["=Oo. "! &% "!s%   AC<"C+4A.C<+
C9	5C<<
D
c                 T    SnU R                  [        R                  " U5      S5        g )Nz#I Am A Doc


Here is my description)z
I Am A Docz
Here is my description)r   r6   splitdoc)rp   example_strings     r%   test_splitdoc_with_description+PydocDocTest.test_splitdoc_with_description  s$    A7C	Er$   c                 J   [         R                  " 5        nU R                  [        5       nU R	                  [
        R                  " U5      5        S S S 5        U R                  WR                  [        5        S S S 5        g ! , (       d  f       N7= f! , (       d  f       g = fru   )
r	   r  assertWarnsDeprecationWarningassertFalser6   	ispackager   r  r7   )rp   r  cms      r%    test_is_package_when_not_package-PydocDocTest.test_is_package_when_not_package  si    !X!!"45  !:; 6R[[(3 "!55 "!s"   B&B(B
B	B
B"c                    [         R                  " 5        n[        R                  R	                  US5      n[        US5      R                  5         U R                  [        5       nU R                  [        R                  " U5      5        S S S 5        [        R                  " U5        U R                  WR                  [        5        S S S 5        g ! , (       d  f       NM= f! , (       d  f       g = f)N__init__.pyr  )r	   r  rR   rS   r  r  closer  r  
assertTruer6   r  remover   r  r7   )rp   r  r  r  s       r%   test_is_package_when_is_package,PydocDocTest.test_is_package_when_is_package  s    !XX}=IC &&(!!"45 9: 6IIi R[[(3 "! 65 "!s$   AC$&&C>C$
C!	C$$
C2c                     " S S[         5      n[        [        [         5      5      nUR                  US'   US	 US	 UR                  US'   UR
                  US'   [        R                  " U5      nU R                  X25        g )Nc                       \ rS rSrS rSrg)/PydocDocTest.test_allmethods.<locals>.TestClassi  c                     g)NTr   ro   s    r%   method_returning_trueEPydocDocTest.test_allmethods.<locals>.TestClass.method_returning_true  s    r$   r   N)r   r    r!   r"   r  r#   r   r$   r%   	TestClassr    s    r$   r  r  r   	__class____subclasshook____init_subclass__)	r   dictvarsr  r  r  r6   
allmethodsassertDictEqual)rp   r  r   methodss       r%   test_allmethodsPydocDocTest.test_allmethods  s    	 	
 V%,5,K,K()Y[! (1'A'A#$(1(C(C$%""9-W/r$   c                   ^  " S S5      m " U4S jST5      n[         R                  " U5      n[        U5      nU R                  US[        -  5        [         R                  " U[         R
                  " 5       S9nS[         S3n[        U5      nUR                  S	5       Vs/ s H  oU(       d  M  UR                  5       PM     nnU H  nU R                  Xt5        M     g s  snf )
Nc                   (    \ rS rSrSS jr\rS rSrg)+PydocDocTest.test_method_aliases.<locals>.Ai  Nc                     g ru   r   )rp   	aboveThiss     r%   tkraise3PydocDocTest.test_method_aliases.<locals>.A.tkraise      r$   c                     g ru   r   ro   s    r%   a_size2PydocDocTest.test_method_aliases.<locals>.A.a_size  r  r$   r   ru   )r   r    r!   r"   r  liftr  r#   r   r$   r%   r   r    s    ?D"r$   r   c                   >   > \ rS rSrSS jr\r Y R                  rSrg)+PydocDocTest.test_method_aliases.<locals>.Bi	  Nc                     g ru   r   )rp   tagOrIdcnfkws       r%   itemconfigure9PydocDocTest.test_method_aliases.<locals>.B.itemconfigure
  r  r$   r   ru   )	r   r    r!   r"   r
  
itemconfigr  b_sizer#   )r   s   r%   r   r  	  s    >&JXXFr$   r   am  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
 |
 |  __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
r3   )
r6   r   rO   r   r   rD   rf   splitr8   r   )	rp   r   rH   r   as_textr   r   expected_liner   s	           @r%   test_method_aliases PydocDocTest.test_method_aliases  s    	" 	"	 	 q!o %J K% %	N q5==?; * : C.3@3F3Ft3LU3L4PT,$**,3LU+MMM-1 , Vs   $
C#2C#c           
        ^^^ SSK Jm  SSKJmJm   " UUU4S jS5      n[
        R                  " U5      n[        U5      nU R                  US[        < S[        (       a  SOS	< S
[        (       a  SOS< S35        STT[        S4   /[        4   STS   ST[        S4   4S jn[
        R                  " U5      n[        U5      nU R                  US[        -  5        S[        S[        4S jn[
        R                  " U5      n[        U5      nU R                  US[        -  5        S n[
        R                  " U5      n[        U5      nU R                  US[        -  5        g )Nr   )Callable)Literal	Annotatedc                   V   > \ rS rSrS Y\\\/\4   S YS   S Y \S4   SS4S	 jrS
rg),PydocDocTest.test_long_signatures.<locals>.Ai_  arg1arg2)z
some valuezother valuearg3zsome docs about this typers  Nc                     g ru   r   )rp   r  r  r  s       r%   __init__5PydocDocTest.test_long_signatures.<locals>.A.__init__`  s    
 r$   r   )r   r    r!   r"   rT  r   r  r#   )r  r  r  s   r%   r   r  _  sM    'c3(<=&'BC  ).I)IJ #	r$   r   z0Python Library Documentation: class A in module aR  

class A(builtins.object)
 |  A(
 |      arg1: collections.abc.Callable[[int, int, int], str],
 |      arg2: Literal['some value', 'other value'],
 |      arg3: Annotated[int, 'some docs about this type']
 |  ) -> None
 |
 |  Methods defined here:
 |
 |  __init__(
 |      self,
 |      arg1: collections.abc.Callable[[int, int, int], str],
 |      arg2: Literal['some value', 'other value'],
 |      arg3: Annotated[int, 'some docs about this type']
 |  ) -> None
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors defined here:
 |
 |  __dict__r(   z*
 |      dictionary for instance variablesz
 |
 |  __weakref__z.
 |      list of weak references to the objectr3   r  zSome docr  )r                        rs  z
Some otherc                     g ru   r   r  r  s     r%   rw  /PydocDocTest.test_long_signatures.<locals>.func       r$   zPython Library Documentation: function func in module %s

func(
    arg1: collections.abc.Callable[[typing.Annotated[int, 'Some doc']], str],
    arg2: Literal[1, 2, 3, 4, 5, 6, 7, 8]
) -> Annotated[int, 'Some other']
c                     g ru   r   r)  s     r%   Afunction_with_really_long_name_so_annotations_can_be_rather_smalllPydocDocTest.test_long_signatures.<locals>.function_with_really_long_name_so_annotations_can_be_rather_small  r+  r$   zPython Library Documentation: function function_with_really_long_name_so_annotations_can_be_rather_small in module %s

function_with_really_long_name_so_annotations_can_be_rather_small(
    arg1: int,
    arg2: str
)
c                     g)N.r   )?very_long_parameter_name_that_should_not_fit_into_a_single_linesecond_very_long_parameter_names     r%   rp  3PydocDocTest.test_long_signatures.<locals>.<lambda>  s    -0r$   zPython Library Documentation: function <lambda> in module %s

<lambda> lambda very_long_parameter_name_that_should_not_fit_into_a_single_line, second_very_long_parameter_name
)collections.abcr  typingr  r  r6   r   rO   r   r   r   rT  r   )	rp   r   rH   rw  r-  does_not_have_namer  r  r  s	         @@@r%   test_long_signatures!PydocDocTest.test_long_signatures[  sv   ,-	 	 q!o0 !!r'TT!!r'XX5 		:	Ic:o67<=	01	 sL()	 t$o   				 `ao   	1 12o   	r$   c                 H   SS K n[        U5      u  p#[        U5      u  pC[        [        5      u  pS[        [        5      u  pcUR                   HR  nU S3nSU S3n	U R                  X5        U R                  X5        U R                  X5        U R                  X5        MT     g )Nr   z = _Featurez<strong>z</strong> = _Feature)
__future__rY   rK   r   all_feature_namesr   r   )
rp   r9  future_textr^   future_htmlpydoc_mod_textpydoc_mod_htmlfeaturetxtre   s
             r%   test__future__imports"PydocDocTest.test__future__imports  s     	'
3'
3*95*95!33GI[)CgY&:;DMM#+MM$,S1T2 4r$   )r   )8r   r    r!   r"   r   rq   rE  skipIfhasattrrm   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r  r  rF  rG  r)  rA  rV  r^  rb  re  rh  ry  r~  r  r  r  r  r  r  r  r  r  r  r  r  r6  rA  r#   r   r$   r%   r   r     s   G3 __WS*-@#,,.HJ' J' __WS*-@#,,.HJ0 J019
Q
'
76 ' '
+:%>"64@68	6-Y __WS*-@#,,.HJ]]''  (J': __WS*-@#,,.HJ]]'&[ ( J&[R __WS*-@#,,.HJ"D J"DH8H ]]'' (' __WS*-@#,,.HJ]]'' ( J' ;CJ<+	8J8X - -
/E
4402 W2 W2rTl3r$   r   c                      \ rS rSrS rS rS rS r\R                  \
R                  " \S5      S 5       5       rS r\
R                  " S	5      S
 5       r\
R                  " S	5      S 5       r\
R                  " S5      S 5       rS rSrg)PydocImportTesti  c                     [         R                  " [        5      U l        U R	                  [
        [        5        [        R                  " 5         g ru   )rR   mkdirr   r  r  r   r  invalidate_cachesro   s    r%   setUpPydocImportTest.setUp  s,    ('##%r$   c                    SnSSSSR                  U5      S4SR                  U5      SR                  U5      44n[        R                  R                  [        U5      [        R
                  -   S-   nU Hr  u  pE[        US	5       nUR                  S
R                  U5      5        S S S 5        [        U[        S9R                  S5      n[        X4-  nU R                  X5        Mt     g ! , (       d  f       NK= f)Ntestmod_xyzzy)i_am_not_hererN  )test.i_am_not_here_eitherrO  )ztest.i_am_not_here.neither_am_ir   zi_am_not_here.{}rN  ztest.{}pyr  z
import {}
)
PYTHONPATHr   )r  rR   rS   r  r   extsepr  r  rB   r  badimport_patternr   )	rp   modname	testpairssourcefnimportstringexpectedinmsgfr   r   s	            r%   test_badimportPydocImportTest.test_badimport  s     ".FE&&w/Ag&	(8(8(AB	 77<<0299<tC+4'Lh$,,\:; %#G?FFwOF(G+CCHX. ,5$$s   !C,,
C:	c                 B   [         R                  R                  [        S5      n[         R                  " U5        [         R                  R                  US5      [         R
                  -   S-   n[        US5       nUR                  S5        S S S 5        U R                  [        /S9   [        5        n[        5        n[        R                  " S5        S S S 5        S S S 5        U R                  WR                  5       S5        U R                  WR                  5       S5        [        5        n[        5        n[        R                  " S5        S S S 5        S S S 5        U R                  UR                  5       R                  5       S5        U R                  UR                  5       S5        S S S 5        g ! , (       d  f       GN3= f! , (       d  f       N= f! , (       d  f       GN= f! , (       d  f       N= f! , (       d  f       N= f! , (       d  f       g = f)	N	syntaxerrr  rP  r  zinvalid python syntax = $1
rS   xyzzyr(   )rR   rS   r  r   rH  rR  r  r  r   r   r   r6   aproposr   r  r8   )rp   pkgdir	badsyntaxrY  r>   r?   s         r%   test_apropos_with_bad_package-PydocImportTest.test_apropos_with_bad_package  sd   fk2
GGLL4ryy@4G	)S!QGG23 "((vh(7 "c$&#MM'* ' # S\\^R0S\\^R0 "c$&#MM+. ' # S\\^113[AS\\^R0 87 "! '& #" '& #" 87sz   ;F9)H4G?GGAH0G?;G.G?AH9
G
GG
G+	&H.
G<8G??
H		H
Hc                    [         R                  R                  [        S5      U l        [         R
                  " U R                  S5        U R                  [         R                  U R                  5        U R                  [        /S9   [        5        n[        5        n[        R                  " S5        S S S 5        S S S 5        S S S 5        U R                  WR                  5       S5        U R                  WR                  5       S5        g ! , (       d  f       N_= f! , (       d  f       Nh= f! , (       d  f       Nq= f)N
unreadabler   r^  SOMEKEYr(   )rR   rS   r  r   unreadable_dirrH  r  rmdirr   r   r   r6   r`  r   r  )rp   r>   r?   s      r%    test_apropos_with_unreadable_dir0PydocImportTest.test_apropos_with_unreadable_dir  s     ggll6<@
$$a($"5"56 ((vh(7 "c$&#MM), ' # 8
 	,,	 '& #" 87s<   	D1D D6D >D1
DD  
D.	*D11
D?zcannot remove x bitc                 ~   [         R                  R                  [        S5      n[         R                  " U5        U R                  [        U5        [         R                  R                  US5      n[        US5       nUR                  S5        S S S 5        [        R                  " [         R                  " U5      R                  5      n [         R                  " X[        R                  ) -  5        U R                  [        /S9   [        5        n[         R"                  " S5        S S S 5        S S S 5        U R%                  SWR'                  5       5        [         R                  " X5        g ! , (       d  f       N= f! , (       d  f       N^= f! , (       d  f       Ng= f! [         R                  " X5        f = f)Nwalkpkgr  r  r  r^  r(   )rR   rS   r  r   rH  r  r   r  r  statS_IMODEst_modechmodS_IEXECr   r   r6   r`  r   r  )rp   ra  r  r  current_modestdouts         r%   test_apropos_empty_doc&PydocImportTest.test_apropos_empty_doc  s    fi0
'GGLL7	)S!TJJy! "||BGGFO$;$;<	+HHVT\\M9:,,6(,;_=NRXb! >O;MM)V__%67HHV* "!
 >O=N;; HHV*sH   =E1<F$ FF*F2(F$ 1
E?
F	F
F!F$ $F<c                    [         R                  R                  [        S5      n[         R                  " U5        [         R                  R                  US5      n[        USSS9 nUR                  S5        S S S 5        U R                  [        /S9   [        [        R                  5      n[        R                  R                  S[        5         U R                  [        S	5         SS KnS S S 5        U R                  S
S5      nSnU R                  Xv5        U[        R                  S S &  S S S 5        g ! , (       d  f       N= f! , (       d  f       Na= f! U[        R                  S S & f = f! , (       d  f       g = f)Ntest_error_packager  wtr   r  zraise ValueError("ouch")
r^  r   ouchzsearch?key=test_error_packagePydoc: Search Resultsz8<a href="test_error_package.html">test_error_package</a>)rR   rS   r  r   rH  r  r  r   tuplerm   insertassertRaisesRegex
ValueErrorrx  r   r   )rp   ra  initrY  saved_pathsrx  r\   founds           r%   test_url_search_package_error-PydocImportTest.test_url_search_package_error  s   f&:;
ww||FM2$w/1GG45 0((vh(7/KHHOOAv&
*++J?- @ ,,-L+--e*) 87 0/ @? * 87sH   &D8>E2E)E	.-EE28
E	
E	EE//E22
F z(causes undesirable side-effects (#20128)c                     SnSnSnX-   U-   n[        5       n[        R                  " US9nU" S5        UR                  5       R	                  5       n[        UR                  5       5      nU R                  X5        g )Nr!  r$  r"  r  rn   )r   r6   r  r  r8   lenr   assertGreaterEqual)	rp   num_header_linesnum_module_lines_minnum_footer_linesr   rI   r  r   	num_liness	            r%   test_modulesPydocImportTest.test_modules,  sw      #:=MMV,y"((*))+,		4r$   c                     Sn[        5       n[        R                  " US9n[        5        nU" S5        S S S 5        WR	                  5       nU R                  X5        g ! , (       d  f       N0= f)Nzpydoc - r  zmodules pydoc)r   r6   r  r   r  r   rp   r   rI   r  rx  r   s         r%   test_modules_search#PydocImportTest.test_modules_search<  sV     V,'?# !!#h'	 s   	A
A,z+some buildbots are not cooperating (#20128)c                     Sn[        5       n[        R                  " US9n[        5        nU" S5        S S S 5        WR	                  5       nU R                  UR                  U5      5        g ! , (       d  f       N?= f)Nzgc - r  zmodules garbage)r   r6   r  r   r  r  
startswithr  s         r%   test_modules_search_builtin+PydocImportTest.test_modules_search_builtinI  s`    V,'$% !!#))(34	 s   	A--
A;c                     [         R                  " [         R                  5      nU R                  U[         5        U R	                  UR
                  S5        U R	                  UR                  [         R                  5        U R	                  UR                  [         R                  5        [         [        R                  S'   g ! [         [        R                  S'   f = frj   )	r6   
importfiler7   assertIsNotr   r   r  rm   rn   )rp   loaded_pydocs     r%   test_importfilePydocImportTest.test_importfileU  s    	) ++ENN;L\51\22G<\22ENNC\22ENNC#(CKK 5CKK s   B*C C)r  rh  N)r   r    r!   r"   rJ  rZ  rc  rj  r	   skip_unless_working_chmodrE  rC  r   ru  r  skipr  r  r  r  r#   r   r$   r%   rF  rF    s    &
/*1*- ((__]$9:+ ; )+ *. ]]=>5 ?5 ]]=>
( ?
( ]]@A	5 B	5	)r$   rF  c                   $    \ rS rSr\S 5       rSrg)Rectia  c                 4    U R                   U R                  -  $ ru   )r  hro   s    r%   area	Rect.areab  s     vvr$   r   Nr   r    r!   r"   propertyr  r#   r   r$   r%   r  r  a  s     r$   r  c                   &    \ rS rSr\" S 5      rSrg)Squareih  c                      U R                   S-  $ )Nr!  )sidero   s    r%   rp  Square.<lambda>i  s    Ar$   r   Nr  r   r$   r%   r  r  h  s    -.Dr$   r  c                      \ rS rSrS rS rS rS rS rS r	S r
S	 r\S
 5       r\S 5       rS r\S 5       rS rS r\S 5       r\S 5       rS rS rS rS rS rS rS rS rS rS rS r S r!\"RF                  \S 5       5       r$\"RF                  \S 5       5       r%\"RF                  \S  5       5       r&\"RF                  \S! 5       5       r'\"RF                  \S" 5       5       r(\"RF                  \S# 5       5       r)S$ r*\S% 5       r+\S& 5       r,\S' 5       r-\S( 5       r.\S) 5       r/\S* 5       r0\S+ 5       r1\S, 5       r2\S- 5       r3\S. 5       r4\S/ 5       r5S0 r6S1 r7\S2 5       r8S3 r9S4r:g5)6TestDescriptionsil  c                 R    U R                  [        R                  S   [        5        g rj   rk   ro   s    r%   rq   TestDescriptions.tearDownm  r   r$   c                 \    [         R                  " [        5      nU R                  SU5        g )Nr   )r6   r   r   r   rp   rH   s     r%   test_moduleTestDescriptions.test_modulep  s     {+mS)r$   c                     " S S5      nU" 5       nU R                  [        R                  " U5      S5        U R                  [        R                  " U5      S5        S[        -  nU R	                  U[        R
                  " U5      5        g )Nc                       \ rS rSrSrg)&TestDescriptions.test_class.<locals>.Civ  r   Nr   r   r$   r%   Cr  v  s     r$   r  zclass CzC in module %s object)r   r6   describer   r   r   )rp   r  ro  r   s       r%   
test_classTestDescriptions.test_classu  sd    ""C*I6*C0*X5h 0 0 34r$   c                 b   U R                  [        R                  " [        R                  [
           5      S5        [        R                  " [        R                  [
           [        R                  S9nU R                  SU5        U R                  SU5        [        (       d?  U R                  [        R                  R                  5       R                  5       S   U5        U R                  [        R                  " [        [
           5      S5        [        R                  " [        [
           [        R                  S9nU R                  SU5        U R                  SU5        [        (       d@  U R                  [        R                  R                  5       R                  5       S   U5        g g )	N_GenericAliasr  z_GenericAlias in module typingzList = class list(object)r   GenericAliaszGenericAlias in module builtinsz
class list(object))r   r6   r  r4  ListrT  r   	plaintextr   r   rQ  r   r8   r   r  s     r%   test_generic_alias#TestDescriptions.test_generic_alias~  s   C(89?Kv{{3/%//J6<137##MM$,,,,.99;A>DS	2NCtCy5??C7=,c2##MM$,,,,.99;A>D $r$   c                    U R                  [        R                  " [        R                  [
        [        4   5      S5        [        R                  " [        R                  [
        [        4   [        R                  S9nU R                  SU5        U R                  SU5        [        R                  R                  (       aI  U R                  [        R                  R                  R                  5       R                  5       S   U5        U R                  [        R                  " [
        [        -  5      S5        [        R                  " [
        [        -  [        R                  S9nU R                  SU5        U R                  SU5        [        (       dJ  U R                  [        R                  R                  R                  5       R                  5       S   U5        g g )	N_UnionGenericAliasr  z#_UnionGenericAlias in module typingzUnion = typing.Unionr   	UnionTypez UnionType in module types objectz!
class UnionType(builtins.object))r   r6   r  r4  UnionrT  r   r   r  r   r   r8   r   r   typesr  r  s     r%   test_union_type TestDescriptions.test_union_type  s5   S#X(>?AUVv||CH5P;SA,c2<<MM&,,..446AACAFLc	2K@sSy5??C8#>:C@##MM%//11779DDFqI3O $r$   c                    U R                  [        R                  " [        R                  5      S5        [        R
                  " [        R                  [        R                  S9nU R                  SU5        [        R                  R                  (       a\  U R                  SU5        U R                  [        R                  R                  R                  5       R                  5       S   U5        g U R                  SU5        g )N_SpecialFormr  z_SpecialForm in module typingzNoReturn = typing.NoReturnr   z%NoReturn = class _SpecialForm(_Final))r   r6   r  r4  NoReturnr   r  r   r   r8   r   r  s     r%   test_special_form"TestDescriptions.test_special_form  s    8.IvI5s;??""MM6<MM&//11779DDFqI3OMMA3Gr$   c           	      D   S[         R                  [         R                     S[        S[         R                  [         R
                  [        [         R                  4      4S jn[         R                  " S5      n " S S[         R                  U   [         R                  [        [        4   5      nU R                  [        R                  " U5      R                  5       S   S	5        U R                  [        R                  " U5      R                  5       S
   S5        g )Ndataxrs  c                     g ru   r   )r  r  s     r%   foo/TestDescriptions.test_typing_pydoc.<locals>.foo  s    r$   Tc                       \ rS rSrSrg)-TestDescriptions.test_typing_pydoc.<locals>.Ci  r   Nr   r   r$   r%   r  r    s    cr$   r  z?ffoooo(data: List[Any], x: int) -> Iterator[Tuple[int, Any]]r!  z2class CC(collections.abc.Mapping, typing.Generic))r4  r  AnyrT  IteratorTupleTypeVarGenericMappingr   r   r6   r   r   )rp   r  r  r  s       r%   test_typing_pydoc"TestDescriptions.test_typing_pydoc  s    	fkk&**- 		!??6<<VZZ+HI	 NN3Aq!6>>#s(#;A))#.99;B?9	: 	))!,779!<P	Rr$   c                    S H?  nU R                  [        R                  " U5      5         [        R                  " U5        MA     S HM  nU R                  [        R                  " U5      5        U R                  [        [        R                  U5        MO     g ! [         a$    U R                  SR                  U5      5         M  f = f)N)r   zstr.translatezbuiltins.strzbuiltins.str.translatezfinding the doc of {!r} failed)notbuiltinsstrrrzstrr.translatezstr.trrrranslatezbuiltins.strrrzbuiltins.str.trrranslate)	assertIsNotNoner6   locater   ImportErrorfailr  r  assertRaises)rp   names     r%   test_builtinTestDescriptions.test_builtin  s    /D   d!34I  &/1D ell401k5+;+;TB	1  I		:AA$GHIs   B*CCc                     [         R                  " [         R                  " U 5      5      nUR                  S5      nUS   $ Nr3   r!  )r6   plainr   r  or\   liness      r%   _get_summary_line"TestDescriptions._get_summary_line  s2    {{5++A./

4 Qxr$   c                     [         R                  " [         R                  " U 5      5      nUR                  S5      nSR	                  USS  5      $ r  )r6   r  r   r  r  r  s      r%   _get_summary_lines#TestDescriptions._get_summary_lines  s>    {{5++A./

4 yyqr##r$   c                 v    U R                  U R                  [        R                  R                  5      S5        g )Nzwrap(self, text))r   r  r"  TextWrapperwrapro   s    r%   test_unbound_python_method+TestDescriptions.test_unbound_python_method  s,    //0D0D0I0IJ	 r$   c                 v    U R                  U R                  [        R                  R                  5      S5        g )Nz1dump(self, obj, /) unbound _pickle.Pickler method)r   r  _picklePicklerdumpro   s    r%   test_unbound_builtin_method,TestDescriptions.test_unbound_builtin_method  s+    //0D0DE?	Ar$   c                     [         R                  " 5       nU R                  U R                  UR                  5      S5        g )Nz2wrap(text) method of textwrap.TextWrapper instance)r"  r  r   r  r  )rp   ts     r%   test_bound_python_method)TestDescriptions.test_bound_python_method  s3      "//7@	Br$   c                    [        S/ SQ5      n[        R                  " U5      nU R                  UR	                  S5      UR	                  S5      5        U R                  UR	                  S5      UR	                  S5      5         " S S5      n " S S	5      n[        R                  " U5        [        R                  " U5        g )
Nr  )r  r  agegroupr  r  r  c                       \ rS rSrSrSrg)MTestDescriptions.test_field_order_for_named_tuples.<locals>.NonIterableFieldsi  Nr   r   r    r!   r"   _fieldsr#   r   r$   r%   NonIterableFieldsr    s    Gr$   r
  c                       \ rS rSr/ /rSrg)MTestDescriptions.test_field_order_for_named_tuples.<locals>.NonHashableFieldsi  r   Nr  r   r$   r%   NonHashableFieldsr    s	    dGr$   r  )r   r6   r   
assertLessindex)rp   r  r,   r
  r  s        r%   !test_field_order_for_named_tuples2TestDescriptions.test_field_order_for_named_tuples  s    H&KLV$
+QWW[-AB,aggj.AB	 		 	 	*+*+r$   c                     [        5       n[        R                  " U5      nU R                  U R	                  UR
                  5      S5        g )Nz/dump(obj, /) method of _pickle.Pickler instance)r   r  r  r   r  r  )rp   r,   ps      r%   test_bound_builtin_method*TestDescriptions.test_bound_builtin_method  s9    JOOA//7=	?r$   c                 b    U R                  U R                  [        R                  5      S5        g )Nz0stat(path, *, dir_fd=None, follow_symlinks=True))r   r  rR   rn  ro   s    r%   test_module_level_callable+TestDescriptions.test_module_level_callable  s%    //8>	@r$   c                 b    U R                  U R                  [        R                  5      S5        g )Nztime())r   r  timero   s    r%   !test_module_level_callable_noargs2TestDescriptions.test_module_level_callable_noargs  s$    //		:	r$   c                      SS K nU R                  U R	                  WR
                  5      S5        g ! [         a    U R                  S5         NIf = f)Nr   z_stat extension is missingzS_IMODE(object, /))_statr  skipTestr   r  ro  )rp   r  s     r%   test_module_level_callable_o-TestDescriptions.test_module_level_callable_o   sL    	8
 	//> 	"	  	8MM67	8s   2 AAc                 b    U R                  U R                  [        R                  5      S5        g )Nz*lower(self, /) unbound builtins.str method)r   r  r   lowerro   s    r%   "test_unbound_builtin_method_noargs3TestDescriptions.test_unbound_builtin_method_noargs
  s$    //		:8	:r$   c                 Z    U R                  U R                  SR                  5      S5        g )Nr(   z'lower() method of builtins.str instance)r   r  r#  ro   s    r%    test_bound_builtin_method_noargs1TestDescriptions.test_bound_builtin_method_noargs  s$    //95	7r$   c                 b    U R                  U R                  [        R                  5      S5        g )Nz0add(self, object, /) unbound builtins.set methodr   r  setaddro   s    r%   test_unbound_builtin_method_o.TestDescriptions.test_unbound_builtin_method_o  s%    //8>	@r$   c                 j    U R                  U R                  [        5       R                  5      S5        g )Nz.add(object, /) method of builtins.set instancer*  ro   s    r%   test_bound_builtin_method_o,TestDescriptions.test_bound_builtin_method_o  s&    //		:<	>r$   c                 b    U R                  U R                  [        R                  5      S5        g )Nz9__contains__(self, object, /) unbound builtins.set methodr   r  r+  __contains__ro   s    r%   %test_unbound_builtin_method_coexist_o6TestDescriptions.test_unbound_builtin_method_coexist_o  s'    //0@0@AG	Ir$   c                 j    U R                  U R                  [        5       R                  5      S5        g )Nz7__contains__(object, /) method of builtins.set instancer3  ro   s    r%   #test_bound_builtin_method_coexist_o4TestDescriptions.test_bound_builtin_method_coexist_o  s)    //0B0BCE	Gr$   c                 |    U R                  U R                  [        R                  R                  S   5      S5        g )Nutcnowz0utcnow(type, /) unbound datetime.datetime method)r   r  datetime__dict__ro   s    r%   'test_unbound_builtin_classmethod_noargs8TestDescriptions.test_unbound_builtin_classmethod_noargs"  s2    //0A0A0J0J80TU>	@r$   c                 v    U R                  U R                  [        R                  R                  5      S5        g )Nz*utcnow() class method of datetime.datetime)r   r  r<  r;  ro   s    r%   %test_bound_builtin_classmethod_noargs6TestDescriptions.test_bound_builtin_classmethod_noargs&  s,    //0A0A0H0HI8	:r$   c                 h    U R                  U R                  [        R                  S   5      S5        g )N__class_getitem__z?__class_getitem__(type, object, /) unbound builtins.dict method)r   r  r  r=  ro   s    r%   "test_unbound_builtin_classmethod_o3TestDescriptions.test_unbound_builtin_classmethod_o*  s+    //>Q0RSM	Or$   c                 b    U R                  U R                  [        R                  5      S5        g )Nz:__class_getitem__(object, /) class method of builtins.dict)r   r  r  rD  ro   s    r%    test_bound_builtin_classmethod_o1TestDescriptions.test_bound_builtin_classmethod_o.  s'    //0F0FGH	Jr$   c                     [         R                  " S5      nUR                  nU R                  U R	                  U5      S5        g )N	_testcapiz-func_with_unrepresentable_signature(a, b=<x>))r   import_module#func_with_unrepresentable_signaturer   r  )rp   rK  builtins      r%   2test_module_level_callable_unrepresentable_defaultCTestDescriptions.test_module_level_callable_unrepresentable_default2  s=     "//<	??//8;	=r$   c                     U R                  U R                  [        R                  5      S5        [        R
                  " S5      nUR                  nU R                  U R                  UR                  5      S5        g )Nz9maketrans(x, y=<unrepresentable>, z=<unrepresentable>, /)rK  zstaticmeth(a, b=<x>))r   r  r   	maketransr   rL  %DocStringUnrepresentableSignatureTest
staticmethrp   rK  clss      r%   1test_builtin_staticmethod_unrepresentable_defaultBTestDescriptions.test_builtin_staticmethod_unrepresentable_default:  sd     	//>G	I!//<	==//?"	$r$   c                     U R                  U R                  [        R                  5      S5        [        R
                  " S5      nUR                  nU R                  U R                  UR                  5      S5        g )NzIpop(self, key, default=<unrepresentable>, /) unbound builtins.dict methodrK  zVmeth(self, /, a, b=<x>) unbound _testcapi.DocStringUnrepresentableSignatureTest method)r   r  r  popr   rL  rS  methrU  s      r%   3test_unbound_builtin_method_unrepresentable_defaultDTestDescriptions.test_unbound_builtin_method_unrepresentable_defaultD  sk     	//9+	, "//<	==//9E	Fr$   c                     U R                  U R                  0 R                  5      S5        [        R                  " S5      nUR                  5       nU R                  U R                  UR                  5      S5        g )NzGpop(key, default=<unrepresentable>, /) method of builtins.dict instancerK  zQmeth(a, b=<x>) method of _testcapi.DocStringUnrepresentableSignatureTest instance)r   r  rZ  r   rL  rS  r[  )rp   rK  objs      r%   1test_bound_builtin_method_unrepresentable_defaultBTestDescriptions.test_bound_builtin_method_unrepresentable_defaultP  sn     	//7/	0 "//<	==?//9Q	Rr$   c                     [         R                  " S5      nUR                  nUR                  S   nU R	                  U R                  U5      S5        g )NrK  	classmethz[classmeth(type, /, a, b=<x>) unbound _testcapi.DocStringUnrepresentableSignatureTest method)r   rL  rS  r=  r   r  )rp   rK  rV  descrs       r%   8test_unbound_builtin_classmethod_unrepresentable_defaultITestDescriptions.test_unbound_builtin_classmethod_unrepresentable_default\  sO     "//<	==[)//6E	Fr$   c                     [         R                  " S5      nUR                  nU R                  U R	                  UR
                  5      S5        g )NrK  zSclassmeth(a, b=<x>) class method of _testcapi.DocStringUnrepresentableSignatureTest)r   rL  rS  r   r  rc  rU  s      r%   6test_bound_builtin_classmethod_unrepresentable_defaultGTestDescriptions.test_bound_builtin_classmethod_unrepresentable_defaultf  sC     "//<	==//>>	?r$   c                     " S S5      nS GH  u  p#nU R                  U5         X!R                  l        U R                  U R	                  UR                  5      SU-   5        U R                  U R	                  U" 5       R                  5      SU-   S-   5        X!R
                  R                  l        U R                  U R	                  UR
                  5      SU-   S-   5        X!R                  l        U R                  U R	                  UR                  5      SU-   5        S S S 5        GM!     g ! , (       d  f       GM4  = f)	Nc                   :    \ rS rSrS r\S 5       r\S 5       rSr	g):TestDescriptions.test_overridden_text_signature.<locals>.Cip  c                      g ru   r   r;   kwargss     r%   r[  ?TestDescriptions.test_overridden_text_signature.<locals>.C.methq  s    r$   c                      g ru   r   rn  s     r%   cmeth@TestDescriptions.test_overridden_text_signature.<locals>.C.cmeths      r$   c                      g ru   r   rn  s     r%   smeth@TestDescriptions.test_overridden_text_signature.<locals>.C.smethv  rt  r$   r   N)
r   r    r!   r"   r[  classmethodrr  staticmethodrv  r#   r   r$   r%   r  rl  p  s+      r$   r  ))z($slf)(slf, /)r  )z	($slf, /)rz  r  )z($slf, /, arg)(slf, /, arg)(arg))z($slf, /, arg=<x>)(slf, /, arg=<x>)	(arg=<x>))z($slf, arg, /)(slf, arg, /)(arg, /))z($slf, arg=<x>, /)(slf, arg=<x>, /)(arg=<x>, /))(/, slf, arg)r  r  )(/, slf, arg=<x>)r  r  )r{  r{  r|  )r}  r}  r~  )r  r  r  )r  r  r  r[  z0 method of test.test_pydoc.test_pydoc.C instancerr  z- class method of test.test_pydoc.test_pydoc.Crv  )rH  r[  __text_signature__r   r  rr  __func__rv  )rp   r  text_signatureunboundbounds        r%   test_overridden_text_signature/TestDescriptions.test_overridden_text_signatureo  s
   	 	/
*NU n-,:)  !7!7!?(*  !7!7!A)[[]6D  3  !7!7!@%*YY[-;*  !7!7!@')+ .-/
 .-s   C>D11
E	c                 >    " S S5      nU R                  U R                  UR                  S   5      S5        U R                  U R                  UR                  5      S5        U R	                  S[
        R                  " [
        R                  " U5      5      5        g )Nc                   $    \ rS rSr\S 5       rSrg)-TestDescriptions.test_staticmethod.<locals>.Xi  c                     g ru   r   r  ys     r%   sm0TestDescriptions.test_staticmethod.<locals>.X.sm       r$   r   N)r   r    r!   r"   ry  r  r#   r   r$   r%   Xr    s     r$   r  r  zsm(x, y)
    A static method
zJ
 |  Static methods defined here:
 |
 |  sm(x, y)
 |      A static method
)r   r  r=  r  r   r6   r  r   rp   r  s     r%   test_staticmethod"TestDescriptions.test_staticmethod  s    	 	
 	00D1AB1	2 	006 9 	 	 
 [[!!!$%	'r$   c                 >    " S S5      nU R                  U R                  UR                  S   5      S5        U R                  U R                  UR                  5      S5        U R	                  S[
        R                  " [
        R                  " U5      5      5        g )Nc                   $    \ rS rSr\S 5       rSrg),TestDescriptions.test_classmethod.<locals>.Xi  c                     g ru   r   )rV  r  s     r%   r  /TestDescriptions.test_classmethod.<locals>.X.cm  r  r$   r   N)r   r    r!   r"   rx  r  r#   r   r$   r%   r  r    s     r$   r  r  zcm(...)
    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   r  r=  r  r   r6   r  r   r  s     r%   test_classmethod!TestDescriptions.test_classmethod  s    	 	
 	00D1AB0	1 	006 9 	 	 
 [[!!!$%	'r$   c                 |   U R                  U R                  [        R                  5      S5        U R                  U R                  [        R
                  5      S5        U R                  U R                  [        R                  5      S5        U R                  U R                  [        R                  5      S5        g )NrU  realr;   r_  )
r   r  rT  rU  floatr  r   r;   
memoryviewr_  ro   s    r%   test_getset_descriptor'TestDescriptions.test_getset_descriptor  s     	//>L//

;VD//	?H//
?Gr$   c                    U R                  U R                  [        R                  5      S5        U R                  U R                  [        R
                  5      S5        U R                  U R                  [        R
                  5      S5        U R                  U R                  [        R                  5      S5        U R                  U R                  [        R                  5      S5        g )Nr  startfgetvalue)r   r  complexr  ranger  slicer  r  StopIterationr  ro   s    r%   test_member_descriptor'TestDescriptions.test_member_descriptor  s     	//=vF//<gF//<gF//>G//0C0CDgNr$   c                 n     " S S5      nU R                  U R                  UR                  5      S5        g )Nc                       \ rS rSrSrSrg)4TestDescriptions.test_slot_descriptor.<locals>.Pointi  r  r   N)r   r    r!   r"   	__slots__r#   r   r$   r%   Pointr    s     Ir$   r  r  )r   r  r  )rp   r  s     r%   test_slot_descriptor%TestDescriptions.test_slot_descriptor  s+    	! 	!//8#>r$   c                 t     " S S5      nU R                  U R                  UR                  S   5      S5        g )Nc                       \ rS rSrSrg)6TestDescriptions.test_dict_attr_descriptor.<locals>.NSi  r   Nr   r   r$   r%   NSr    r   r$   r  r=  )r   r  r=  )rp   r  s     r%   test_dict_attr_descriptor*TestDescriptions.test_dict_attr_descriptor  s3    	 	//J0GH#	%r$   c                    U R                  U R                  [        [        R                  5      R
                  5      S5        U R                  U R                  [        [        R                  5      R                  5      S5        U R                  U R                  [        [        R                  5      R                  5      S5        U R                  U R                  [        [        R                  5      R                  5      S5        g )Nwidthdebugmajormax)r   r  r  rm   	hash_infor  flagsr  version_infor  
float_infor  ro   s    r%    test_structseq_member_descriptor1TestDescriptions.test_structseq_member_descriptor  s    //S]]0C0I0IJ 	"//SYY0E0EF 	"//S5E5E0F0L0LM 	"//S^^0D0H0HI	 r$   c                 r    [        SS5      nU R                  U R                  UR                  5      S5        g )NBox)r  heightz    Alias for field number 0
)r   r   r  r  )rp   r  s     r%    test_namedtuple_field_descriptor1TestDescriptions.test_namedtuple_field_descriptor  s3     3400; > 	r$   c                 <   U R                  U R                  [        R                  5      S5        U R                  U R                  [        R                  5      S5        U R                  S[        R                  " [        R                  " [        5      5      5        g )Nzarea
    Area of the rect
z#
 |  area
 |      Area of the rect
)	r   r  r  r  r  r   r6   r  r   ro   s    r%   test_propertyTestDescriptions.test_property  sy    00; > 	
 	00= @ 	 	  [[!!$'(	*r$   c                   ^  " S S5      m " U4S jS5      nU R                  U R                  UR                  5      S[         S35        SUR                  l        U R                  U R                  UR                  5      S[         S35        S	UR                  l        U R                  U R                  UR                  5      S
5        g )Nc                       \ rS rSrS rSrg)?TestDescriptions.test_custom_non_data_descriptor.<locals>.Descri  c                     Uc  U $ gNr   r   rp   r_  rV  s      r%   __get__GTestDescriptions.test_custom_non_data_descriptor.<locals>.Descr.__get__      ;Kr$   r   N)r   r    r!   r"   r  r#   r   r$   r%   Descrr    s    r$   r  c                   &   > \ rS rSr Y " 5       rSrg);TestDescriptions.test_custom_non_data_descriptor.<locals>.Xi  r   Nr   r    r!   r"   attrr#   r  s   r%   r  r    
    7Dr$   r  rd   zH.TestDescriptions.test_custom_non_data_descriptor.<locals>.Descr object>Custom descriptorz_.TestDescriptions.test_custom_non_data_descriptor.<locals>.Descr object>
    Custom descriptor
r  zfoo(...)
    Custom descriptor
)r   r  r  r   r   rp   r  r  s     @r%   test_custom_non_data_descriptor0TestDescriptions.test_custom_non_data_descriptor   s    	 	
	 	 	008 ?
S;W 	X -008 ?
 ; 	
  008 ; 	r$   c                 z  ^  " S S5      m " U4S jS5      nU R                  U R                  UR                  5      S5        SUR                  l        U R                  U R                  UR                  5      S5        SUR                  l        U R                  U R                  UR                  5      S	5        g )
Nc                        \ rS rSrS rS rSrg);TestDescriptions.test_custom_data_descriptor.<locals>.Descri  c                     Uc  U $ gr  r   r  s      r%   r  CTestDescriptions.test_custom_data_descriptor.<locals>.Descr.__get__  r  r$   c                     SS-    g )Nr   r   r   r  s      r%   __set__CTestDescriptions.test_custom_data_descriptor.<locals>.Descr.__set__   s	    !r$   r   N)r   r    r!   r"   r  r  r#   r   r$   r%   r  r    s    r$   r  c                   &   > \ rS rSr Y " 5       rSrg)7TestDescriptions.test_custom_data_descriptor.<locals>.Xi"  r   Nr  r  s   r%   r  r  "  r  r$   r  r(   r  z    Custom descriptor
r  zfoo
    Custom descriptor
)r   r  r  r   r   r  s     @r%   test_custom_data_descriptor,TestDescriptions.test_custom_data_descriptor  s    	 		 	 	008"=,008 ; 	  008 ; 	r$   c                    S[         4S jn[        R                  " [        R                  R	                  U5      5      nU R                  SU5        [        R                  " 5       R	                  U5      nU R                  SU5        g )Nrs  c                    #    g7fr   r   )igns    r%   coro_function=TestDescriptions.test_async_annotation.<locals>.coro_function3  s     s   zasync coro_functionz4async <a name="-coro_function"><strong>coro_function)rT  r6   r  r  documentr   rD   )rp   r  r\   re   s       r%   test_async_annotation&TestDescriptions.test_async_annotation2  sd    	 	 {{5??33MBC+T2}}''6B	r$   c                     S n[         R                  " [         R                  R                  U5      5      nU R	                  SU5        [         R
                  " 5       R                  U5      nU R	                  SU5        g )Nc                    #    S7v   g 7fr   r   r   r$   r%   an_async_generatorLTestDescriptions.test_async_generator_annotation.<locals>.an_async_generator?  s
     Gs   	zasync an_async_generatorz>async <a name="-an_async_generator"><strong>an_async_generator)r6   r  r  r  r   rD   )rp   r  r\   re   s       r%   test_async_generator_annotation0TestDescriptions.test_async_generator_annotation>  s_    	 {{5??334FGH0$7}}''(:;L	r$   c                 v    S n[         R                  " 5       R                  U5      nU R                  SU5        g )Nc                      g ru   r   r   r$   r%   a_fn_with_https_linkHTestDescriptions.test_html_for_https_links.<locals>.a_fn_with_https_linkL  s    r$   z3<a href="https://localhost/">https://localhost/</a>)r6   rD   r  r   )rp   r   re   s      r%   test_html_for_https_links*TestDescriptions.test_html_for_https_linksJ  s2    	 }}''(<=A	
r$   c                 <    SSK Jn  [        R                  " U5        g )Nr   )module_none)test.test_pydocr  r6   r   )rp   r  s     r%   test_module_none!TestDescriptions.test_module_noneV  s    /%r$   r   N);r   r    r!   r"   rq   r  r  r  r  r  r  r  ry  r  r  r  r   r  r  r  r  r  r  r   r$  r'  r-  r0  r5  r8  r>  rA  rE  rH  r   cpython_onlyrO  rW  r\  r`  re  rh  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r#   r   r$   r%   r  r  l  s   3*
5EPH
RC"   $ $  A A
B,  ? ? @ @":7@>IG@:OJ =  = $  $ F  F R  R F  F ?  ?#+J ' '( ' '( H H O O ? ?
 % %       * *  0  0

 	
 	
&r$   r  c                   x    \ rS rSrS rS r\R                  4S jr\R                  4S jr	S r
S rS rS	 rS
rg)PydocFodderTesti\  c                 R    U R                  [        R                  S   [        5        g rj   rk   ro   s    r%   rq   PydocFodderTest.tearDown]  r   r$   c                     UR                  5       nSu  pVUb  UR                  U5      nUb  UR                  X55      nXEU $ )N)r   N)r   r  )rp   r\   	beginlineendliner  
beginindexendindexs          r%   
getsectionPydocFodderTest.getsection`  sI    !&
 Y/J{{77H))r$   c                 R   [         R                  " 5       nUR                  U5      n[        U5      nU[        R
                  L a  SOSnU R                  USU S3S5      nU R                  SU5        U R                  SU5        U R                  SU5        U R                  S	U5        U R                  S
U5        U R                  SU5        U R                  SU5        [        R                  (       dI  U R                  SU5        U R                  SU5        U R                  SU5        U R                  SU5        OHU R                  SU5        U R                  SU5        U R                  SU5        U R                  SU5        U R                  USU S3S5      nU R                  SU5        U[        R
                  L a  SOSnU R                  SU-   U5        U R                  SU5        [        R                  (       d7  U R                  SU5        U R                  SU5        U R                  SU5        O6U R                  SU5        U R                  SU5        U R                  S U5        U R                  US!U S3S5      nU R                  S"U5        U R                  S#U5        g )$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, |  count(self, value, /) from builtins.listz& |  list_count = count(self, value, /)z* |  __repr__(self, /) from builtins.objectz# |  object_repr = __repr__(self, /)z- |  count(self, object, /) from builtins.listz' |  list_count = count(self, object, /)z& |  __repr__(...) from builtins.objectz |  object_repr = __repr__(...)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 |  sin(x, /)z- |  get(...) method of builtins.dict instancez8 |  dict_get = get(...) method of builtins.dict instancez |  sin(object, /)z |  Class methods z |  B_classmethod(x)z* |  B_classmethod_alias = B_classmethod(x))
r6   rV   r   rO   r   r   r  r   r   r   rp   rV  rH   r   wherer  notes          r%   test_text_doc_routines_in_class/PydocFodderTest.test_text_doc_routines_in_classi  sB   mmoc"F#"%"6<N,ugQ(?Q;UC;UCSUZ[GONPUVA5Idfkl++MMH%PMMBEJMMFNMM?GMMI5QMMCUKMMBEJMM;UC*=eWA(FXnpuvKMM)r/_@4GOfhmn++MMZ\abMMeglmMM/51MMI5QMMTV[\MM.6*<UG1(EW,e4BEJr$   c                 N   [         R                  " 5       nUR                  U5      n[        U5      nU[        R
                  L a  SOSnU R                  USU S3S5      nU R                  SU5        U R                  SU5        U R                  SU5        U R                  S	U5        U R                  S
U5        U R                  SU5        U R                  SU5        [        R                  (       dI  U R                  SU5        U R                  SU5        U R                  SU5        U R                  SU5        OHU R                  SU5        U R                  SU5        U R                  SU5        U R                  SU5        U R                  USU S3S5      nU R                  SU5        U[        R
                  L a  SOSnU R                  SU-   U5        U R                  SU5        U R                  USU S3S5      nU R                  SU5        U R                  SU5        g )Nr  r  zMethods r  rb   zA_method_alias = A_method(self)zB_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(count(self, value, /) from builtins.listz"list_count = count(self, value, /)z&__repr__(self, /) from builtins.objectzobject_repr = __repr__(self, /)z)count(self, object, /) from builtins.listz#list_count = count(self, object, /)z"__repr__(...) from builtins.objectzobject_repr = __repr__(...)zStatic 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 instancezClass methods zB_classmethod(x)z&B_classmethod_alias = B_classmethod(x))
r6   rD   r   rf   r   r   r  r   r   r   r  s          r%   test_html_doc_routines_in_class/PydocFodderTest.test_html_doc_routines_in_class  s   mmoc"6""%"6<N(5'(;VD7?7?OQVWCUKJER=uE`bgh++MMDeLMM>FMMBEJMM;UCMMEuMMM?GMM>FMM7?/%(BFKjlqrKMM)r/_<tCUKbdij.q(A6J(%0>Fr$   c                 B    U R                  [        R                  5        g ru   )r  r   Dro   s    r%   )test_text_doc_inherited_routines_in_class9PydocFodderTest.test_text_doc_inherited_routines_in_class      ,,[]];r$   c                 B    U R                  [        R                  5        g ru   )r   r   r#  ro   s    r%   )test_html_doc_inherited_routines_in_class9PydocFodderTest.test_html_doc_inherited_routines_in_class  r&  r$   c                    [         R                  " 5       nUR                  [        5      n[	        U5      nU R                  USS5      nU R                  SU5        U R                  SU5        U R                  SU5        U R                  SU5        U R                  SU5        U R                  SU5        U R                  S	U5        U R                  S
U5        U R                  SU5        U R                  SU5        U R                  SU5        [        R                  (       d%  U R                  SU5        U R                  SU5        O$U R                  SU5        U R                  SU5        U R                  SU5        U R                  SU5        [        R                  (       dI  U R                  SU5        U R                  SU5        U R                  SU5        U R                  SU5        OHU R                  SU5        U R                  SU5        U R                  SU5        U R                  SU5        [        R                  (       d  U R                  SU5        g U R                  SU5        g )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-    get(...) method of builtins.dict instancez8    dict_get = get(...) method of builtins.dict instancez    B_method(self)z    B_method2 = B_method(self)z6    count(self, value, /) unbound builtins.list methodzC    list_count = count(self, value, /) unbound builtins.list methodz4    __repr__(self, /) unbound builtins.object methodzB    object_repr = __repr__(self, /) unbound builtins.object methodz7    count(self, object, /) unbound builtins.list methodzD    list_count = count(self, object, /) unbound builtins.list methodz0    __repr__(...) unbound builtins.object methodz>    object_repr = __repr__(...) unbound builtins.object methodz    sin(x, /)z    sin(object, /))	r6   rV   rE   r   rO   r  r   r   r   rp   rH   r   r  s       r%    test_text_doc_routines_in_module0PydocFodderTest.test_text_doc_routines_in_module  s   mmo{+F#V<A5I0%8GO>FOQVWOQVW;UCGOGOEuMXZ_`++MMZ\abMMeglmMMI5QMMTV[\ 	*E26>++MMRTYZMM_afgMMPRWXMM^`efMMSUZ[MM`bghMMLeTMMZ\ab ++MM/51MM.6r$   c                    [         R                  " 5       nUR                  [        5      n[	        U5      nU R                  USS 5      nU R                  SU5        U R                  SU5        U R                  SU5        U R                  SU5        U R                  SU5        U R                  SU5        U R                  SU5        U R                  S	U5        U R                  S
U5        U R                  SU5        U R                  SU5        [        R                  (       d%  U R                  SU5        U R                  SU5        O$U R                  SU5        U R                  SU5        U R                  SU5        U R                  SU5        [        R                  (       dI  U R                  SU5        U R                  SU5        U R                  SU5        U R                  SU5        OHU R                  SU5        U R                  SU5        U R                  SU5        U R                  SU5        [        R                  (       d  U R                  SU5        g U R                  SU5        g )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* get(...) method of builtins.dict instancez5 dict_get = get(...) method of builtins.dict instancez B_method(self)z B_method2 = B_method(self)z3 count(self, value, /) unbound builtins.list methodz@ list_count = count(self, value, /) unbound builtins.list methodz1 __repr__(self, /) unbound builtins.object methodz? object_repr = __repr__(self, /) unbound builtins.object methodz4 count(self, object, /) unbound builtins.list methodzA list_count = count(self, object, /) unbound builtins.list methodz- __repr__(...) unbound builtins.object methodz; object_repr = __repr__(...) unbound builtins.object methodz
 sin(x, /)z sin(object, /))	r6   rD   rE   r   rf   r  r   r   r   r-  s       r%    test_html_doc_routines_in_module0PydocFodderTest.test_html_doc_routines_in_module  s   mmo{+6"d;>F-u5DeL:EBLeTLeT8%@DeLDeLBEJUW\]++MMWY^_MMbdijMMFNMMQSXY'/3U;++MMOQVWMM\^cdMMMuUMM[]bcMMPRWXMM]_deMMI5QMMWY^_ ++MM,.MM+U3r$   r   N)r   r    r!   r"   rq   r  r   r   r  r   r$  r(  r.  r1  r#   r   r$   r%   r  r  \  sA    3* 3>-- (KT 3>--  GD<<,7\+4r$   r  z/Socket server not available on Emscripten/WASI.c                        \ rS rSrS rS rSrg)PydocServerTesti  c                 R    U R                  [        R                  S   [        5        g rj   rk   ro   s    r%   rq   PydocServerTest.tearDown  r   r$   c           	      8  ^ S n[         R                  " USSS9mU R                  TR                  S 5        U R	                  TR
                  5        U R                  U4S j5        U R                  STR                  5        U R                  [        5        U R                  S[        [        R                  R                  TR                  S5      5      R                  5       5        U R                  S[        [        R                  R                  TR                  S	5      5      R                  5       5        TR                  5         U R!                  TR
                  5        U R#                  TR$                  5        U R#                  TR                  5        g )
Nc                     SU < SU< S3nU$ )Nzthe URL sent was: (z, )r   )r   content_typer\   s      r%   my_url_handler3PydocServerTest.test_server.<locals>.my_url_handler#  s    36EDKr$   	localhostr   )hostnameportc                  J   > T R                   (       a  T R                  5       $ S $ ru   )servingstop)serverthreads   r%   rp  -PydocServerTest.test_server.<locals>.<lambda>/  s    <+?+?L%%'ITIr$   s$   the URL sent was: (/test, text/html)z/tests'   the URL sent was: (/test.css, text/css)z	/test.css)r6   _start_serverr   errorr  rA  r  r   r   r   r   r   r   urljoinreadrB  r  r  	docserver)rp   r;  rC  s     @r%   test_serverPydocServerTest.test_server   s<   	 ** 
 	++T2,,-I	 	k<#3#34
#3FLL(()9)97CDIIK	 	6FLL(()9)9;GHMMO	
 	--.,001,**+r$   r   N)r   r    r!   r"   rq   rJ  r#   r   r$   r%   r4  r4    s    3 ,r$   r4  c                        \ rS rSrS rS rSrg)PydocUrlHandlerTestiC  c                     [         R                  nU R                  [        USS5        U R                  [        USS5        g )Nr   r(   r   foobar)r6   r   r  	TypeError)rp   rY  s     r%   test_content_type_err)PydocUrlHandlerTest.test_content_type_errF  s5    )QR0)QX6r$   c                 N   / SQnU R                  [        R                  S   [        5         U R	                  5          U H  u  p#U R                  X#5        M     S S S 5        [        [        R                  S'   g ! , (       d  f       N&= f! [        [        R                  S'   f = f)N))r(   Pydoc: Index of Modules)zget?key=rT  )r  rT  )r5  zPydoc: Topics)r3  zPydoc: Keywords)r6   Pydoc: module pydoc)zget?key=pydocrU  )zsearch?key=pydocr{  )ztopic?key=defzPydoc: KEYWORD def)ztopic?key=STRINGSzPydoc: TOPIC STRINGS)rO  zPydoc: Error - foobarr6   )rl   rm   rn   r6   r   r   )rp   requestsr   r_   s       r%   test_url_requests%PydocUrlHandlerTest.test_url_requestsK  s|     	ckk'*E2	),,."*JC))#5 #+ /
 $)CKK  /.
 $)CKK s"   B A:B :
BB B$r   N)r   r    r!   r"   rQ  rW  r#   r   r$   r%   rM  rM  C  s    7
)r$   rM  c                       \ rS rSrS rSrg)
TestHelperig  c                     U R                  [        [        R                  R                  5      [        [
        R                  5      5        g ru   )r   sortedr6   r  r3  keywordkwlistro   s    r%   test_keywordsTestHelper.test_keywordsh  s-     5 56/	1r$   r   N)r   r    r!   r"   r_  r#   r   r$   r%   rZ  rZ  g  s    1r$   rZ  c                      \ rS rSrS r\R                  " \" \S5      =(       a    \R                  " 5       S5      \
S 5       5       r\R                  " \" \S5      =(       a    \R                  " 5       S5      \
S 5       5       r\R                  " \" \S5      =(       a    \R                  " 5       S5      \
S 5       5       r\R                  " \" \S5      =(       a    \R                  " 5       S5      \
S 5       5       rS	 rS
rg)PydocWithMetaClassesim  c                 R    U R                  [        R                  S   [        5        g rj   rk   ro   s    r%   rq   PydocWithMetaClasses.tearDownn  r   r$   r   r   c                 2    " S S[         5      n " S SUS9n[        S [         5       5      n[        5       n[        R
                  " US9nU" U5        [        [        4US S -   -  nUR                  5       R                  5       nU R                  Xg5        g )	Nc                   (   ^  \ rS rSrU 4S jrSrU =r$ )=PydocWithMetaClasses.test_DynamicClassAttribute.<locals>.Metaiu  c                 0   > US:X  a  g[         TU ]  U5      $ )Nhamspamsuper__getattr__rp   r  r  s     r%   rm  IPydocWithMetaClasses.test_DynamicClassAttribute.<locals>.Meta.__getattr__v  s    5=!w*400r$   r   )r   r    r!   r"   rm  r#   __classcell__r  s   @r%   Metarg  u  s    1 1r$   rr  c                   8    \ rS rSr\R
                  S 5       rSrg);PydocWithMetaClasses.test_DynamicClassAttribute.<locals>.DAiz  c                     g)Neggsr   ro   s    r%   ri  ?PydocWithMetaClasses.test_DynamicClassAttribute.<locals>.DA.ham{  s    r$   r   N)r   r    r!   r"   r  DynamicClassAttributeri  r#   r   r$   r%   DArt  z  s    (( )r$   ry  	metaclassc              3   >   #    U  H  nU(       a  S U-   OSv   M     g7f)z	
 |      r(   Nr   r*   s     r%   r-   BPydocWithMetaClasses.test_DynamicClassAttribute.<locals>.<genexpr>~  s&      .I/G! CDlQ.>.K/Gr.   r  r!  )r  r|  expected_data_docstringsr   r6   r  !expected_dynamicattribute_patternr   r  r8   r   )rp   rr  ry  r   rI   r  r   r   s           r%   test_DynamicClassAttribute/PydocWithMetaClasses.test_DynamicClassAttributeq  s    	14 	1
	4 	 ). .I/G.I )I%V,r
9;BQ??A"((*/r$   c                      " S S[         5      n " S SUS9n[        5       n[        R                  " US9nU" U5        [        [
        -  nUR                  5       R                  5       nU R                  XV5        g )Nc                   .   ^  \ rS rSrS rU 4S jrSrU =r$ )HPydocWithMetaClasses.test_virtualClassAttributeWithOneMeta.<locals>.Metai  c                 
    / SQ$ )N)r  r    r   LIFEr   rV  s    r%   __dir__PPydocWithMetaClasses.test_virtualClassAttributeWithOneMeta.<locals>.Meta.__dir__  s    FFr$   c                 0   > US:X  a  g[         TU ]  U5      $ )Nr  r   )rl  _Meta__getattrrn  s     r%   rm  TPydocWithMetaClasses.test_virtualClassAttributeWithOneMeta.<locals>.Meta.__getattr__  s    &=w(..r$   r   r   r    r!   r"   r  rm  r#   rp  rq  s   @r%   rr  r    s    G/ /r$   rr  c                       \ rS rSrSrg)IPydocWithMetaClasses.test_virtualClassAttributeWithOneMeta.<locals>.Classi  r   Nr   r   r$   r%   Classr    r   r$   r  rz  r  )	r  r   r6   r  "expected_virtualattribute_pattern1r   r  r8   r   )rp   rr  r  rI   r  r   r   s          r%   %test_virtualClassAttributeWithOneMeta:PydocWithMetaClasses.test_virtualClassAttributeWithOneMeta  sc    	/4 	/	d 	V,u:XE"((*/r$   c                   ^
^  " S S[         5      m
 " S S[         5      m " U
U4S jST
T5      n " S ST
S	9n " S
 SX!S	9n[        5       n[        R                  " US9nU" U5        [        [
        -  nUR                  5       R                  5       nU R                  Xg5        [        5       n[        R                  " US9nU" U5        [        [
        -  nUR                  5       R                  5       n	U R                  X5        g )Nc                   .   ^  \ rS rSrS rU 4S jrSrU =r$ )IPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Meta1i  c                 
    / SQ$ )N)r  r    r   r   r   r  s    r%   r  QPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Meta1.__dir__      EEr$   c                 0   > US:X  a  g[         TU ]  U5      $ )Nr   r   rk  rn  s     r%   rm  UPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Meta1.__getattr__      %<w*400r$   r   r  rq  s   @r%   Meta1r        F1 1r$   r  c                   .   ^  \ rS rSrS rU 4S jrSrU =r$ )IPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Meta2i  c                 
    / SQ$ )N)r  r    r   twor   r  s    r%   r  QPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Meta2.__dir__  r  r$   c                 0   > US:X  a  g[         TU ]  U5      $ )Nr  r!  rk  rn  s     r%   rm  UPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Meta2.__getattr__  r  r$   r   r  rq  s   @r%   Meta2r    r  r$   r  c                   8   >^  \ rS rSrUU4S jrU 4S jrSrU =r$ )IPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Meta3i  c           
         > [        [        [        / SQTR                  U 5      -   TR                  U 5      -   5      5      5      $ )N)r  r    r   three)rQ  r\  r+  r  )rV  r  r  s    r%   r  QPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Meta3.__dir__  sC    F3DMM#&').s);<$= > ? ?r$   c                 0   > US:X  a  g[         TU ]  U5      $ )Nr  r"  rk  rn  s     r%   rm  UPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Meta3.__getattr__  s    '>w*400r$   r   r  )r  r  r  s   @r%   Meta3r    s    ?1 1r$   r  c                       \ rS rSrSrg)JPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Class1i  r   Nr   r   r$   r%   Class1r    r   r$   r  rz  c                       \ rS rSrSrg)JPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Class2i  r   Nr   r   r$   r%   Class2r    r   r$   r  r  )
r  r   r6   r  "expected_virtualattribute_pattern2r   r  r8   r   "expected_virtualattribute_pattern3)rp   r  r  r  rI   r  expected_text1result1expected_text2result2r  r  s             @@r%   %test_virtualClassAttributeWithTwoMeta:PydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta  s    	1D 	1	1D 	1	1 	1E5 	1	u 		V 	V,v;hF//#))+1V,v;hF//#))+1r$   c                      " S S[         5      n " S SUS9n[        5       n[        R                  " US9nU" U5        [        [
        -  nUR                  5       R                  5       nU R                  XV5        g )Nc                       \ rS rSrS rSrg).PydocWithMetaClasses.test_buggy_dir.<locals>.Mi  c                 
    / SQ$ )N)r  r   missingherer   r  s    r%   r  6PydocWithMetaClasses.test_buggy_dir.<locals>.M.__dir__  s    CCr$   r   N)r   r    r!   r"   r  r#   r   r$   r%   Mr    s    Dr$   r  c                       \ rS rSrSrSrg).PydocWithMetaClasses.test_buggy_dir.<locals>.Ci  zpresent!r   N)r   r    r!   r"   r  r#   r   r$   r%   r  r    s    Dr$   r  rz  r  )	r  r   r6   r  !expected_missingattribute_patternr   r  r8   r   )rp   r  r  rI   r  r   r   s          r%   test_buggy_dir#PydocWithMetaClasses.test_buggy_dir  se    	D 	D	! 	V,q	9HD"((*/r$   c                     [        5        n[        R                  " S5        S S S 5        WR                  5       nU R	                  SU5        g ! , (       d  f       N1= f)Nz	enum.Enumz
class Enum)r   r6   r  r  r   )rp   rx  r]  s      r%   test_resolve_false'PydocWithMetaClasses.test_resolve_false  sB     'JJ{# ##%lH- s   A
Ar   N)r   r    r!   r"   rq   rE  rC  rD  rm   r   r   r  r  r  r  r  r#   r   r$   r%   rb  rb  m  s   3 __WS*-@#,,.HJ0 J0( __WS*-@#,,.HJ0 J0" __WS*-@#,,.HJ'2 J'2R __WS*-@#,,.HJ0 J0.r$   rb  c                   B    \ rS rSrS rSS jrS rS rS rS r	S	 r
S
rg)TestInternalUtilitiesi  c                 L   [         R                  " 5       nUR                  U l        [        R
                  R                  UR                  S5      U l        U R                  UR                  5        [        R                  " 5       =U l        nS[        R                  U/U l        g )Nnonexistentr(   )r  TemporaryDirectoryr  argv0dirrR   rS   r  argv0r  cleanupgetcwd
abs_curdircurdircurdir_spellings)rp   tmpdirr  s      r%   rJ  TestInternalUtilities.setUp  sj    ,,.WW\\&++}=
'')yy{2*!#RYY
 ;r$   Nc                 L    Uc  U R                   n[        R                  " X5      $ ru   )r  r6   _get_revised_path)rp   
given_pathr  s      r%   r  'TestInternalUtilities._get_revised_path  s#     =JJE&&z99r$   c                     [         R                  R                  5       nU R                   H5  n[	        UR                  U5      5       H  nUR                  U5        M     M7     U$ ru   )rm   rS   copyr  r  countr  )rp   
clean_pathspelling__s       r%   _get_starting_path(TestInternalUtilities._get_starting_path  sQ    XX]]_
--HJ,,X67!!(+ 8 . r$   c                     U R                  5       nU R                  /U-   nU R                  U R                  U5      U5        g ru   )r  r  r   r  )rp   r  expected_paths      r%   ,test_sys_path_adjustment_adds_missing_curdirBTestInternalUtilities.test_sys_path_adjustment_adds_missing_curdir  s<    ,,.
)J6//
;]Kr$   c                    U R                  5       nU R                  /U-   nU R                  /U-   nU R                  U R	                  U5      U5        XR                  /-   nU R                  U R	                  U5      U5        g ru   )r  r  r  r   r  )rp   r  r  leading_argv0dirtrailing_argv0dirs        r%   *test_sys_path_adjustment_removes_argv0_dir@TestInternalUtilities.test_sys_path_adjustment_removes_argv0_dir  sy    ,,.
)J6 MM?Z7//0@A=Q&--8//0ABMRr$   c                   ^  U 4S jnT R                  5       nT R                  /U-   nT R                  /U-   nT R                  U" U5      U5        UT R                  /-   nT R                  /U-   nT R                  U" U5      U5        g )Nc                 @   > TR                  U [        R                  S9$ )N)r  )r  r6   r7   )r  rp   s    r%   r  \TestInternalUtilities.test_sys_path_adjustment_protects_pydoc_dir.<locals>._get_revised_path	  s    ))*ENN)KKr$   )r  r  r  r   )rp   r  r  r  r  r  s   `     r%   +test_sys_path_adjustment_protects_pydoc_dirATestInternalUtilities.test_sys_path_adjustment_protects_pydoc_dir	  s    	L,,.
 MM?Z7),<<*+;<mL&$--8),==*+<=}Mr$   c                    U R                  5       nU R                   H  nU R                  US9   U/U-   nU R                  U R	                  U5      5        X/-   nU R                  U R	                  U5      5        U R
                  /U-   nU R                  U R	                  U5      5        X@R
                  /-   nU R                  U R	                  U5      5        S S S 5        M     g ! , (       d  f       M  = f)N)curdir_spelling)r  r  rH  r  r  r  )rp   r  r  leading_curdirtrailing_curdirr  r  s          r%   5test_sys_path_adjustment_when_curdir_already_includedKTestInternalUtilities.test_sys_path_adjustment_when_curdir_already_included	  s    ,,.
--Hh7"*j!8!!$"8"8"HI",z"9!!$"8"8"IJ$(MM?^#C !!$"8"89I"JK$3}}o$E!!!$"8"89J"KL 87 .77s   B+C''
C6	)r  r  r  r  ru   )r   r    r!   r"   rJ  r  r  r  r  r  r  r#   r   r$   r%   r  r    s)    <:L
S	NMr$   r  c                      [         R                  " 5       n [        R                  " [         R                  /U Q76   [        R                  " [
        5        g ru   )r   threading_setuprE  addModuleCleanupthreading_cleanupr   )thread_infos    r%   setUpModuler   !	  s8    "224K.@@O;Om,r$   __main__)dr<  rR   rm   r   importlib.utilr  r   r  r6   r  r]  r  r   rM   rn  r  test.supporttestr  r  r4  rE  unittest.mockurllib.parser   	xml.etreer   xml.etree.ElementTreer"  r   collectionsr   urllib.requestr   r   r   r   r	   test.support.script_helperr
   r   r   r   r   r   r   r   r   r   r   test.support.os_helperr   r   r   r  r   r   r   HAVE_DOCSTRINGSr~  r8   r   r|  r   r   expected_html_data_docstringsr2   r  r   rS  r  r  r  r  r  r@   rB   rK   rO   rW   rY   r`   rf   TestCaserh   r   rF  r  r  r  r  rC  r4  rM  rZ  rb  r  r   r   mainr   r$   r%   <module>r     s    	 
    	      	              " .  & "M M )E E E < ; % '	 	 << 
  0\x 
EGy | !& &I/G&I !I M ^ !& &I/G&I !I , -4GD"**,E  N %  
EG! "$& 
EG #& 
EG #&, 
EG- #0% 
EG ""		 H%%  F^38$$ ^3B[)m [)| /T /m&x(( m&`x4h'' x4v 
W5%,h'' %,	%,P!)- !)H1"" 1q.8,, q.h=MH-- =M@- zMMO r$   