python (3.12.0)

(root)/
lib/
python3.12/
test/
__pycache__/
test_pydoc.cpython-312.opt-2.pyc

ΑeddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlZddlZddlZddlZddlZddlZddlZddlmZddlmZddlmZmZddlm Z ddlm!Z!ddl"m#Z#m$Z$m%Z%ddlm&Z&dd	lm'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-dd
l.m/Z/m0Z0m1Z1ddlm2Z2Gdd
Z3ejhjjrdZ6ndZ6djoZ8e9de6DZ:dZ;e9de6DZ<dj{dej|Z?dZ@djoZAdjoZBdjoZCdjoZDdjoZEdZFdZGdZHdZId ZJd!ZKd"ZLGd#d$ejZNGd%d&ejZOGd'd(eNZPGd)d*ejZQeje+xse,d+Gd,d-ejZSGd.d/eNZTGd0d1ejZUGd2d3ejZVGd4d5ejZWd6ZXeYd7k(rejyy)8N)StringIO)
namedtuple)urlopen
urlcleanup)
import_helper)	os_helper)assert_python_okassert_python_failurespawn_python)threading_helper)
reap_childrencaptured_outputcaptured_stdoutcaptured_stderr
is_emscriptenis_wasirequires_docstrings)TESTFNrmtreeunlink)	pydoc_modceZdZ	y)nonasciiN__name__
__module____qualname__C/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/test/test_pydoc.pyrr%s rr).dictionary for instance variables (if defined)2list of weak references to the object (if defined)r!r")r#r#r#a
NAME
    test.pydoc_mod - This is a test module for test_pydoc
%s
CLASSES
    builtins.object
        A
        B
        C

    class A(builtins.object)
     |  Hello and goodbye
     |
     |  Methods defined here:
     |
     |  __init__()
     |      Wow, I have no function!
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |
     |  __dict__%s
     |
     |  __weakref__%s

    class B(builtins.object)
     |  Data descriptors defined here:
     |
     |  __dict__%s
     |
     |  __weakref__%s
     |
     |  ----------------------------------------------------------------------
     |  Data and other attributes defined here:
     |
     |  NO_MEANING = 'eggs'
     |
     |  __annotations__ = {'NO_MEANING': <class 'str'>}

    class C(builtins.object)
     |  Methods defined here:
     |
     |  get_answer(self)
     |      Return say_no()
     |
     |  is_it_true(self)
     |      Return self.get_answer()
     |
     |  say_no(self)
     |
     |  ----------------------------------------------------------------------
     |  Class methods defined here:
     |
     |  __class_getitem__(item) from builtins.type
     |
     |  ----------------------------------------------------------------------
     |  Data descriptors defined here:
     |
     |  __dict__
     |      dictionary for instance variables (if defined)
     |
     |  __weakref__
     |      list of weak references to the object (if defined)

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

    nodoc_func()

DATA
    __xyz__ = 'X, Y and Z'
    c_alias = test.pydoc_mod.C[int]
    list_alias1 = typing.List[int]
    list_alias2 = list[int]
    type_union1 = typing.Union[int, str]
    type_union2 = int | str

VERSION
    1.2.3.4

AUTHOR
    Benjamin Peterson

CREDITS
    Nobody

FILE
    %s
c#.K|]
}|rd|zndyw)z
     |      r#Nr.0ss  r 	<genexpr>r(s(&I*+?@&6&:R&G&Ia
test.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 (if defined)
        __weakref__
            list of weak references to the object (if defined)

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

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

Data
    __xyz__ = 'X, Y and Z'
    c_alias = test.pydoc_mod.C[int]
    list_alias1 = typing.List[int]
    list_alias2 = list[int]
    type_union1 = typing.Union[int, str]
    type_union2 = int | str

Author
    Benjamin Peterson

Credits
    Nobody
c#@K|]}|jddyw) &nbsp;N)replacer%s  r r(r(s%&I*+'(iiX&>&Isz~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!'
ct	||fz}tdtjg|i|\}}}|jSNz-B)r	pydoc__file__stripmodule_nameargsenvrcouterrs      r 	run_pydocr;/sA;. D#D%..G4G3GLBS99;rct	||fz}tdtjg|i|\}}}|jSr0)r
r1r2r3r4s      r run_pydoc_failr=9sA;. D(u~~LLLLBS99;rc	tj}|j|}|jtxsd}|rd|zdz}|j|fS)Nr#z
<br><a href="z">Module Docs</a>)r1HTMLDoc	docmodule	getdoclocrr3)moduledocoutputlocs    r get_pydoc_htmlrFAsU,
--/C
]]6
"F

--	
"
(bC
$';;<<>3rc	tjj}tjj}|||t}tj}|j||}|S)N)basedir)ospathabspathdirnamer2r1TextDocrA)rBrKrLrHrCrEs      r get_pydoc_linkrNJsU2ggooGggooGggh/01G
--/C

---
0CJrc	tj}|jtxsd}|rd|zdz}|j	|}tjd}|jd|}|j|fS)Nr#z
MODULE DOCS
    r..)	r1rMrArr@recompilesubr3)rBrCrErDpatts     r get_pydoc_textrUSst,
--/C

--	
"
(bC
#c)D0
]]6
"F::eD
XXb&
!F<<>3rc|jd\}}}|jd\}}}|jd\}}}|S)Nz</head>z<title>z</title>)	partition)textheader_titles    r get_html_titler\asE>>),LFAq""9-KAq%//*-KE1aLrc		|jdd}tjdd|}tj|ddddd	d
}|S)Nz<dd>r.z<.*?>r#r,r+z&gt;>z&lt;<)r-rQrSr1)htmls r 	html2textraisJ<<%D
66'2t$D==xfc63GDKrc@eZdZddZej
ddZdZy)
PydocBaseTestNcj	|xs$tjjtgdfd	}|S)Nc |xs||SNr)rJprefixonerrordefault_path
walk_packagess   r wrapperz8PydocBaseTest._restricted_walk_packages.<locals>.wrapper|s !5vwGGr)Nr#N)rIrJrLr2)selfrjrJrkris `  @r _restricted_walk_packagesz'PydocBaseTest._restricted_walk_packagesvs/	: 9:	Hrc#Ktj}|j||t_	d|t_y#|t_wxYwwrf)pkgutilrjrm)rlrJrjs   r restrict_walk_packagesz$PydocBaseTest.restrict_walk_packagessB--
 $ > >}?C!E	2$1G!MG!s,A?A
AAcntj|d}t|}|j||||S)Nz	text/html)r1_url_handlerr\assertEqual)rlurlexpected_titlerXresults     r call_url_handlerzPydocBaseTest.call_url_handlers5!!#{3%6rrf)rrrrm
contextlibcontextmanagerrprwrrr rcrcts&22rrcc eZdZdZej
eedxrejde	dZ
ej
eedxrejde	dZdZdZ
dZd	Zd
ZdZe	dZd
ZdZdZdZdZdZdZdZdZej
eedxrejde	dZdZdZdZe	dZ dZ!dZ"dZ#dZ$dZ%e	d Z&d!Z'y)"PydocDocTestNgettrace1trace function introduces __locals__ unexpectedlycDtt\}}t|}|jDcgc]}|j	}}|Dcgc]}|s|	}}|d=t
j}|Dcgc]}|s|j	}}|j
||tjt}tjj|}|j|||j|||j||ycc}wcc}wcc}wN)
rFrra
splitlinesr3html2text_of_expectedrsinspect
getabsfileurllibparsequoteassertIn)	rlrvdoc_loctext_resultline
text_linesexpected_linesmod_filemod_urls	         r 
test_html_doczPydocDocTest.test_html_docs)3'/:/E/E/GHtdjjlH
H'1:tTd:
:qM.99;3AJ4T$**,JJ^4%%i0,,$$X.

gv&

h'

gv&I:KsD
DD6D>Dctt\}}t|ftzt	j
tfzz}|j
||yrf)rUrexpected_text_patternexpected_text_data_docstringsrrrs)rlrvr
expected_texts    r 
test_text_doczPydocDocTest.test_text_docsQ)3- 
56 ++I689:
	
/rcddl}Gdd|j}tj|}|j	d|y)NrceZdZdZdZy)IPydocDocTest.test_text_enum_member_with_value_zero.<locals>.BinaryIntegerrrN)rrrzeroonerrr 
BinaryIntegerrsDCrrzBinaryInteger.zero)enumIntEnumr1
render_docr)rlrrrCs    r %test_text_enum_member_with_value_zeroz2PydocDocTest.test_text_enum_member_with_value_zeros8		DLL	}-

*C0rcnttjj}|j	d|y)Nzxml.etree.elementtree)rNxmletreeElementTreer)rldoc_links  r ,test_mixed_case_module_names_are_lower_casedz9PydocDocTest.test_mixed_case_module_names_are_lower_caseds%!#))"7"78

-x8rcbttj\}}|j|ddy)Nr#z'MODULE DOCS incorrectly includes a link)rUrrrs)rlrvrs   r test_issue8225zPydocDocTest.test_issue8225s'(3"&OPrctj}	dt_tj|t_y#|t_wxYwrf)sysstdinr1getpager)rlprevious_stdins  r test_getpager_with_stdin_nonez*PydocDocTest.test_getpager_with_stdin_nones0	'CINN&CICIs	=
A
cGdd}Gdd}tj|}tj|}|j|jdd|y)NceZdZdZy))PydocDocTest.test_non_str_name.<locals>.A*Nrrrr ArsHrrceZdZy))PydocDocTest.test_non_str_name.<locals>.BNrrrr Brrr)r1rrsr-)rlrradocbdocs     r test_non_str_namezPydocDocTest.test_non_str_namesU				$$c3/6rcjd}tt|d}t|z}|j||dy)Ntest.i_am_not_hereasciiz&documentation for missing module found)strr=missing_patternrsrlmissing_modulervexpecteds    r 
test_not_herezPydocDocTest.test_not_heres7-^N3W="^364	6rctdd}tjjdd}|j	||y)Nztest.test_pydoc.nonasciir)PYTHONIOENCODINGbackslashreplace)r;r__doc__encoder)rlrvencodeds   r test_not_asciizPydocDocTest.test_not_asciis65P""))'3EF

gv&rcd}tt|d}t|jz}|j	||y)Nz test.i_am_not_here r)rr=rr3rsrs    r test_input_stripzPydocDocTest.test_input_strips;/^N3W="^%9%9%;;6*rctj}|j|dd|j|dd|j|dd|j|ddy)Nz<function stripid at 0x88dcee4>z<function stripid>z <function stripid at 0x01F65390>42z<type 'exceptions.Exception'>)r1stripidrs)rlrs  r test_stripidzPydocDocTest.test_stripidsl--!BC-	/!CD-	/	
-!@A8	:rc	tj}|jt}d}|j	||y)Nz |  Built-in subclasses:
 |      async_generator
 |      BaseException
 |      builtin_function_or_method
 |      bytearray
 |      ... and \d+ other subclasses)r1rMdocclassobjectassertRegexrlrCrXsnips    r )test_builtin_with_more_than_four_childrenz6PydocDocTest.test_builtin_with_more_than_four_childrens;	(mmo||F#8	
t$rc	tj}|jt}d}|j	||y)Nzc |  Built-in subclasses:
 |      FloatingPointError
 |      OverflowError
 |      ZeroDivisionError)r1rMrArithmeticErrorrrs    r test_builtin_with_childz$PydocDocTest.test_builtin_with_childs9	$mmo||O,,	


dD!rc	tj}|jt}d}|j	|||jd|y)Nz^ |  Built-in subclasses:
 |      ArithmeticError
 |      AssertionError
 |      AttributeErrorZeroDivisionError)r1rMr	ExceptionrassertNotInrs    r test_builtin_with_grandchildz)PydocDocTest.test_builtin_with_grandchild4sJ	*mmo||I&)	


dD!,d3rc|	tj}|jt}|j	d|yNzBuilt-in subclasses)r1rMrrrrlrCrXs   r test_builtin_no_childz"PydocDocTest.test_builtin_no_childTs4	,mmo||-..5rc|	tj}|jt}|j	d|yr)r1rMrtyperrs   r test_builtin_on_metaclassesz(PydocDocTest.test_builtin_on_metaclassesps3	
mmo||D!.5rc.tdzj}td5}|jd\}}|j	jdd}|djd|d<|j
||dddy#1swYyxYw)Nabdz-chelp()sabdiirzhelp> )rrrcommunicatedecoderemoveprefixrs)rlelinesprocr9rZoliness      r test_fail_help_clizPydocDocTest.test_fail_help_cli{s!E)557
-
(	-D%%f-FCZZ\,,.r"5Fq	..x8F1IVV,		-	-	-sABBc:t5}tj|}|jdtdz}|j||j
jjdtjdddy#1swYyxYw)NrDrr.)rr1Helperhelprrsgetvaluer3r-rIlinesep)rlbufhelperrs    r test_fail_help_output_redirectz+PydocDocTest.test_fail_help_output_redirectsv
Z	Y3\\-FKK&.HXs||~';';'='E'EdBJJ'WX		Y	Y	YsA=BBctj}d}d|_t}tj|}tt\}}d}dj}tj|}|tz}	|t_	td5}
td5}|j||jj}|	|ftzt!j"tfzz}
|j%d|
j|j%d|j|j%|
|dddddd|t_y#1swYxYw#1swY!xYw#|t_wxYw)NcdS)Nc|Srfr)xs r <lambda>zJPydocDocTest.test_help_output_redirect.<locals>.<lambda>.<locals>.<lambda>s!rrrrr rz8PydocDocTest.test_help_output_redirect.<locals>.<lambda>srrztest.pydoc_modz9
        Help on module test.pydoc_mod in test:

        stdoutstderrr#)r1rmaxDiffrrrUrlstriptextwrapdedentrrrrr3rrrrs)rlgetpager_oldgetpager_newrrunusedrrBhelp_headerexpected_help_patternrDr:rvrs              r test_help_output_redirectz&PydocDocTest.test_help_output_redirects\~~,jS)(3!
FH	ook2 +.C C%
	* *

8f *

8.1F#--/ 5!(
 =!>!(!3!3I!> @!A!B
  V__%67  S\\^4  7

8

8*EN

8

8

8

8*ENs=	E>E2 B*E&
E2E>&E/	+E22E;7E>>
Fc8tdddg}t5}tj|dddj	}|jd||jd||jd||jd|y#1swYbxYw)NPersonnickname	firstnamezAlias for field number 0zAlias for field number 1rrr1rrr)rlr
help_iohelptexts    r test_namedtuple_fieldsz#PydocDocTest.test_namedtuple_fieldssHz;&?@

	'JJv	##%

j(+

k8,

0(;

0(;
		sBBctdddgd}t5}tj|dddj	}|jd||jd||jd|y#1swYPxYw)	NNTabcdefT)rename_1_replace_asdictr
)rlrrrs    r !test_namedtuple_public_underscorez.PydocDocTest.test_namedtuple_public_underscorest
uenT
:

	'JJrN	##%

dH%

j(+

i*		sBB	cb|jttdD]}ttd|5}|dk7rt	dj||t	d|t	d|dddt
jti}|j|d	y#1swY8xYw)
N)z
ISO-8859-1UTF-8wencodingrz#coding: {})fileu"""line 1: héz
line 2: hi"""uline 1: hé)	
addCleanuprropenprintformatr1synopsisrs)rlrscriptr$s    r 
test_synopsiszPydocDocTest.test_synopsiss'/	8HfcH5
4w&-..x8vF(v6oF3	
4
~~fb1HX7	8
4
4s<B%%B.	ctjd}|jjd}|jj
}t
j|}|j||y)NrIr)	rimport_fresh_modulerr__spec__cachedr1r$rs)rlrIrfilenamer$s     r test_synopsis_sourcelessz%PydocDocTest.test_synopsis_sourcelesssV

.
.t
4::((*1-;;%%>>(+8,rctj5}tjj	|d}t
jj|}t|d5}|jddddtj|tj|i}|j|tj|i}|j|dddy#1swYuxYw#1swYyxYw)Nzfoomod42.pyrfoo = 1)rtemp_cwdrIrJjoin	importlibutilcache_from_sourcer!write
py_compilerRr1r$assertIsNone)rltest_dir	init_pathcached_pathfobjr$synopsis_cacheds       r "test_synopsis_sourceless_empty_docz/PydocDocTest.test_synopsis_sourceless_empty_docs



!		/XX}=I#..::9EKi%
&

9%
&y)~~i4Hh'#nn["=Oo.		/		/
&
&		/		/s%AC3!C'3A+C3'C0	,C33C<cRd}|jtj|dy)Nz#I Am A Doc


Here is my description)z
I Am A Docz
Here is my description)rsr1splitdoc)rlexample_strings  r test_splitdoc_with_descriptionz+PydocDocTest.test_splitdoc_with_descriptions$A7C	Erctj5}|jtj|dddy#1swYyxYwrf)rr/assertFalser1	ispackage)rlr7s  r  test_is_package_when_not_packagez-PydocDocTest.test_is_package_when_not_packages<



!	8XU__X67	8	8	8s%AAc<tj5}tjj	|d}t|dj
|jtj|tj|dddy#1swYyxYw)N__init__.pyr)rr/rIrJr0r!close
assertTruer1rCremove)rlr7r8s   r test_is_package_when_is_packagez,PydocDocTest.test_is_package_when_is_packagesm



!	!XX}=IC &&(OOEOOH56IIi 		!	!	!sA4BBcGddt}ttt}|j|d<|d=|d=|j|d<|j
|d<t
j|}|j||y)NceZdZdZy)/PydocDocTest.test_allmethods.<locals>.TestClasscy)NTrrls r method_returning_truezEPydocDocTest.test_allmethods.<locals>.TestClass.method_returning_truesrN)rrrrPrrr 	TestClassrMs
rrQrPr	__class____subclasshook____init_subclass__)	rdictvarsrPrSrTr1
allmethodsassertDictEqual)rlrQrmethodss    r test_allmethodszPydocDocTest.test_allmethodss		
V%,5,K,K()Y[!(1'A'A#$(1(C(C$%""9-Wh/rcGddGfdd}tj|}tjdd|}|j	|dt
ztj|tj}d	t
d
}t|}|jdDcgc]}|s|j}}|D]}|j||ycc}w)NceZdZddZeZdZy)+PydocDocTest.test_method_aliases.<locals>.ANcyrfr)rl	aboveThiss  r tkraisez3PydocDocTest.test_method_aliases.<locals>.A.tkraises>rcyrfrrOs r a_sizez2PydocDocTest.test_method_aliases.<locals>.A.a_sizes!rrf)rrrr`liftrbrrr rr]
s
?D
"rrc4eZdZddZeZWj
Zy)+PydocDocTest.test_method_aliases.<locals>.BNcyrfr)rltagOrIdcnfkws    r 
itemconfigurez9PydocDocTest.test_method_aliases.<locals>.B.itemconfigures=rrf)rrrrj
itemconfigrbb_size)rsr rres
>&JXXFrrrPr#aPython Library Documentation: class B in module %s

class B(A)
 |  Method resolution order:
 |      B
 |      A
 |      builtins.object
 |
 |  Methods defined here:
 |
 |  b_size = a_size(self)
 |
 |  itemconfig = itemconfigure(self, tagOrId, cnf=None, **kw)
 |
 |  itemconfigure(self, tagOrId, cnf=None, **kw)
 |      Configure resources of an item TAGORID.
 |
 |  ----------------------------------------------------------------------
 |  Methods inherited from A:
 |
 |  a_size(self)
 |      Return size
 |
 |  lift = tkraise(self, aboveThis=None)
 |
 |  tkraise(self, aboveThis=None)
 |      Raise this widget in the stacking order.
 |
 |  ----------------------------------------------------------------------
 |  Data descriptors inherited from A:
 |
 |  __dict__
 |      dictionary for instance variables (if defined)
 |
 |  __weakref__
 |      list of weak references to the object (if defined)
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 (if defined)
        __weakref__
            list of weak references to the object (if defined)
r.)r1rrQrSrsrr?rasplitr3r)	rlrrCras_textrr
expected_liners	        @r test_method_aliasesz PydocDocTest.test_method_aliasess	"	"		q!ffUB$%JK%%	Nq5==?;*
:C.3@3F3Ft3LU4PT$**,UU+	2MMM-1	2Vs/C%7C%cTddl}t|\}}t|\}}tt\}}tt\}}|jD]U}|d}d|d}	|j|||j|	||j
|||j
|	|Wy)Nrz = _Featurez<strong>z</strong> = _Feature)
__future__rUrFrall_feature_namesrr)
rlrtfuture_textrZfuture_htmlpydoc_mod_textpydoc_mod_htmlfeaturetxtr`s
          r test__future__importsz"PydocDocTest.test__future__importsfs	'
3Q'
3Q*95*95!33	3GI[)CgY&:;DMM#{+MM$,S.1T>2
	3r)(rrrrunittestskipIfhasattrrr|rrrrrrrrrrrrrrrrrrrrrrr&r,r<r@rDrJrZrrr|rrr r{r{sGX__WS*-@,#,,.HJ
'J
'X__WS*-@,#,,.HJ0J019
Q
'
76''
+:%>"64@68	6-YX__WS*-@,#,,.HJ *J *D<+	8--
/E
8!02X2X2t3rr{ceZdZdZdZdZdZeje	jeddZdZ
e	jdd	Ze	jdd
Ze	jddZd
Zy)PydocImportTestctjt|_|j	t
tt
jyrf)rImkdirrr7r rr1invalidate_cachesrOs r setUpzPydocImportTest.setUpzs,(
'##%rcd}ddddj|dfdj|dj|ff}tjjt|tj
zdz}|D]w\}}t
|d	5}|jd
j|dddt|tjd}t||fz}|j||yy#1swYIxYw)
N
testmod_xyzzy)
i_am_not_herer)test.i_am_not_here_eitherr)ztest.i_am_not_here.neither_am_irzi_am_not_here.{}rztest.{}pyrz
import {}
)
PYTHONPATHr)r#rIrJr0rextsepr!r4r=rbadimport_patternrs)	rlmodname	testpairssourcefnimportstring
expectedinmsgfrvrs	         r test_badimportzPydocImportTest.test_badimports".FE

&
&w
/A


g
&	(8(8(AB	77<<0299<tC+4	/'L-h$
<
,,\:;
<#G?FFwOF(G]+CCHXv.	/
<
<s!C00C9	ctjjtd}tj|tjj|dtj
zdz}t
|d5}|jdddd|jtg5t5}t5}tjddddddd|jjd|jjdt5}t5}tjddddddd|j|jjd|j|jddddy#1swY/xYw#1swYxYw#1swYxYw#1swYxYw#1swYxYw#1swYyxYw)	N	syntaxerr__init__rrzinvalid python syntax = $1
rJxyzzyr#)rIrJr0rrrr!r4rprrr1aproposrsrr3)rlpkgdir	badsyntaxrr9r:s      r test_apropos_with_bad_packagez-PydocImportTest.test_apropos_with_bad_packagesfk2
GGLL4ryy@4G	
)S
!	4Q
GG23	4

(
(vh
(
7	1 "
+c$&+#MM'*+
+
S\\^R0S\\^R0 "
/c$&/#MM+./
/
S\\^113[AS\\^R0	1	1	4	4++
+
+//
/
/	1	1sz:F9+G66GGGAG61G*<GG*AG69GGGG	G6G'#G**G3	/G66G?chtjjtd|_tj
|jd|j
tj|j|jtg5t5}t5}tjdddddddddd|jjd|jjdy#1swYZxYw#1swY^xYw#1swYbxYw)N
unreadablerrSOMEKEYr#)rIrJr0runreadable_dirrr rmdirrprrr1rrsr)rlr9r:s   r  test_apropos_with_unreadable_dirz0PydocImportTest.test_apropos_with_unreadable_dirs ggll6<@
$$a($"5"56
(
(vh
(
7	- "
-c$&-#MM),-
-	-
	
,,	--
-
-	-	-s<D(D!D7D?D(DDD%	!D((D1zcannot remove x bitc^tjjtd}tj||jt|tjj|d}t|d5}|jddddtjtj|j}	tj||tjz|jtg5t5}t!j"ddddddd|j%dj'tj||y#1swYxYw#1swYTxYw#1swYXxYw#tj||wxYw)NwalkpkgrFrr.rr#)rIrJr0rrr rr!r4statS_IMODEst_modechmodS_IEXECrprr1rrr)rlrr8r:current_moders      r test_apropos_empty_docz&PydocImportTest.test_apropos_empty_docs2fi0
'GGLL7	
)S
!	"TJJy!	"||BGGFO$;$;<	+HHV\T\\M9:,,6(,;
"_=N
"RX

b!
"
"MM)V__%67HHV\*	"	"

"
"
"
"
HHV\*sH<E0	?FFE<)F1(F0E9<F	FF
FF,ctjjtd}tj|tjj|d}t|dd5}|j
dddd|jtg5ttj}tjjdt	|jtd	5ddl
}ddd|jd
d}d}|j|||tjdd	dddy#1swYxYw#1swYXxYw#|tjddwxYw#1swYyxYw)
Ntest_error_packagerFwtrrzraise ValueError("ouch")
rrouchzsearch?key=test_error_packagePydoc: Search Resultsz8<a href="test_error_package.html">test_error_package</a>)rIrJr0rrr!r4rptuplerinsertassertRaisesRegex
ValueErrorrrwr)rlrinitrsaved_pathsrrXfounds        r test_url_search_package_errorz-PydocImportTest.test_url_search_package_errors*f&:;
ww||FM2
$w
/	61
GG45	6

(
(vh
(
7	*/KHHOOAv&

*++J?.-.,,-L+--

eT*)	*	*	6	6..*	*	*sH(D>>E.E.E
3.E!E.>E
E	EE++E..E7z(causes undesirable side-effects (#20128)cd}d}d}||z|z}t}tj|}|d|jj	}t|j
}|j||y)Nrmodules)rr1rrr3lenrassertGreaterEqual)	rlnum_header_linesnum_module_lines_minnum_footer_linesrrDrrv	num_liness	         r test_moduleszPydocImportTest.test_moduless| #&::=MMV,y"((*))+,		84rcd}t}tj|}t5}|ddddj	}|j||y#1swY,xYw)Nzpydoc - rz
modules pydoc)rr1rrrrrlrrDrrrvs      r test_modules_searchz#PydocImportTest.test_modules_searchs_V,

	$'?#	$!!#

h'		$	$s	A!!A*z+some buildbots are not cooperating (#20128)cd}t}tj|}t5}|ddddj	}|j|j
|y#1swY:xYw)Nzgc - rzmodules garbage)rr1rrrrH
startswithrs      r test_modules_search_builtinz+PydocImportTest.test_modules_search_builtinsgV,

	&'$%	&!!#))(34		&	&s	A//A8cVtjtj}|j|t|j	|j
d|j	|jtj|j	|jtjy)Nr1)r1
importfiler2assertIsNotrsrr))rlloaded_pydocs  r test_importfilezPydocImportTest.test_importfile
sp''7u-..8..?..?rN)rrrrrrrrskip_unless_working_chmodr}r~rrrskiprrrrrrr rrxs&
/*1*
-((X__]$9:+;)+ *.X]]=>
5?
5X]]=>
(?
(X]]@A	5B	5@rrcdeZdZdZdZdZdZdZdZdZ	e
dZe
d	Zd
Z
edZdZd
ZedZedZedZedZedZedZedZedZedZedZedZedZedZdZdZ edZ!y)TestDescriptionsc^ddlm}tj|}|j	d|y)Nr)pydocfodderr)testrr1rr)rlrrCs   r test_modulezTestDescriptions.test_modules#${+

mS)rcGdd}|}|jtj|d|jtj|ddtz}|j	|tj
|y)NceZdZy)&TestDescriptions.test_class.<locals>.CNrrrr Crrrzclass CzC in module %s object)rsr1describerrr)rlrcrs    r 
test_classzTestDescriptions.test_classsd""
C*I6*C0*X5

h 0 0 34rc8|jtjtjt
dtjtjt
tj}|jd||jd||jtjjjd||jtjtt
dtjtt
tj}|jd||jd||jtjjjd|y)	N
_GenericAliasrmz_GenericAlias in module typingzList = class list(object)rGenericAliaszGenericAlias in module builtinsz
class list(object))
rsr1rtypingListintr	plaintextrlistrr3rrlrCs  r test_generic_aliasz#TestDescriptions.test_generic_alias$sC(89?Kv{{3/%//J

6<

137

dll((*557:C@S	2NCtCy5??C

7=

,c2

dll((*557:C@rc|jtjtjt
tfdtjtjt
tftj}|jd||jd|tjjrI|jtjjjjd||jtjt
tzdtjt
tztj}|jd||jd||jtjjjjd|y)	N_UnionGenericAliasrmz#_UnionGenericAlias in module typingzUnion = typing.Unionr	UnionTypez UnionType in module types objectz!
class UnionType(builtins.object))rsr1rrUnionrrrrrrr3rtypesrrs  r test_union_typez TestDescriptions.test_union_type1s*S#X(>?AUVv||CH5P

;SA

,c2<<MM&,,..446AACAFLc	2K@sSy5??C

8#>

:C@

eoo--335@@B1EsKrc|jtjtjdtj
tjtj}|jd|tjjr\|jd||jtjjjjd|y|jd|y)N_SpecialFormrmz_SpecialForm in module typingzNoReturn = typing.NoReturnrz%NoReturn = class _SpecialForm(_Final))rsr1rrNoReturnrrrrr3rrs  r test_special_formz"TestDescriptions.test_special_form?s8.IvI

5s;??""MM6<MM&//11779DDFqI3OMMA3Grc	<dtjtjdtdtjtj
ttjffd}tjd}Gddtj|tjttf}|jtj|jdd	|jtj|jd
dy)Ndatarreturncyrfr)rrs  r fooz/TestDescriptions.test_typing_pydoc.<locals>.fooJsrTceZdZy)-TestDescriptions.test_typing_pydoc.<locals>.CNrrrr rrNrrrz?ffoooo(data: List[Any], x: int) -> Iterator[Tuple[int, Any]]rz2class CC(collections.abc.Mapping, typing.Generic))rrAnyrIteratorTupleTypeVarGenericMappingrrsr1rr)rlrrrs    r test_typing_pydocz"TestDescriptions.test_typing_pydocIs	fkk&**-		!??6<<VZZ+HI	
NN3Aq!6>>#s(#;A))#.99;B?9	:	
))!,779!<P	RrcdD]<}|jtj|	tj|>dD]K}|jtj||jttj|My#t$r#|jdj
|YwxYw)N)rz
str.translatezbuiltins.strzbuiltins.str.translatezfinding the doc of {!r} failed)notbuiltinsstrrrzstrr.translatezstr.trrrranslatezbuiltins.strrrzbuiltins.str.trrranslate)	assertIsNotNoner1locaterImportErrorfailr#r6assertRaises)rlnames  r test_builtinzTestDescriptions.test_builtinUs/	ID
  d!34
I  &
	I1	CD
ell401k5+;+;TB		C
I		:AA$GH
IsB)B?>B?c~tjtj|}|jd}|dSNr.r)r1plainrroorXliness   r _get_summary_linez"TestDescriptions._get_summary_linefs2{{5++A./

4 Qxrctjtj|}|jd}dj	|ddSr)r1rrror0rs   r _get_summary_linesz#TestDescriptions._get_summary_linesms>{{5++A./

4 yyqr##rcv|j|jtjjdy)Nzwrap(self, text))rsrrTextWrapperwraprOs r test_unbound_python_methodz+TestDescriptions.test_unbound_python_methodts,//0D0D0I0IJ	 rcv|j|jtjjdy)Nzdump(self, obj, /))rsr_picklePicklerdumprOs r test_unbound_builtin_methodz,TestDescriptions.test_unbound_builtin_methodxs*//0D0DE 	"rctj}|j|j|jdy)Nz2wrap(text) method of textwrap.TextWrapper instance)rrrsrr)rlts  r test_bound_python_methodz)TestDescriptions.test_bound_python_method~s3  "//7@	Brctdgd}tj|}|j|j	d|j	d|j|j	d|j	dGdd}Gdd	}tj|tj|y)
Nr
)rragegrouprrr%ceZdZdZy)MTestDescriptions.test_field_order_for_named_tuples.<locals>.NonIterableFieldsNrrr_fieldsrrr NonIterableFieldsr'sGrr*ceZdZggZy)MTestDescriptions.test_field_order_for_named_tuples.<locals>.NonHashableFieldsNr(rrr NonHashableFieldsr,s	dGrr-)rr1r
assertLessindex)rlr
r'r*r-s     r !test_field_order_for_named_tuplesz2TestDescriptions.test_field_order_for_named_tuplessH&KLV$
+QWW[-AB,aggj.AB					*+
*+rct}tj|}|j|j	|j
dy)Nz/dump(obj, /) method of _pickle.Pickler instance)rrrrsrr)rlr'ps   r test_bound_builtin_methodz*TestDescriptions.test_bound_builtin_methods9JOOA//7=	?rcb|j|jtjdy)Nz0stat(path, *, dir_fd=None, follow_symlinks=True))rsrrIrrOs r test_module_level_callablez+TestDescriptions.test_module_level_callables%//8>	@rc:Gdd}|j|j|jdd|j|j|jd|j	dtjtj|y)NceZdZedZy)-TestDescriptions.test_staticmethod.<locals>.Xc	yrfrrys  r smz0TestDescriptions.test_staticmethod.<locals>.X.sms%rN)rrrstaticmethodr<rrr Xr8s


rr>r<zsm(x, y)
    A static method
zJ
 |  Static methods defined here:
 |
 |  sm(x, y)
 |      A static method
)rsr__dict__r<rr1rrrlr>s  r test_staticmethodz"TestDescriptions.test_staticmethods		
	
00D1AB1	2	
0069		



[[!!!$%	'rc:Gdd}|j|j|jdd|j|j|jd|j	dtjtj|y)NceZdZedZy),TestDescriptions.test_classmethod.<locals>.Xc	yrfr)clsrs  r cmz/TestDescriptions.test_classmethod.<locals>.X.cms$rN)rrrclassmethodrGrrr r>rDs


rr>rGzcm(...)
    A class method
z:cm(x) method of builtins.type instance
    A class method
zX
 |  Class methods defined here:
 |
 |  cm(x) from builtins.type
 |      A class method
)rsrr?rGrr1rrr@s  r test_classmethodz!TestDescriptions.test_classmethods		
	
00D1AB0	1	
0069		



[[!!!$%	'rc||j|jtjd|j|jtj
d|j|jtjd|j|jtjdy)N	numeratorrealr6obj)
rsrrrKfloatrLrr6
memoryviewrMrOs r test_getset_descriptorz'TestDescriptions.test_getset_descriptors	
//

>L//

;VD//	?H//
?Grc|j|jtjd|j|jtj
d|j|jtj
d|j|jtjd|j|jtjdy)NrLstartfgetvalue)rsrcomplexrLrangerRslicepropertyrS
StopIterationrTrOs r test_member_descriptorz'TestDescriptions.test_member_descriptors	
//=vF//<gF//<gF//

>G//
0C0CDgNrcnGdd}|j|j|jdy)NceZdZdZy)4TestDescriptions.test_slot_descriptor.<locals>.Pointr:N)rrr	__slots__rrr Pointr]s Irr_r)rsrr)rlr_s  r test_slot_descriptorz%TestDescriptions.test_slot_descriptors+	!	!//8#>rctGdd}|j|j|jddy)NceZdZy)6TestDescriptions.test_dict_attr_descriptor.<locals>.NSNrrrr NSrcrrrdr?)rsrr?)rlrds  r test_dict_attr_descriptorz*TestDescriptions.test_dict_attr_descriptors3		//J0GH#	%rc|j|jttjj
d|j|jttjjd|j|jttjjd|j|jttjjdy)Nwidthdebugmajormax)rsrrr	hash_inforgflagsrhversion_infori
float_inforjrOs r  test_structseq_member_descriptorz1TestDescriptions.test_structseq_member_descriptors//S]]0C0I0IJ 	"//SYY0E0EF 	"//S5E5E0F0L0LM 	"//S^^0D0H0HI	 rcrtdd}|j|j|jdy)NBox)rgheightz    Alias for field number 0
)rrsrrg)rlrqs  r  test_namedtuple_field_descriptorz1TestDescriptions.test_namedtuple_field_descriptors3 3400;>	rcGdd}|j|j|jd|jdt	j
t	j|y)NceZdZedZy),TestDescriptions.test_property.<locals>.Rectc6	|j|jzSrf)rhrOs r areaz1TestDescriptions.test_property.<locals>.Rect.areas&vv&rN)rrrrXryrrr Rectrvs

'
'rrzz    Area of the rect
z#
 |  area
 |      Area of the rect
)rsrryrr1rr)rlrzs  r 
test_propertyzTestDescriptions.test_propertys^	'	'	
00;>		


[[!!$'(	*rcGddGfdd}|j|j|jdtdd|j_|j|j|jdtdd	|j_|j|j|jd
y)NceZdZdZy)?TestDescriptions.test_custom_non_data_descriptor.<locals>.Descrc||SyNrrrlrMrFs   r __get__zGTestDescriptions.test_custom_non_data_descriptor.<locals>.Descr.__get__;KrN)rrrrrrr Descrr~
s
rrceZdZWZy);TestDescriptions.test_custom_non_data_descriptor.<locals>.XNrrrattrrsr r>r
7Drr>r_zH.TestDescriptions.test_custom_non_data_descriptor.<locals>.Descr object>Custom descriptorz_.TestDescriptions.test_custom_non_data_descriptor.<locals>.Descr object>
    Custom descriptor
rzfoo(...)
    Custom descriptor
)rsrrrrrlr>rs  @r test_custom_non_data_descriptorz0TestDescriptions.test_custom_non_data_descriptors		
			
008?
S;W	X-008?
;	
 008;	rcxGddGfdd}|j|j|jdd|j_|j|j|jdd|j_|j|j|jd	y)
NceZdZdZdZy);TestDescriptions.test_custom_data_descriptor.<locals>.Descrc||Syrrrs   r rzCTestDescriptions.test_custom_data_descriptor.<locals>.Descr.__get__'rrcddzy)Nrrrrs   r __set__zCTestDescriptions.test_custom_data_descriptor.<locals>.Descr.__set__+s	!rN)rrrrrrrr rr&s

rrceZdZWZy)7TestDescriptions.test_custom_data_descriptor.<locals>.XNrrsr r>r-rrr>r#rz    Custom descriptor
rzfoo
    Custom descriptor
)rsrrrrrs  @r test_custom_data_descriptorz,TestDescriptions.test_custom_data_descriptor$s					
008"=,008;	 008;	rc
dtfd}tjtjj	|}|jd|tjj	|}|jd|y)NrcKywrr)igns r 
coro_functionz=TestDescriptions.test_async_annotation.<locals>.coro_function>s	szasync coro_functionz4async <a name="-coro_function"><strong>coro_function)rr1rrdocumentrr?)rlrrXr`s    r test_async_annotationz&TestDescriptions.test_async_annotation=sd		{{5??33MBC

+T2}}''
6

B	rcd}tjtjj|}|j	d|tj
j|}|j	d|y)NcKdywrrrrr an_async_generatorzLTestDescriptions.test_async_generator_annotation.<locals>.an_async_generatorJsGs	zasync an_async_generatorz>async <a name="-an_async_generator"><strong>an_async_generator)r1rrrrr?)rlrrXr`s    r test_async_generator_annotationz0TestDescriptions.test_async_generator_annotationIs_	{{5??334FGH

0$7}}''(:;

L	rctd}tjj|}|jd|y)Nc	yrfrrrr a_fn_with_https_linkzHTestDescriptions.test_html_for_https_links.<locals>.a_fn_with_https_linkWs+rz3<a href="https://localhost/">https://localhost/</a>)r1r?rr)rlrr`s   r test_html_for_https_linksz*TestDescriptions.test_html_for_https_linksUs2	}}''(<=

A	
rN)"rrrrrrrrrrr=rrrrr r#r0r3r5rArIrPrZr`rerorsr{rrrrrrrr rrs*5ALH
RC"$$ ""
B, ??@@''(''(HHOO??
%%  
*
*00

	
	
rrz/Socket server not available on Emscripten/WASI.ceZdZ	dZy)PydocServerTestc	:d}tj|dd|jjd|j	j
|j
fd|jdj|j
t|jdttjjjdj|jdttjjjd	jj|j!j
|j#j$|j#jy)
Ncd|d|d}|S)Nzthe URL sent was: (z, )r)rtcontent_typerXs   r my_url_handlerz3PydocServerTest.test_server.<locals>.my_url_handlerls36EDKr	localhostr)hostnameportc@jrjSdSrf)servingstop)serverthreadsr rz-PydocServerTest.test_server.<locals>.<lambda>xs<+?+?L%%'Trs$the URL sent was: (/test, text/html)z/tests'the URL sent was: (/test.css, text/css)z	/test.css)r1
_start_serverrserrorrHrr rrtrrrrurljoinreadrrBr6	docserver)rlrrs  @r test_serverzPydocServerTest.test_serveris<	** 
	
++T2,,-I		


k<#3#34
#3FLL(()9)97CDIIK		
6FLL(()9)9;GHMMO	
	--.,001,**+rN)rrrrrrr rrbs
( ,rrceZdZ	dZdZy)PydocUrlHandlerTestctj}|jt|dd|jt|ddy)Nrr#rfoobar)r1rrr	TypeError)rlrs  r test_content_type_errz)PydocUrlHandlerTest.test_content_type_errs5)QR0)QX6rcgd}|j5|D]\}}|j||	dddy#1swYyxYw)N))r#Pydoc: Index of Modules)zget?key=r)r/r)topicsz
Pydoc: Topics)keywordszPydoc: Keywords)r1Pydoc: module pydoc)z
get?key=pydocr)zsearch?key=pydocr)z
topic?key=defzPydoc: KEYWORD def)ztopic?key=STRINGSzPydoc: TOPIC STRINGS)rzPydoc: Error - foobar)rprw)rlrequestsrtr[s    r test_url_requestsz%PydocUrlHandlerTest.test_url_requestssO
(
(
*	2&
2
U%%c51
2	2	2	2s	<AN)rrrrrrrr rrs&7
2rrceZdZdZy)
TestHelperc|jttjjtt
jyrf)rssortedr1rrkeywordkwlistrOs r 
test_keywordszTestHelper.test_keywordss- 5 56/	1rN)rrrrrrr rrs1rrceZdZejeedxrejdedZ	ejeedxrejdedZ
ejeedxrejdedZejeedxrejdedZdZ
y)	PydocWithMetaClassesr|r}c>Gddt}Gdd|}tdtD}t}t	j
|}||ttf|ddzz}|jj}|j||y)	NceZdZfdZxZS)=PydocWithMetaClasses.test_DynamicClassAttribute.<locals>.Metac.|dk(ryt||S)Nhamspamsuper__getattr__rlr
rRs  r rzIPydocWithMetaClasses.test_DynamicClassAttribute.<locals>.Meta.__getattr__s5=!w*400r)rrrr
__classcell__rRs@r Metars

1
1rrc0eZdZejdZy);PydocWithMetaClasses.test_DynamicClassAttribute.<locals>.DAcy)NeggsrrOs r rz?PydocWithMetaClasses.test_DynamicClassAttribute.<locals>.DA.hamsrN)rrrrDynamicClassAttributerrrr DArs

(
(
)
rr	metaclassc3.K|]
}|rd|zndyw)z	
 |      r#Nrr%s  r r(zBPydocWithMetaClasses.test_DynamicClassAttribute.<locals>.<genexpr>s(.I*+CDlQ.>.K.Ir)rr)rrexpected_data_docstringsrr1r!expected_dynamicattribute_patternrrr3rs)rlrrrrDrrrvs        r test_DynamicClassAttributez/PydocWithMetaClasses.test_DynamicClassAttributes	14	1
	4	)..I/G.I)I%V,r
9;BQ??A
"((*/rcGddt}Gdd|}t}tj|}||tt
z}|j
j}|j||y)Nc$eZdZdZfdZxZS)HPydocWithMetaClasses.test_virtualClassAttributeWithOneMeta.<locals>.Metac
gdS)N)rRrrLIFErrFs r __dir__zPPydocWithMetaClasses.test_virtualClassAttributeWithOneMeta.<locals>.Meta.__dir__sFFrc.|dk(ryt||S)Nrr)r_Meta__getattrrs  r rzTPydocWithMetaClasses.test_virtualClassAttributeWithOneMeta.<locals>.Meta.__getattr__s&=w(..rrrrrrrrs@r rrs
G
/
/rrceZdZy)IPydocWithMetaClasses.test_virtualClassAttributeWithOneMeta.<locals>.ClassNrrrr Classrrrrrr)	rrr1r"expected_virtualattribute_pattern1rrr3rs)rlrrrDrrrvs       r %test_virtualClassAttributeWithOneMetaz:PydocWithMetaClasses.test_virtualClassAttributeWithOneMetase	/4	/	d	V,u
:XE
"((*/rc(
Gddt
GddtG
fdd
}Gdd
	}Gd
d||	}t}tj|}||tt
z}|j
j}|j||t}tj|}||tt
z}|j
j}	|j||	y)
Nc$eZdZdZfdZxZS)IPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Meta1c
gdS)N)rRrrrrrs r rzQPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Meta1.__dir__EErc.|dk(ryt||S)Nrrrrs  r rzUPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Meta1.__getattr__%<w*400rrrs@r Meta1r
F
1
1rrc$eZdZdZfdZxZS)IPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Meta2c
gdS)N)rRrrtworrs r rzQPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Meta2.__dir__rrc.|dk(ryt||S)Nrrrrs  r rzUPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Meta2.__getattr__rrrrs@r Meta2rrrrc,eZdZfdZfdZxZS)IPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Meta3c
tttgdj|zj|zS)N)rRrrthree)rrsetr)rFrrs r rzQPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Meta3.__dir__sCF3DMM#&').s);<$=>??rc.|dk(ryt||S)Nr	rrrs  r rzUPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Meta3.__getattr__s'>w*400rr)rRrrs@r Meta3rs
?
1
1rrceZdZy)JPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Class1Nrrrr Class1rrrrrceZdZy)JPydocWithMetaClasses.test_virtualClassAttributeWithTwoMeta.<locals>.Class2Nrrrr Class2rrrrr)
rrr1r"expected_virtualattribute_pattern2rrr3rs"expected_virtualattribute_pattern3)rlrrrrDrexpected_text1result1expected_text2result2rrs          @@r %test_virtualClassAttributeWithTwoMetaz:PydocWithMetaClasses.test_virtualClassAttributeWithTwoMetas	1D	1	1D	1	1E5	1	u		Vu	V,v;hF//#))+1V,v;hF//#))+1rcGddt}Gdd|}t}tj|}||tt
z}|j
j}|j||y)NceZdZdZy).PydocWithMetaClasses.test_buggy_dir.<locals>.Mc
gdS)N)rRrmissinghererrs r rz6PydocWithMetaClasses.test_buggy_dir.<locals>.M.__dir__sCCrN)rrrrrrr Mr
s
Drr ceZdZdZy).PydocWithMetaClasses.test_buggy_dir.<locals>.Czpresent!N)rrrrrrr rr"sDrrrr)	rrr1r!expected_missingattribute_patternrrr3rs)rlr rrDrrrvs       r test_buggy_dirz#PydocWithMetaClasses.test_buggy_dir	sg	D	D	!	V,q	9HD
"((*/rct5}tjddddj}|j	d|y#1swY,xYw)Nz	enum.Enumz
class Enum)rr1rrr)rlrrs   r test_resolve_falsez'PydocWithMetaClasses.test_resolve_falsesI
	$'JJ{#	$##%

lH-	$	$sAAN)rrrr}r~rrr|rrrrr$r&rrr rrsX__WS*-@,#,,.HJ0J0(X__WS*-@,#,,.HJ0J0"X__WS*-@,#,,.HJ'2J'2RX__WS*-@,#,,.HJ0J0.rrc8eZdZdZd	dZdZdZdZdZdZ	y)
TestInternalUtilitiescHtj}|j|_tj
j
|jd|_|j|jt	jx|_}dtj|g|_
y)Nnonexistentr#)tempfileTemporaryDirectoryr
argv0dirrIrJr0argv0r cleanupgetcwd
abs_curdircurdircurdir_spellings)rltmpdirr1s   r rzTestInternalUtilities.setUp$sj,,.
WW\\&++}=
'')yy{2*!#RYY
 ;rNcJ||j}tj||Srf)r.r1_get_revised_path)rl
given_pathr.s   r r6z'TestInternalUtilities._get_revised_path,s%=JJE&&z599rctjj}|jD]2}t	|j|D]}|j
|4|Srf)rrJcopyr3rVcountrI)rl
clean_pathspelling__s    r _get_starting_pathz(TestInternalUtilities._get_starting_path3s[XX]]_
--	,HJ,,X67
,!!(+
,	,rc|j}|jg|z}|j|j||yrf)r>r1rsr6)rlr;
expected_paths   r ,test_sys_path_adjustment_adds_missing_curdirzBTestInternalUtilities.test_sys_path_adjustment_adds_missing_curdir;s<,,.
)J6
//
;]Krc|j}|jg|z}|jg|z}|j|j	||||jgz}|j|j	||yrf)r>r1r-rsr6)rlr;r@leading_argv0dirtrailing_argv0dirs     r *test_sys_path_adjustment_removes_argv0_dirz@TestInternalUtilities.test_sys_path_adjustment_removes_argv0_dir@s{,,.
)J6
 MM?Z7//0@A=Q&$--8//0ABMRrcfd}j}jg|z}jg|z}j||||jgz}jg|z}j|||y)NcFj|tjS)N)r.)r6r1r2)r7rls r r6z\TestInternalUtilities.test_sys_path_adjustment_protects_pydoc_dir.<locals>._get_revised_pathIs))*ENN)KKr)r>r-r1rs)rlr6r;rCr@rDs`     r +test_sys_path_adjustment_protects_pydoc_dirzATestInternalUtilities.test_sys_path_adjustment_protects_pydoc_dirHs	L,,.
 MM?Z7),<<
*+;<mL&$--8),==
*+<=}Mrc|j}|jD]}|j|5|g|z}|j|j	|||gz}|j|j	||j
g|z}|j|j	|||j
gz}|j|j	|dddy#1swYxYw)N)curdir_spelling)r>r3subTestr6r6r-)rlr;r<leading_curdirtrailing_curdirrCrDs       r 5test_sys_path_adjustment_when_curdir_already_includedzKTestInternalUtilities.test_sys_path_adjustment_when_curdir_already_includedSs,,.
--
	MHh7	
M"*j!8!!$"8"8"HI",z"9!!$"8"8"IJ$(MM?^#C !!$"8"89I"JK$3t}}o$E!!!$"8"89J"KL	
M	
M
	M	
M	
MsB-C**C3	rf)
rrrrr6r>rArErHrNrrr r(r("s)<:L
S	NMrr(ctj}tjtjg|tjt
yrf)rthreading_setupr}addModuleCleanupthreading_cleanupr
)thread_infos r setUpModulerTbs8"224K.@@O;Om,r__main__)[rIrrximportlib.utilr1rr1r5rrrorQrr+test.supportrrrr}urllib.parser	xml.etreerxml.etree.ElementTreeriorcollectionsrurllib.requestrrrrtest.support.script_helperr	r
rrr
rrrrrrtest.support.os_helperrrrrrsupportHAVE_DOCSTRINGSrr3rrrrexpected_html_data_docstringsr-rrrrrrrr#r;r=rFrNrUr\raTestCasercr{rrr~rrrrr(rTrmainrrr <module>res	
	
".&"MM)///<;		<< 
 0\x
EGy|!&&I/G&I!IJX!&&I/G&I!I,-4GD"**,EN% 
EG!"$&
EG#&
EG#&,
EG-#0%
EG"H%%<c38$$c3LX@mX@vL
x((L
^
W5#,h''#,	#,L2-2>1""1n.8,,n.b=MH--=M@-zHMMOr