python (3.12.0)

(root)/
lib/
python3.12/
test/
__pycache__/
test_clinic.cpython-312.pyc

͑eJJddlmZmZddlmZddlmZmZddlmZm	Z	ddl
mZddlm
Z
ddlZddlZddlZddlZddlZddlZej(dej*d5ddlZdd	lmZdddGd
de
ZGdd
ZGddZGddZej8ddZGddZGddeZGdde
Z Gdde
Z!GddZ"Gdd Z#Gd!d"e
Z$Gd#d$eZ%Gd%d&e
Z&	ddl'Z(ejTe(dud'Gd(d)ejZ+Gd*d+ejZ,Gd,d-ejZ-e.d.k(rej^yy#1swYxYw#e)$rdZ(YwxYw)/)support
test_tools)	os_helper)
SHORT_TIMEOUTrequires_subprocess)TESTFNunlink)dedent)TestCaseNclinic)	DSLParserceZdZdZdZdZy)_ParserBaseNctj5}|jt5||dddddd|j	S#1swY!xYw#1swYj	SxYwN)rcaptured_stdoutassertRaises
SystemExitgetvalue)selfparser_inputstdouts    D/BuggyBox/python/3.12.0/bootstrap/lib/python3.12/test/test_clinic.pyexpect_parser_failurez!_ParserBase.expect_parser_failuresh

$
$
&	&"":.
v
	  

	  s!A 	AA A	A  A8c:|j|j|Sr)rparse_function)rrs  rparse_function_should_failz&_ParserBase.parse_function_should_fail!s))$*=*=vFF)__name__
__module____qualname__maxDiffrrrrrrsG!GrrceZdZdZy)
FakeConverterc ||_||_yr)nameargsrr(r)s   r__init__zFakeConverter.__init__&s		rN)r r!r"r+r$rrr&r&%srr&ceZdZdZdZy)FakeConverterFactoryc||_yrr(rr(s  rr+zFakeConverterFactory.__init__,s		rc.t|j|Sr)r&r()rr(defaultkwargss    r__call__zFakeConverterFactory.__call__/sTYY//rN)r r!r"r+r4r$rrr-r-+s0rr-ceZdZdZdZy)FakeConvertersDictci|_yr)used_convertersrs rr+zFakeConvertersDict.__init__4s
!rcL|jj|t|Sr)r8
setdefaultr-)rr(r2s   rgetzFakeConvertersDict.get7s!##..t5I$5OPPrN)r r!r"r+r<r$rrr6r63s
"Qrr6Cfile)languagefilenamecVeZdZdZdZdZdZdZejjZ
y)
FakeClinicct|_t|_tjd|_d|_i|_tjd|j
|_	tj|_tj|_
|t_d|_dx|_|_i|_|j%dd|j%dd|j%dd|j"j&}tjd|dfd|dfd	|dfd
|dfd|dfd|dfd
|dff|_y)NrBblockbufferr>suppressdocstring_prototypedocstring_definitionmethoddef_defineimpl_prototypeparser_prototypeparser_definitionimpl_definition)r6
converterslegacy_convertersr	CLanguager?r@destination_buffersBlockParserblock_parsercollectionsOrderedDictmodulesclassesr(line_prefixline_suffixdestinationsadd_destinationr<field_destinations)rds  rr+zFakeClinic.__init__=sD,.!3!5((.

#% "..r4==A"..0"..0
 	.004+Wh/VX.Z4!!"-"9"9
"AjM2
#QwZ0
7,
qz*
:/
 !G*-
'
+;
#rc|jj|}|s!tjdt	|z|S)NzDestination does not exist: )r[r<sysexitrepr)rr(r^s   rget_destinationzFakeClinic.get_destinationXs6!!$'HH3d4j@Arc||jvr!tjdt|zt	j
|||g||j|<y)NzDestination already exists: )r[r`rarbrDestination)rr(typer)s    rr\zFakeClinic.add_destination^sJ4$$$HH3d4j@A"("4"4T4"M"M$rc|dk(S)Nmoduler$r0s  ris_directivezFakeClinic.is_directivecs
xrc"||j|<yr)called_directivesr*s   r	directivezFakeClinic.directivefs'+t$rN)r r!r"r+rcr\rirlrClinic_module_and_classr$rrrBrB<s.6N
 ,

77rrBcreZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZy)ClinicWholeFileTestcbtjtjdd|_y)Ntest.cr@)rrmrQr9s rsetUpzClinicWholeFileTest.setUpmsmmF$4$4T$:XNrct|j}|j|jj|Sr)r
striprrparse)rrawrs   rexpect_failurez"ClinicWholeFileTest.expect_failureps1""$))$++*;*;VDDrcd}|jj|j}|dj}|j	|d|j|dy)Nz/*[clinic]
foo
[clinic]*/z[clinic]*/[clinic]*/z
[clinic]*/)rrw
splitlinesrstripassertNotEqualassertEqual)rrxcookedend_lines    rtest_eolzClinicWholeFileTest.test_eolts[,""3'224!9##%	
H&<=<0rcRd}d}|j|}|j||y)Nz
            /*[clinic input]
            [clinic start generated code]*/
            /*[clinic end generated code: foo]*/
        znError in file "test.c" on line 3:
Mangled Argument Clinic marker line: '/*[clinic end generated code: foo]*/'
ryrrrxmsgouts    rtest_mangled_marker_linez,ClinicWholeFileTest.test_mangled_marker_lines6
\	!!#&c"rcRd}d}|j|}|j||y)Nz
            /*[clinic input]
            [clinic start generated code]*/
            /*[clinic end generated code: output=0123456789abcdef input=fedcba9876543210]*/
        zkError in file "test.c" on line 3:
Checksum mismatch!
Expected: 0123456789abcdef
Computed: da39a3ee5e6b4b0d
ryassertInrs    rtest_checksum_mismatchz*ClinicWholeFileTest.test_checksum_mismatchs3
+	!!#&

c3rcRd}d}|j|}|j||y)Nz_
            /*[clinic input]
            [clinic start generated code]*/foobarfoobar!
        zKError in file "test.c" on line 2:
Garbage after stop line: 'foobarfoobar!'
rrs    rtest_garbage_after_stop_linez0ClinicWholeFileTest.test_garbage_after_stop_lines5

9	!!#&c"rcRd}d}|j|}|j||y)NzS
            /*[clinic input]
             [clinic start generated code]*/
        zuError in file "test.c" on line 2:
Whitespace is not allowed before the stop line: ' [clinic start generated code]*/'
rrs    r test_whitespace_before_stop_linez4ClinicWholeFileTest.test_whitespace_before_stop_lines6

c	!!#&c"rc0tjd}d|_d|_d|_tj
|d}t
dj}|j|}t
dj}|j||y)Nz//z//[{dsl_name} start]z//[{dsl_name} stop]rrrsz\
            //[clinic start]
            //module test
            //[clinic stop]
        z
            //[clinic start]
            //module test
            //
            //[clinic stop]
            /*[clinic end generated code: output=da39a3ee5e6b4b0d input=65fab8adff58cf08]*/
        )rrQbody_prefix
start_line	stop_linermr
rvrwlstripr)rclangclrxrexpecteds      rtest_parse_with_body_prefixz/ClinicWholeFileTest.test_parse_with_body_prefixs  & 1/
]]58
4
UW		
hhsm
VX
		
h'rcRd}d}|j|}|j||y)NzR
            /* start
            /* nested
            */
            */
        z8Error in file "test.c" on line 2:
Nested block comment!
rrs    r*test_cpp_monitor_fail_nested_block_commentz>ClinicWholeFileTest.test_cpp_monitor_fail_nested_block_comments5
&	!!#&c"rcRd}d}|j|}|j||y)Nz<
            #if
            a()
            #endif
        zLError in file "test.c" on line 1:
Invalid format for #if line: no argument!
rrs    r*test_cpp_monitor_fail_invalid_format_noargz>ClinicWholeFileTest.test_cpp_monitor_fail_invalid_format_noargs5
:	!!#&c"rcRd}d}|j|}|j||y)NzC
            #ifdef A B
            a()
            #endif
        zbError in file "test.c" on line 1:
Invalid format for #ifdef line: should be exactly one argument!
rrs    r0test_cpp_monitor_fail_invalid_format_toomanyargszDClinicWholeFileTest.test_cpp_monitor_fail_invalid_format_toomanyargss6
P	!!#&c"rcRd}d}|j|}|j||y)Nz#elsezQError in file "test.c" on line 1:
#else without matching #if / #ifdef / #ifndef!
rrs    r$test_cpp_monitor_fail_no_matching_ifz8ClinicWholeFileTest.test_cpp_monitor_fail_no_matching_ifs3
?	!!#&c"rcN|jd}d}|j||y)Nzy
            /*[clinic input]
            output preset nosuchpreset
            [clinic start generated code]*/
        zUnknown preset 'nosuchpreset'rrrrs   r$test_directive_output_unknown_presetz8ClinicWholeFileTest.test_directive_output_unknown_presets,!!#

.

c3rcN|jd}d}|j||y)Nzi
            /*[clinic input]
            output pop
            [clinic start generated code]*/
        z"Can't 'output pop', stack is emptyrrs   rtest_directive_output_cant_popz2ClinicWholeFileTest.test_directive_output_cant_pops,!!#

3

c3rctd}|jj|}|j|j	tdhd}|D]/}|j|5|j
||ddd1|jjdd}|j|j	dy#1swY~xYw)Nz~
            /*[clinic input]
            output print 'I told you once.'
            [clinic start generated code]*/
        >
cpp_if	cpp_endifrKrNrJmethoddef_ifndefrLrMrHrI)field
z%/*[clinic end generated code: output=)	r
rrw
assertTrue
startswithsubTestrr}split)rrxrfieldsr	last_lines      rtest_directive_output_printz/ClinicWholeFileTest.test_directive_output_prints

kk$	
v/(
	

	*EE*
*

eS)
*
*	*JJL&&t,R0	  !HI	

*
*s+CC	cN|jd}d}|j||y)Nz
            /*[clinic input]
            destination buffer nosuchcommand
            [clinic start generated code]*/
        z+unknown destination command 'nosuchcommand'rrs   r test_unknown_destination_commandz4ClinicWholeFileTest.test_unknown_destination_command4s,!!#

<

c3rcN|jd}d}|j||y)Na
            /*[python input]
            class Custom_converter(CConverter):
                converter = "some_c_function"
                def converter_init(self):
                    self.function.noaccess
            [python start generated code]*/
            /*[clinic input]
            module test
            test.fn
                a: Custom
            [clinic start generated code]*/
        z{Stepped on a land mine, trying to access attribute 'noaccess':
Don't access members of self.function inside converter_init!rrs   r+test_no_access_to_members_in_converter_initz?ClinicWholeFileTest.test_no_access_to_members_in_converter_init=s2!!#

K		


c3rN)r r!r"rtryrrrrrrrrrrrrrrrr$rrrprplsZOE1"#
 
#
#(*####  !
F  rrpc0eZdZdZdZdZdZdZdZy)ClinicGroupPermuterTestcVtj|||}|j||yr)rpermute_optional_groupsr)rlmroutputcomputeds      r_testzClinicGroupPermuterTest._testSs&11!Q:*rc6|jdggdgdggdy)Nstartstopstep))r)rr)rrrrr9s r
test_rangez"ClinicGroupPermuterTest.test_rangeWs#

WI;F8*	
rc8|jddggdgdggdy)Nxychattr))r)rr)rrr)rrrrrr9s rtest_add_windowz'ClinicGroupPermuterTest.test_add_window_s%

S#J<$6(	
rcF|jgdddggdgddggdgdy)	N)a1a2a3b1b2c1d1d2)e1e2e3))r)rrr)rrrrr)rrrrrr)rrrrrrrr)rrrrrrrrrrrrr9s rtest_ludicrousz&ClinicGroupPermuterTest.test_ludicroushs/

&t5vtN`?a	
rc8|jggdgdgdggdy)Nabc)r$rrrrrrrr9s rtest_right_onlyz'ClinicGroupPermuterTest.test_right_onlyss&

2rSE3%.	
rc6d}|jt|y)Nc4tjdgggy)Nr)rrr$rrfnzPClinicGroupPermuterTest.test_have_left_options_but_required_is_empty.<locals>.fn}s**C5"b9r)r
ValueError)rrs  r,test_have_left_options_but_required_is_emptyzDClinicGroupPermuterTest.test_have_left_options_but_required_is_empty|s	:*b)rN)	r r!r"rrrrrrr$rrrrRs +

	

*rrc6eZdZdZdZdZdZdZdZdZ	y)	ClinicLinearFormatTestcTtj|fi|}|j||yr)r
linear_formatr)rinputrr3rs     rrzClinicLinearFormatTest._tests'''88*rc(|jddy)NrDrr9s rtest_empty_stringsz)ClinicLinearFormatTest.test_empty_stringss

2rrc(|jddy)Nrrr9s rtest_solo_newlinez(ClinicLinearFormatTest.test_solo_newlines

4rc(|jddy)Nz
          abc
        rr9s rtest_no_substitutionz+ClinicLinearFormatTest.test_no_substitutions

	
rc,|jdddy)N6
          abc
          {name}
          def
        z%
          abc
          def
        rDr/rr9s rtest_empty_substitutionz.ClinicLinearFormatTest.test_empty_substitutions"

		rc,|jdddy)Nrz6
          abc
          GARGLE
          def
        GARGLEr/rr9s rtest_single_line_substitutionz4ClinicLinearFormatTest.test_single_line_substitutions"

		rc,|jdddy)NrzH
          abc
          bingle
          bungle

          def
        zbingle
bungle
r/rr9s rtest_multiline_substitutionz2ClinicLinearFormatTest.test_multiline_substitutions"

%	
	&rN)
r r!r"rrrrrrrr$rrrrs%+
	&rrceZdZdZdZy)InertParsercyrr$rrs  rr+zInertParser.__init__rcyrr$rrEs  rrwzInertParser.parserrNr r!r"r+rwr$rrrrs

rrceZdZdZdZy)
CopyParsercyrr$rs  rr+zCopyParser.__init__rrc&|j|_yr)rrrs  rrwzCopyParser.parses
{{rNrr$rrrrs
#rrc0eZdZdZdZdZdZdZdZy)ClinicBlockParserTestcHtjd}ttj||}tj|}|D]}|j||jj}||k(s"Jdt|zdzt|zy)Nzoutput != input!

output z	

 input )	rrQlistrSBlockPrinterprint_blockfrrb)rrrr?blockswriterrEs       rrzClinicBlockParserTest._tests##D)f((9:$$X.	&Eu%	&""$j =V L} \_cdi_j jjrc&|j||Srr)rrs  r
round_tripz ClinicBlockParserTest.round_tripszz%''rc&|jdy)Nz@
            verbatim text here
            lah dee dah
        rr9s rtest_round_trip_1z'ClinicBlockParserTest.test_round_trip_1s	
rc&|jdy)Nz
    verbatim text here
    lah dee dah
/*[inert]
abc
[inert]*/
def
/*[inert checksum: 7b18d017f89f61cf17d47f92749ea6930a3f1deb]*/
xyz
rr9s rtest_round_trip_2z'ClinicBlockParserTest.test_round_trip_2s			rctjd}tj|d}t||jd<t||jd<|j
|}|j||y)Nr>rsinertcopy)rrQrmrparsersrrwr)rrrr?rrs      r_test_clinicz"ClinicBlockParserTest._test_clinicsc##D)MM(V4(^		'&qM		&775>*rc(|jddy)Nz
    verbatim text here
    lah dee dah
/*[copy input]
def
[copy start generated code]*/
abc
/*[copy end generated code: output=03cfd743661f0797 input=7b18d017f89f61cf]*/
xyz
z
    verbatim text here
    lah dee dah
/*[copy input]
def
[copy start generated code]*/
def
/*[copy end generated code: output=7b18d017f89f61cf input=7b18d017f89f61cf]*/
xyz
)rr9s r
test_clinic_1z#ClinicBlockParserTest.test_clinic_1s			rN)	r r!r"rrrrrrr$rrr	r	s!k(

+rr	cdeZdZdZdZdZdZdZdZdZ	dZ
d	Zd
ZdZ
dZd
ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!d Z"d!Z#d"Z$d#Z%d$Z&d%Z'd&Z(d'Z)d(Z*d)Z+d*Z,d+Z-d,Z.d-Z/d.Z0d/Z1d0Z2d1Z3d2Z4d3Z5d4Z6d5Z7d6Z8d7Z9d;d8Z:d9Z;y:)<ClinicParserTestc|jt|d|j|jj	t|j	y)N	docstring)rhasattrrr"rvr
)rrrs   rcheckDocstringzClinicParserTest.checkDocstringsCK01++-)//1	3rctt}tjd}|j	||j
\}}|j
d|j|j
d|jy)Nz5
            module os
            os.access
        accessos)r
rBrBlockrw
signaturesrr()rrrErhfunctions     rtest_trivialzClinicParserTest.test_trivialsg:<(
	U ++8==1v{{+rc|jtd}|j\}}|jd|j|jd|jy)NzC
            #
            module os
            os.access
        r&r')rwr
r)rr()rrErhr*s    rtest_ignore_linez!ClinicParserTest.test_ignore_linesV

6#

!++8==1v{{+rcR|jd}|jd|j|jdt|j|jd}|jd|j|j|jtjy)NzO
            module os
            os.access
                path: int
        r&r{path)	rrr(len
parametersassertIsInstance	converterr
int_converterrr*ps   r
test_paramzClinicParserTest.test_params&&(

	
8==1C 3 345'(akk6+?+?@rc||jd}|jd}|jd|jy)Nzb
            module os
            os.access
                follow_symlinks: bool = True
        follow_symlinksTrr1rr2r5s   rtest_param_defaultz#ClinicParserTest.test_param_default)s>&&(


 12qyy)rc||jd}|jd}|jd|jy)Nz
            module os
            os.access
                follow_symlinks: \
                bool \
                = \
                True
        r9Tr:r5s   rtest_param_with_continuationsz.ClinicParserTest.test_param_with_continuations2s>&&(

 12qyy)rc.|jd}|jd}|jtj|j
|jd|jjd}|jd}|j||y)Nz
            module os
            os.access
                follow_symlinks: int(c_default='MAXSIZE') = sys.maxsize
            r9MAXSIZEz~Error on line 0:
When you specify a named constant ('sys.maxsize') as your default value,
you MUST specify a valid c_default.
zh
            module os
            os.access
                follow_symlinks: int = sys.maxsize
        )	rr1rr`maxsizer2r3	c_defaultr)rr*r6expected_msgrs     rtest_param_default_expressionz.ClinicParserTest.test_param_default_expression>s&&(

 12aii0AKK$9$9:
4	
--/

	
l+rc|jd}|jd}|jdt|j|jdj}|j|tjy)Nz
            module os
            os.access
                follow_symlinks: bool = True
                something_else: str = ''
        r9something_else)rr1rr0r3r2r
str_converter)rr*r6convs    rtest_param_no_docstringz(ClinicParserTest.test_param_no_docstringTsr&&(

 12C 3 345""#34>>dF$8$89rcNd}|jd}|j||y)NzoError on line 0:
Can't have a parameter without a default ('something_else')
after a parameter with a default!
z}
            module os
            os.access
                follow_symlinks: bool = True
                something_else: strrrrrBrs   r*test_param_default_parameters_out_of_orderz;ClinicParserTest.test_param_default_parameters_out_of_order`s5
2	
--/'(
	
l+rc|jd}|jd}|jd|jjdy)Nz^
            module os
            os.access
                path: path_t(allow_fd=1)
        r/allow_fd)rr1rr3r)r5s   r!disabled_test_converter_argumentsz2ClinicParserTest.disabled_test_converter_argumentsmsH&&(


'AKK,,Z89rcJ|jd}|j|dy)Nz
            module os
            os.stat as os_stat_fn

               path: str
                   Path to be examined

            Perform a stat system call on the given path.
        z
            stat($module, /, path)
            --

            Perform a stat system call on the given path.

              path
                Path to be examined
        rr$rr*s  rtest_function_docstringz(ClinicParserTest.test_function_docstringv.&&(
	
H'	
rc\|jtd}|j|dy)Nz
            module foo
            foo.bar
              x: int
                 Documentation for x.
              y: int

            This is the documentation for foo.

            Okay, we're done here.
        z
            bar($module, /, x, y)
            --

            This is the documentation for foo.

              x
                Documentation for x.

            Okay, we're done here.
        rr
r$rTs  r%test_explicit_parameters_in_docstringz6ClinicParserTest.test_explicit_parameters_in_docstrings5&&v
/
(

	
H
'
	
rc\|jtd}|j|dy)Nzt
            module os
            os.stat
                path: str
            This/used to break Clinic!
        zc
            stat($module, /, path)
            --

            This/used to break Clinic!
        rXrTs  rTtest_parser_regression_special_character_in_parameter_column_of_docstring_first_linezeClinicParserTest.test_parser_regression_special_character_in_parameter_column_of_docstring_first_lines5&&v/(
	
H'	
rc^|jd}|jd|jy)NzA
            module os
            os.stat as os_stat_fn
        
os_stat_fn)rr
c_basenamerTs  rtest_c_namezClinicParserTest.test_c_names/&&(
	
x':':;rcz|jd}|j|jtjy)Nz:
            module os
            os.stat -> int
        )rr2return_converterrint_return_converterrTs  rtest_return_converterz&ClinicParserTest.test_return_converters5&&(
	
h779T9TUrc|jd}|jd}|jtjj
|j|jd|jy)Nzt
            module os
            os.access
                *
                follow_symlinks: bool = True
        r9r)rr1rinspect	ParameterKEYWORD_ONLYkindgroupr5s   r	test_starzClinicParserTest.test_stars^&&(

 12**77@AGG$rc||jd}|jd}|jd|jy)Nz
            module window
            window.border
                [
                ls: int
                ]
                /
        lsrO)rr1rrir5s   r
test_groupzClinicParserTest.test_groups=&&(

%AGG$rcp|jd}d}|D]\}}|j||5|j|}|j|j||j|j
tjjddd|j|dy#1swYxYw)Na
            module curses
            curses.addch
                [
                y: int
                    Y-coordinate.
                x: int
                    X-coordinate.
                ]
                ch: char
                    Character to add.
                [
                attr: long
                    Attributes for the character.
                ]
                /
        ))rr)rrrr)rrOr(ria
            addch([y, x,] ch, [attr])


              y
                Y-coordinate.
              x
                X-coordinate.
              ch
                Character to add.
              attr
                Attributes for the character.
        
rrr1rrirhrerfPOSITIONAL_ONLYr$rr*datasetr(rir6s      rtest_left_groupz ClinicParserTest.test_left_groups&&(
"

#	LKD%4u5
L''-  %0  ):):)J)JK
L
L	L
	
H'	
	
L
LA B,,B5	cp|jd}d}|D]\}}|j||5|j|}|j|j||j|j
tjjddd|j|dy#1swYxYw)Na
            module curses
            curses.imaginary
               [
               [
               y1: int
                 Y-coordinate.
               y2: int
                 Y-coordinate.
               ]
               x1: int
                 X-coordinate.
               x2: int
                 X-coordinate.
               ]
               ch: char
                 Character to add.
               [
               attr1: long
                 Attributes for the character.
               attr2: long
                 Attributes for the character.
               attr3: long
                 Attributes for the character.
               [
               attr4: long
                 Attributes for the character.
               attr5: long
                 Attributes for the character.
               attr6: long
                 Attributes for the character.
               ]
               ]
               /
        ))y1)y2ry)x1r)x2rro)attr1rO)attr2rO)attr3rO)attr4r{)attr5r{)attr6r{rpa
            imaginary([[y1, y2,] x1, x2,] ch, [attr1, attr2, attr3, [attr4, attr5,
                      attr6]])


              y1
                Y-coordinate.
              y2
                Y-coordinate.
              x1
                X-coordinate.
              x2
                X-coordinate.
              ch
                Character to add.
              attr1
                Attributes for the character.
              attr2
                Attributes for the character.
              attr3
                Attributes for the character.
              attr4
                Attributes for the character.
              attr5
                Attributes for the character.
              attr6
                Attributes for the character.
        rqrss      rtest_nested_groupsz#ClinicParserTest.test_nested_groupss&&"("
F
#	LKD%4u5
L''-  %0  ):):)J)JK
L
L	L	
H'	

L
Lrvctj5}|jt5|j	|dddddd|jS#1swY!xYw#1swYjSxYwr)rrrrrr)rsrs   rrz+ClinicParserTest.parse_function_should_failMso

$
$
&	'&"":.
'##A&
'	'  
'
'	'  s!A)AA)A&	"A))BcNd}|jd}|j||y)NzpError on line 0:
Function two_top_groups_on_left has an unsupported group configuration. (Unexpected state 2.b)
z
            module foo
            foo.two_top_groups_on_left
                [
                group1 : int
                ]
                [
                group2 : int
                ]
                param: int
        rKrLs   r0test_disallowed_grouping__two_top_groups_on_leftzAClinicParserTest.test_disallowed_grouping__two_top_groups_on_leftSs5
6	
--
/

	
l+rcN|jd}d}|j||y)Nz
            module foo
            foo.two_top_groups_on_right
                param: int
                [
                group1 : int
                ]
                [
                group2 : int
                ]
        z_Function two_top_groups_on_right has an unsupported group configuration. (Unexpected state 6.b)rrrs   r1test_disallowed_grouping__two_top_groups_on_rightzBClinicParserTest.test_disallowed_grouping__two_top_groups_on_rightf1--
/


4		


c3rcN|jd}d}|j||y)Nz
            module foo
            foo.parameter_after_group_on_right
                param: int
                [
                [
                group1 : int
                ]
                group2 : int
                ]
        zfFunction parameter_after_group_on_right has an unsupported group configuration. (Unexpected state 6.a)rrs   r8test_disallowed_grouping__parameter_after_group_on_rightzIClinicParserTest.test_disallowed_grouping__parameter_after_group_on_rightxrrcN|jd}d}|j||y)Nz
            module foo
            foo.group_after_parameter_on_left
                [
                group2 : int
                [
                group1 : int
                ]
                ]
                param: int
        zeFunction group_after_parameter_on_left has an unsupported group configuration. (Unexpected state 2.b)rrs   r7test_disallowed_grouping__group_after_parameter_on_leftzHClinicParserTest.test_disallowed_grouping__group_after_parameter_on_leftrrcN|jd}d}|j||y)Nz
            module foo
            foo.empty_group
                [
                [
                ]
                group2 : int
                ]
                param: int
        XFunction empty_group has an empty group.
All groups must contain at least one parameter.rrs   r-test_disallowed_grouping__empty_group_on_leftz>ClinicParserTest.test_disallowed_grouping__empty_group_on_left1--	/	

>		


c3rcN|jd}d}|j||y)Nz
            module foo
            foo.empty_group
                param: int
                [
                [
                ]
                group2 : int
                ]
        rrrs   r.test_disallowed_grouping__empty_group_on_rightz?ClinicParserTest.test_disallowed_grouping__empty_group_on_rightrrcN|jd}d}|j||y)Nz
            module foo
            foo.empty_group
                param: int
                ]
                group2: int
                ]
        z2Function empty_group has a ] without a matching [.rrs   r-test_disallowed_grouping__no_matching_bracketz>ClinicParserTest.test_disallowed_grouping__no_matching_brackets---/
C

c3rc|jd}|jd|j|jdt|jy)NzL
            module foo
            foo.bar

            Docstring

        zbar($module, /)
--

DocstringrOrrr"r0r1rTs  rtest_no_parametersz#ClinicParserTest.test_no_parameterssK&&(
	
;X=O=OPC 3 345rc|jddd}|jd|j|jdt|jy)Nz
            module foo
            class foo.Bar "unused" "notneeded"
            foo.Bar.__init__

            Docstring

        rEr{)signatures_in_blockfunction_indexzBar()
--

DocstringrOrrTs  rtest_init_with_no_parametersz-ClinicParserTest.test_init_with_no_parameterssW&&("#1'6	
183E3EFC 3 345rcN|jd}d}|j||y)NzM
            module foo
            foo.bar => int
                /
        z%Illegal function name: foo.bar => intrrs   rtest_illegal_module_linez)ClinicParserTest.test_illegal_module_lines,--/

6

c3rcN|jd}d}|j||y)NzM
            module foo
            foo.bar as 935
                /
        zIllegal C basename: 935rrs   rtest_illegal_c_basenamez(ClinicParserTest.test_illegal_c_basenames,--/

(

c3rcJ|jd}|jd|y)NzX
            module foo
            foo.bar
                *
                *
        z%Function bar uses '*' more than once.rrrs  rtest_single_starz!ClinicParserTest.test_single_stars(--/
	


=sCrcd}d}|D]@}|j|5|j|}|j||dddBy#1swYMxYw)N)zmodule foo
foo.bar
  *z&module foo
foo.bar
  *
Docstring here.z"module foo
foo.bar
  this: int
  *z-module foo
foo.bar
  this: int
  *
Docstring.z=Function bar specifies '*' without any parameters afterwards.rE)rrr)rrtrrErs     r#test_parameters_required_after_starz4ClinicParserTest.test_parameters_required_after_starsf
N	(EE*
(55e<

c3'
(
(	(
(
($AA	cN|jd}d}|j||y)NzX
            module foo
            foo.bar
                /
                /
        KFunction bar has an unsupported group configuration. (Unexpected state 0.d)rrs   rtest_single_slashz"ClinicParserTest.test_single_slash1--/

%		


c3rcN|jd}d}|j||y)Nz
            module foo
            foo.bar
                a: int
                /
                b: int
                /
        z%Function bar uses '/' more than once.rrs   rtest_double_slashz"ClinicParserTest.test_double_slashs,--/
6

c3rcN|jd}d}|j||y)Nz
            module foo
            foo.bar
               x: int
               y: int
               *
               z: int
               /
        zUFunction bar mixes keyword-only and positional-only parameters, which is unsupported.rrs   rtest_mix_star_and_slashz(ClinicParserTest.test_mix_star_and_slash%s1--/

$		


c3rcN|jd}d}|j||y)Nz]
            module foo
            foo.bar
                /
                x: int
        rrrs   r1test_parameters_not_permitted_after_slash_for_nowzBClinicParserTest.test_parameters_not_permitted_after_slash_for_now5rrcNd}|jd}|j||y)Nz#Error on line 0:
Too many var args
zt
            module foo
            foo.bar
               *vararg1: object
               *vararg2: object
        rKrLs   r'test_parameters_no_more_than_one_varargz8ClinicParserTest.test_parameters_no_more_than_one_varargBs5
"	--/
	
l+rcJ|jd}|j|dy)Nz
              module foo
              foo.bar
                x: int
                  Nested docstring here, goeth.
                *
                y: str
              Not at column 0!
        z
            bar($module, /, x, *, y)
            --

            Not at column 0!

              x
                Nested docstring here, goeth.
        rSrTs  rtest_function_not_at_column_0z.ClinicParserTest.test_function_not_at_column_0OrVrcN|jd}d}|j||y)Nzr
            module foo
            foo.bar
               *vararg1: object
            	*vararg2: object
        z-Tab characters are illegal in the Clinic DSL.rrs   rtest_indent_stack_no_tabsz*ClinicParserTest.test_indent_stack_no_tabscs,--/
>

c3rcJ|jd}|jd|y)Nzc
            module foo
            foo.bar
              a: object
             b: object
        zIllegal outdentrrs  r!test_indent_stack_illegal_outdentz2ClinicParserTest.test_indent_stack_illegal_outdentms(--/
	


'-rct}t|d_fdjd<t	j
d}j
||jjy)NFctddS)NflagT)setattr)rsr<lambda>z1ClinicParserTest.test_directive.<locals>.<lambda>zs0Mrsetflag)rBr
r
directivesrr(rwr)rrrErs   @rtest_directivezClinicParserTest.test_directivevsTL1'M)$Y'U$rc|jd}|j\}}|jdj}|j	|t
jy)Nz module os
os.access
   path: "s"r/)rwr)r1r3r2rrG)rrErhr*rHs     rtest_legacy_convertersz'ClinicParserTest.test_legacy_converterssM

?@ ++##F+66dF$8$89rcd}d}|D]@}|j|5|j|}|j||dddBy#1swYMxYw)NRError on line 0:
Annotations must be either a name, a function call, or a string.
)zmodule os
os.access
   path: 42z"module os
os.access
   path: 42.42z module os
os.access
   path: 42jz"module os
os.access
   path: b"42"rrrrrexpected_failure_messagertrErs     r5test_legacy_converters_non_string_constant_annotationzFClinicParserTest.test_legacy_converters_non_string_constant_annotationsu
Q	!
	@EE*
@55e<  &>?
@
@	@
@
@rcd}d}|D]@}|j|5|j|}|j||dddBy#1swYMxYw)Nr)z3module os
os.access
   path: {"some": "dictionary"}z6module os
os.access
   path: ["list", "of", "strings"]z3module os
os.access
   path: (x for x in range(42))rrrs     r-test_other_bizarre_things_in_annotations_failz>ClinicParserTest.test_other_bizarre_things_in_annotations_failsu
Q	!

	@EE*
@55e<  &>?
@
@	@
@
@rcd}d}|D]@}|j|5|j|}|j||dddBy#1swYMxYw)NzHError on line 0:
Cannot use a kwarg splat in a function-call annotation
)z1module fo
fo.barbaz
   o: bool(**{None: "bang!"})z.module fo
fo.barbaz -> bool(**{None: "bang!"})z+module fo
fo.barbaz -> bool(**{"bang": 42})z0module fo
fo.barbaz
   o: bool(**{"bang": None}))rr)rexpected_error_msgrtrrs     r9test_kwarg_splats_disallowed_in_function_call_annotationszJClinicParserTest.test_kwarg_splats_disallowed_in_function_call_annotationssn
G	
	:B$
:55b9  &89
:
:	:
:
:rcRd}d}|j|}|j||y)NzhError on line 0:
A 'self' parameter, if specified, must be the very first thing in the parameter block.
zz
            module foo
            foo.func
                a: int
                self: self(type="PyObject *")
        rKrrrErs    rtest_self_param_placementz*ClinicParserTest.test_self_param_placements6
(	
--e401rcRd}d}|j|}|j||y)Nz?Error on line 0:
A 'self' parameter cannot be marked optional.
zj
            module foo
            foo.func
                self: self(type="PyObject *") = None
        rKrs    r"test_self_param_cannot_be_optionalz3ClinicParserTest.test_self_param_cannot_be_optionals6
>	
--e401rcRd}d}|j|}|j||y)NzError on line 0:
A 'defining_class' parameter, if specified, must either be the first thing in the parameter block, or come just after 'self'.
z
            module foo
            foo.func
                self: self(type="PyObject *")
                a: int
                cls: defining_class
        rKrs    r#test_defining_class_param_placementz4ClinicParserTest.test_defining_class_param_placements7
O	
--e401rcRd}d}|j|}|j||y)NzIError on line 0:
A 'defining_class' parameter cannot be marked optional.
zs
            module foo
            foo.func
                cls: defining_class(type="PyObject *") = None
        rKrs    r,test_defining_class_param_cannot_be_optionalz=ClinicParserTest.test_defining_class_param_cannot_be_optionals7
H	
--e401rcd}d}|jt|5|j|dddy#1swYyxYw)Nz
            module foo
            class Foo "" ""
            Foo.__init__
                cls: defining_class
                a: object
        z0Slot methods cannot access their defining class.)assertRaisesRegexrr)rrErs   r.test_slot_methods_cannot_access_defining_classz?ClinicParserTest.test_slot_methods_cannot_access_defining_classsDA

#
#J
4	'&	'	'	's6?cNd}|jd}|j||y)Nz1Error on line 0:
__new__ must be a class method!
zT
            module foo
            class Foo "" ""
            Foo.__new__
        rKrrrs   rtest_new_must_be_a_class_methodz0ClinicParserTest.test_new_must_be_a_class_methods6
0	--/

	
01rcNd}|jd}|j||y)NzQError on line 0:
__init__ must be a normal method, not a class or static method!
zn
            module foo
            class Foo "" ""
            @classmethod
            Foo.__init__
        rKrs   r!test_init_must_be_a_normal_methodz2ClinicParserTest.test_init_must_be_a_normal_methods7
P	--/
	
01rc|jd}|jd}|jfd}dddddddd	dd
d	df}|D]}|j\}}|j	||5||}|j||j|jd}	|r|jd|	n|jd|	|jd	}
|jd|
dddy#1swYxYw)
Nz
            module foo
            foo.func
                fn: object
                k: float
                i: float(unused=True)
                /
                *
                flag: bool(unused=True) = False
        rOc"|jSrr3)rparamss rrz4ClinicParserTest.test_unused_param.<locals>.<lambda>s&*..rrF)r(unusedkiTr)	in_parser	Py_UNUSED)
rwr)r1valuesrrrsimple_declarationrassertNotIn)rrEsigrHrtparamr(rr6declparser_declrs           @rtest_unused_paramz"ClinicParserTest.test_unused_params

		
q!.U+E*D)t,	
	;E <<>LD&47
;J  2++e+<MM+t4$$[$7 22T2B  k:
;
;	;
;
;s
0BC==D	c|t}t|}tj|}|j	||Sr)rBr
rr(rw)rtextrrrEs     rrwzClinicParserTest.parse8s1L1T"Urc|j|}|j}|jt||t	|dt
jsJt	||t
jsJ||S)Nr)rwr)rr0
isinstancerModuleFunction)rrrrrErs      rrzClinicParserTest.parse_function?sf

4 Q!45!A$

..!N+V__==  rc|jttjd|jttjdd}tj5}|jt5tjdddddddddj}|j||y#1swY4xYw#1swY8xYw)Nz
<Unspecified>z<Null>z>Error in file "clown.txt" on line 69:
The igloos are melting!
zThe igloos are melting!z	clown.txtE)r@line_number)rrbrunspecifiedNULLrrrrfailr)rrractuals    rtest_scaffoldingz!ClinicParserTest.test_scaffoldingGsf001?Cfkk*H5
(	
$
$
&	B&"":.
B5%0bB
B	B"*	
B
B	B	Bs$)C?CCC	CC N)r{rO)<r r!r"r$r+r-r7r;r=rCrIrMrQrUrYr[r_rcrjrmrurrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrwrrr$rrr r s(3
	,,
A*
*,,
:,:
(
0
<V	%
%(
TL
\!,& $ $ $ " "
 	6
6  D( 
    ,
( .%:@ 
@: 
222 2
'
22$;L!+rr ceZdZdZej
j
ejddZ	dddZ
dZdZd	Z
d
ZdZdZd
ZdZdZdZdZdZdZdZy)ClinicExternalTestNrz	clinic.pyT)expect_successctjtjd|jg|ddtj
tj
5}|j
|rD|jr8|jdjg|j|j|jj}|jj}|j|d|cdddS#1swYyxYw)Nz-Xutf8utf-8r)encodingbufsizerstderrrD)
subprocessPopenr`
executable	clinic_pyPIPEwait
returncoderjoinrrreadr)rrr)procrrs      r_do_testzClinicExternalTest._do_test]s



^^Xt~~==????
	IIK$//		"''">DKK">$++">?@[[%%'F[[%%'FVR(			s
BC<<Dc |j|Srrrr)s  rrz!ClinicExternalTest.expect_successnst}}d##rc&|j|ddiS)NrFrrs  rryz!ClinicExternalTest.expect_failureqst}}d9599rcd}tj|}t|dd5}|j}ddd|j	t
t|jddt|}|j|dttdd5}|j}ddd|jy#1swYxYw#1swY(xYw)Nz
clinic.test.crrr-f-orD)	rfindfileopenr
addCleanupr	rrr)rCLINIC_TESTsourcer
orig_contentsrnew_contentss       r
test_externalz ClinicExternalTest.test_externalts%!!+.
&#
0	%AFFHM	%	
'!!$ff=b!
&#
0	$A668L	$	
}5	%	%	$	$sCC
C

Cctd}tj5}tjj|d}t
|dd5}|j|dddtj|j}|j|tj|j}ddd|jy#1swYsxYw#1swY(xYw)Nz
            /*[clinic input]
            [clinic start generated code]*/
            /*[clinic end generated code: output=da39a3ee5e6b4b0d input=da39a3ee5e6b4b0d]*/
        rrwrr)r
rtemp_dirr'r/rrwritestatst_mtime_nsrr)rcodetmp_dirrr	pre_mtime
post_mtimes       rtest_no_changez!ClinicExternalTest.test_no_changes




!	1Wgx0Bb#0
A

//I#00J
	1	
J/

	1	1s$/CC!ACC	CC(c~td}td}tj5}tjj|d}t
|dd5}|j|ddd|j|}|j|j||jd|}|j|dd	}t
|d
d5}|j}ddd|jj|dddy#1swYxYw#1swY>xYw#1swYyxYw)NaA
            /*[clinic input]
            output preset block
            module test
            test.fn
                a: int
            [clinic start generated code]*/

            const char *hand_edited = "output block is overwritten";
            /*[clinic end generated code: output=bogus input=bogus]*/
        z
            Checksum mismatch!
            Expected: bogus
            Computed: 2ed19
            Suggested fix: remove all generated code including the end marker,
            or use the '-f' option.
        rrr%rrrrDzP/*[clinic end generated code: output=2124c291eb067d76 input=9543a8d2da235301]*/
r)r
rr&r'r/rrr'ryrendswithrrr)	r
invalid_inputfail_msgr+rrrchecksum	generateds	         rtest_cli_forcez!ClinicExternalTest.test_cli_forces*
 






!	:Wgx0Bb#0
'A
&
'
%%b)COOCLL23%%dB/CS"%F
b#0
%AFFH	
%OOI..x89'	:	:
'
'
%
%#	:	:s</D3D,A-D3D'*(D3D$	 D3'D0	,D33D<ctd}d}d}d}d}tj5}||||||||tjj|d}tj|5}|||||j
dd	d
|}	ddd|D]O}
|j|
5tjj||
}|j|	dddQ|D]O}
|j|
5tjj||
}|j|	dddQ|D]O}
|j|
5tjj||
}|j|	dddQ	dddy#1swYxYw#1swYxYw#1swYxYw#1swYxYw#1swYyxYw)NzR
            /*[clinic input]
            [clinic start generated code]*/
        pass)zfile1.czfile2.c)zfile1.pyzfile2.pyc|D]J}tjj||}t|dd5}|j	|dddLy#1swYWxYw)Nr%rr)r'r/rrr')filessrcdirr*rr/rs      rcreate_filesz6ClinicExternalTest.test_cli_make.<locals>.create_filessX
"ww||FB/$g6"!GGDM""
"""sAA		externals)r/-v--make--srcdirrs)
r
rr&r'r/rrrrr)rc_codepy_codec_filespy_filesr;r+ext_pathr<rr@r/s            r
test_cli_makez ClinicExternalTest.test_cli_makes
&)	"


!	0W'627G4ww||G[9H##2
OiWi8))$*gN	
O$
-\\8\4-77<<:DMM$,--
-%
0\\8\4077<<:D$$T3/00
0
$
0\\8\4077<<(;D$$T3/00
0/	0	0
O
O--00
001	0	0slAG4F!G23F.%!G3F;9!G3G
G!F+	&G.F83G;GGGGGcbtj5}tjj	|d}t|dd5}|j
dddd|jd|}|j|j|dddy#1swYDxYw#1swYyxYw)Nrrr%rrrDr=)
rr&r'r/rrr'rrrv)rr+rrrs     rtest_cli_verbosez#ClinicExternalTest.test_cli_verboses



!	.Wgx0Bb#0
A
%%dB/CSYY["-	.	.

	.	.s#/B%B:B%B"	B%%B.cJ|jd}|jd|y)Nz-husage: clinic.py)rrrs  r
test_cli_helpz ClinicExternalTest.test_cli_helps!!!$'

(#.rc	$td}d}td}|jd}|j|j|||j|j	|||j|}|j
|}|jd}t||D]W\}}|j}|j|5|j|j|d|d|dddYy#1swYdxYw)	Nz
            Legacy converters:
                B C D L O S U Y Z Z#
                b c d f h i l p s s# s* u u# w* y y# y* z z# z*

            Converters:
        )boolbytechardefining_classdoublefildesfloatintlong	long_longobject	Py_buffer
Py_complex
Py_ssize_t
Py_UNICODEPyByteArrayObject
PyBytesObjectrshortsize_tslice_indexstrunicode
unsigned_charunsigned_int
unsigned_longunsigned_long_longunsigned_shorta
            Return converters:
                bool()
                double()
                float()
                init()
                int()
                long()
                Py_ssize_t()
                size_t()
                unsigned_int()
                unsigned_long()

            All converters also accept (c_default=None, py_default=None, annotation=None).
            All return converters also accept (py_default=None).
        --convertersrrzexpected converter z, got )r
rrrr0removeprefixremovesuffixrziprr)rpreludeexpected_convertersfinalerlinesr3lines        rtest_cli_convertersz&ClinicExternalTest.test_cli_converterss

<
 !!.1
	
w/5V,c2w'v&		$"#6>	OIt;;=D	2
OOI.))fTHE

	

s(DD	cP|jdd}d}|j||y)NrgrrzGUsage error: can't specify --converters and a filename at the same timerrs   r%test_cli_fail_converters_and_filenamez8ClinicExternalTest.test_cli_fail_converters_and_filename@s.!!.(;
.		


c3rcH|j}|jd|y)NrIrrs  rtest_cli_fail_no_filenamez,ClinicExternalTest.test_cli_fail_no_filenameHs!!#

(#.rcT|jdddd}d}|j||y)Nrout.czinput.czmoreinput.cz1Usage error: can't use -o with multiple filenamesrrs   r'test_cli_fail_output_and_multiple_filesz:ClinicExternalTest.test_cli_fail_output_and_multiple_filesLs+!!$MJA

c3rcdD]D}|j|5|jdg|}d}|j||dddFy#1swYQxYw)N))rrv)z
filename.c)optsr>z2Usage error: can't use -o or filenames with --make)rryr)rryrrs    r)test_cli_fail_filename_or_output_and_makez<ClinicExternalTest.test_cli_fail_filename_or_output_and_makeQsc4	(D4(
()d))(:T:J

c3'
(
(	(
(
((AA	cR|jddd}d}|j||y)Nr>r?rDz3Usage error: --srcdir must not be empty with --makerrs   r!test_cli_fail_make_without_srcdirz4ClinicExternalTest.test_cli_fail_make_without_srcdirXs)!!(J;C

c3r)r r!r"r#r'r/rrtoolsdirrrrryr#r.r5rErGrJrprrrtrwrzr}r$rrrrYsuGZ00(KHI-1"$:6 0(&:P)0V./GR / 
( rrz_testclinic is missingceZdZej	deeDdZdZdZ	dZ
dZdZdZ
d	Zd
ZdZdZd
ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!dZ"dZ#dZ$d Z%d!Z&d"Z'd#Z(d$Z)d%Z*d&Z+d'Z,d(Z-d)Z.d*Z/d+Z0d,Z1d-Z2d.Z3d/Z4d0Z5d1Z6d2Z7d3Z8d4Z9y5)6ClinicFunctionalTestc#bK|]'}|jdr|tt|f)yw)test_N)rgetattr	ac_tester).0r(s  r	<genexpr>zClinicFunctionalTest.<genexpr>es1L$//'2J79d34Ls-/cf|jt5tjddd|j	tjddd|j	tjgdgdf|j	tjddy#1swY}xYw)NrOr{rOr{zwhatever class)rON)r	TypeErrorrobjects_converterrr9s rtest_objects_converterz+ClinicFunctionalTest.test_objects_converterhs


y
)	*'')	*44Q:FC44R9IJRQaLbc44Q7C		*	*sB''B0c|jt5tjdddd|j	tjddy#1swY/xYw)NrOBytesObject)r)rrrbytes_object_converterrr9s rtest_bytes_object_converterz0ClinicFunctionalTest.test_bytes_object_converterosO


y
)	0,,Q/	099.IK\]	0	0AA#c|jt5tjddddt	d}|jtj||fy#1swY;xYw)NrOsByteArrayObject)rrrbyte_array_object_converter	bytearrayr)rbyte_arrs  r test_byte_array_object_converterz5ClinicFunctionalTest.test_byte_array_object_converterts[


y
)	511!4	5/0>>xH8+V	5	5sA&&A/c|jt5tjdddd|j	tjddy#1swY/xYw)NrOra)ra)rrrunicode_converterrr9s rtest_unicode_converterz+ClinicFunctionalTest.test_unicode_converterzsN


y
)	+''*	+44Y?N	+	+rcn|jt5tjdddddd|j	tjd|j	tjdgdd|j	tjddd	id
dy#1swY~xYw)NFz	not a int)TTTrD)FFT)z	not emptyrOr{r)TTF)rrrbool_converterrr9s rtest_bool_converterz(ClinicFunctionalTest.test_bool_converters


y
)	@$$UE;?	@1135GH11"b!<>RS11.1a&!LNab		@	@sB++B4c|jt5tjdddd|jt5tjddddgd}t	d|D}|jtj|gd}t	d|D}|jtj||y#1swYxYw#1swYxYw)NrOsab)A	

"'?\c32K|]}t|ywrordrrs  rrz;ClinicFunctionalTest.test_char_converter.<locals>.<genexpr>/AQ/)1234567890abcdc32K|]}t|ywrrrs  rrz;ClinicFunctionalTest.test_char_converter.<locals>.<genexpr>rr)rrrchar_convertertupler)rcharsrs   rtest_char_converterz(ClinicFunctionalTest.test_char_converters


y
)	($$Q'	(


y
)	,$$U+	,r///113X>d///11598D	(	(	,	,sC	C&C#&C/cddlm}|jt5t	j
dddd|jt5t	j
|dzddd|jt5t	j
d|dzddd|jt5t	j
gddd|jt	j
d|jt	j
dd|dzd|jt	j
dd|dzdzdzd	y#1swY)xYw#1swYxYw#1swYxYw#1swYxYw)
Nr)	UCHAR_MAXrrO"8rrrrE{rrr)	_testcapirr
OverflowErrorrunsigned_char_converterrr)rrs  rtest_unsigned_char_converterz1ClinicFunctionalTest.test_unsigned_char_convertersD'


}
-	2--b1	2


}
-	=--i!m<	=


}
-	@--aQ?	@


y
)	2--b1	2::<lK::1aQOQZ[::1a)a-STATWZAZ[]hi	2	2	=	=	@	@	2	2/EE&E2<E>E#&E/2E;>Fc.ddlm}m}|jt5tj|dz
ddd|jt5tj|dzddd|jt5tjgddd|jtjdd|jtjddy#1swYxYw#1swYxYw#1swYlxYw)Nr)SHRT_MINSHRT_MAXrO.r)r)	rrrrrrshort_converterrr)rrrs   rtest_short_converterz)ClinicFunctionalTest.test_short_converters0


}
-	4%%hl3	4


}
-	4%%hl3	4


y
)	*%%b)	*22598D2248'B	4	4	4	4	*	*s#C3C?
D3C<?DDcddlm}|jt5t	j
dddd|jt5t	j
|dzddd|jt5t	j
d|dzddd|jt5t	j
gddd|jt	j
d|jt	j
dd|dzd|jt	j
dd|dzdzdzd	y#1swY)xYw#1swYxYw#1swYxYw#1swYxYw)
Nr)	USHRT_MAXrrOrrrErr)	rrrrrunsigned_short_converterrrr)rrs  rtest_unsigned_short_converterz2ClinicFunctionalTest.test_unsigned_short_convertersD'


z
*	3..r2	3


}
-	>..y1}=	>


}
-	A..q)a-@	A


y
)	3..r2	3;;=|L;;Aq)a-PR[\;;Aq9q=TUBUX[B[\^ij	3	3	>	>	A	A	3	3rcddlm}m}|jt5tj|dz
ddd|jt5tj|dzddd|jt5tjdddddd|jt5tjgddd|jtjd|jtjdddddtdfy#1swYxYw#1swYxYw#1swYxYw#1swYxYw)Nr)INT_MININT_MAXrOr{rE)rr-3)
rrrrrrr4rrr)rrrs   rtest_int_converterz'ClinicFunctionalTest.test_int_converters.


}
-	1##GaK0	1


}
-	1##GaK0	1


y
)	-##Aq!,	-


y
)	(##B'	(002LA00As;aCH=MN	1	1	1	1	-	-	(	(s/D5E
E
?E5D>E

EE"cddlm}|jt5t	j
dddd|jt5t	j
|dzddd|jt5t	j
d|dzddd|jt5t	j
gddd|jt	j
d|jt	j
dd|dzd|jt	j
dd|dzdzdzd	y#1swY)xYw#1swYxYw#1swYxYw#1swYxYw)
Nr)UINT_MAXrrOrrrErr)	rrrrrunsigned_int_converterrrr)rrs  rtest_unsigned_int_converterz0ClinicFunctionalTest.test_unsigned_int_converters?&


z
*	1,,R0	1


}
-	;,,X\:	;


}
-	>,,Q1=	>


y
)	1,,R0	199;\J99!Q1MyY99!QAQR@RUX@XY[fg	1	1	;	;	>	>	1	1rc,ddlm}m}|jt5tj|dz
ddd|jt5tj|dzddd|jt5tjgddd|jtjd|jtjddy#1swYxYw#1swYxYw#1swYkxYw)Nr)LONG_MINLONG_MAXrOrrr)	rrrrrrlong_converterrr)rrrs   rtest_long_converterz(ClinicFunctionalTest.test_long_converters0


}
-	3$$X\2	3


}
-	3$$X\2	3


y
)	)$$R(	)113U;11%8(C	3	3	3	3	)	)#C2C>
D
2C;>D
Dcddlm}|jt5t	j
dddd|jt5t	j
|dzddd|jt5t	j
d|dzddd|jt5t	j
gddd|jt	j
d|jt	j
dd|dzd|jt	j
dd|dzdzdzd	y#1swY)xYw#1swYxYw#1swYxYw#1swYxYw)
Nr)	ULONG_MAXrrOrrrErr)	rrrrrunsigned_long_converterrrr)rrs  rtest_unsigned_long_converterz1ClinicFunctionalTest.test_unsigned_long_convertersD'


z
*	2--b1	2


}
-	=--i!m<	=


}
-	@--aQ?	@


y
)	2--b1	2::<lK::1aQOQZ[::1a)a-STATWZAZ[]hi	2	2	=	=	@	@	2	2rc,ddlm}m}|jt5tj|dz
ddd|jt5tj|dzddd|jt5tjgddd|jtjd|jtjddy#1swYxYw#1swYxYw#1swYkxYw)Nr)	LLONG_MIN	LLONG_MAXrOrrr)	rrrrrrlong_long_converterrr)rrrs   rtest_long_long_converterz-ClinicFunctionalTest.test_long_long_converters2


}
-	9)))a-8	9


}
-	9)))a-8	9


y
)	.))"-	.668%@66u=xH	9	9	9	9	.	.rcddlm}|jt5t	j
dddd|jt5t	j
|dzddd|jt5t	j
d|dzddd|jt5t	j
gddd|jt	j
d|jt	j
dd|dzd|jt	j
dd|dzdzdzd	y#1swY)xYw#1swYxYw#1swYxYw#1swYxYw)
Nr)
ULLONG_MAXrrOrrrErr)	rrrrrunsigned_long_long_converterrrr)rrs  r!test_unsigned_long_long_converterz6ClinicFunctionalTest.test_unsigned_long_long_convertersJ(


z
*	72226	7


}
-	C22:>B	C


}
-	F221j1nE	F


y
)	72226	7??A<P??1jSTnUW`a??1zTU~YZFZ]`F`acno	7	7	C	C	F	F	7	7rc0ddlm}m}|jt5tj|dz
ddd|jt5tj|dzddd|jt5tjgddd|jtjd|jtjddddy#1swYxYw#1swYxYw#1swYmxYw)NrPY_SSIZE_T_MINPY_SSIZE_T_MAXrOrr{rOr{r)	rrrrrrpy_ssize_t_converterrrrrrs   rtest_py_ssize_t_converterz.ClinicFunctionalTest.test_py_ssize_t_converters<


}
-	?**>A+=>	?


}
-	?**>A+=>	?


y
)	/**2.	/779<H771dCZP	?	?	?	?	/	/s#C4D
D4C=D	Dcddlm}m}|jt5tjgddd|jtjd|jtjdddd|jtj||dz|dz|||f|jtj||dz
|dz
|||fy#1swYxYw)NrrrrOr{ri)rrrrrrslice_index_converterrrs   rtest_slice_index_converterz/ClinicFunctionalTest.test_slice_index_converters<


y
)	0++B/	088:LI88AtDjQ88Z[I[]knr]rs(..I	K88Z[I[]knr]rs(..I	K
	0	0sC((C1cH|jt5tjdddd|jt5tjgddd|jtjdy#1swYaxYw#1swY:xYw)Nrr)rrrsize_t_converterrrr9s rtest_size_t_converterz*ClinicFunctionalTest.test_size_t_converters}


z
*	+&&r*	+


y
)	+&&r*	+335u=		+	+	+	+sB	BBB!c|jt5tjgddd|j	tjd|j	tjddy#1swYSxYwN)g)@࿩r
)rrrfloat_converterrr9s rtest_float_converterz)ClinicFunctionalTest.test_float_converter#sg


y
)	*%%b)	*224g>2248'B	*	*A>>Bc|jt5tjgddd|j	tjd|j	tjddy#1swYSxYwr)rrrdouble_converterrr9s rtest_double_converterz*ClinicFunctionalTest.test_double_converter)sg


y
)	+&&r*	+335w?33D97C	+	+rc|jt5tjgddd|j	tjtddtddf|j	tjtdtdf|j	tjdd|j	tjddy#1swYxYw)NrOr{z-1-2jr
r
)r)rrrpy_complex_converterrcomplexr9s rtest_py_complex_converterz.ClinicFunctionalTest.test_py_complex_converter/s


y
)	/**2.	/771
FQRTUHXY778HIGT[L\K^_77=wG77;UC	/	/sC11C:cp|jt5tjdddd|jt5tjdddddd|jt5tjdddddd|jtjdddd|jtjdddd|jtjddd	d
y#1swYxYw#1swYxYw#1swYxYw)NrOrrrbbrrrccrrr)rrrrGrrr9s rtest_str_converterz'ClinicFunctionalTest.test_str_converter7s


y
)	'##A&	'


y
)	3##Cc2	3


z
*	7##C#6	700dC@/R00dDA?S00dFCEWX	'	'	3	3	7	7s#D	D >D,D D),D5c
|jt5tjdddd|j	tjdddd|jt5tjdddddd|j	tjddtt
dgd|j	tjddtt
ddt
dgd	|j	tjddd
d	y#1swY
xYw#1swYxYw)NrOrrrrrrrrscc)rrrstr_converter_encodingrrrr9s rtest_str_converter_encodingz0ClinicFunctionalTest.test_str_converter_encodingBs


y
)	0,,Q/	099#sCH/Z


y
)	@,,S'3?	@99#tYPSTWPXzEZ[]lm99#tYPSTWPXZ[]`ad]eOfEgh-	/99#tYOQef	0	0	@	@sD70E7EE
c	|jt5tjddddd|j	tjdtgddy#1swY;xYw)NrrabcrOr{rE)sabcs)rrrpy_buffer_converterrrr9s rtest_py_buffer_converterz-ClinicFunctionalTest.test_py_buffer_converterMsX


y
)	4))#s3	466ui	>RSUno	4	4sA''A0c|jtjddd|jtjddd|jtjdddy)NrOr{rrr)rrkeywordsr9s r
test_keywordsz"ClinicFunctionalTest.test_keywordsRsY++Aq16:++A3V<++a15v>rc |jt5tjddddd|j	tjddd|j	tjdddy#1swYXxYw)NrOr{r(rr)rrrkeywords_kwonlyrr9s rtest_keywords_kwonlyz)ClinicFunctionalTest.test_keywords_kwonlyWso


y
)	,%%a+	,221:FC22Q!<fE	,	,sBB
c$|jtjdd|jtjddd|jtjdddd|jtjddd|jtjdddd|jtjdd	d
|jtjddddy)NrOrONNr{rOr{NrEr$r(rrrrONrEr)rrkeywords_optr9s rtest_keywords_optz&ClinicFunctionalTest.test_keywords_opt]s//2OD//15|D//1a8)D//Q7F//1:IF//!q9<H//!qA>	JrcZ|jtjdd|jtjddd|jt5tjdddddd|jtjddd|jtjdddd|jtjdd	d
|jtjddddd
y#1swYxYw)NrOrONNNr{rOr{NNrEr(r1rOr{rENr2)rONrENrrrr^rOr{rEr:)rrkeywords_opt_kwonlyrrr9s rtest_keywords_opt_kwonlyz-ClinicFunctionalTest.test_keywords_opt_kwonlyfs66q9;PQ66q!<>PQ


y
)	3))!Q2	366qA>@RS66q!qA?S66a@BTU66a1JLY	3	3s!D!!D*c|jtjdd|jt5tjddddd|jtjddd|jtjddd|jtjddd	d
y#1swYxYw)NrOr/r{r(r0rEr2r3rr$)rrkeywords_kwonly_optrrr9s rtest_keywords_kwonly_optz-ClinicFunctionalTest.test_keywords_kwonly_optps66q9?K


y
)	0))!Q/	066qA>M66a@,O66a1EyQ		0	0sCCc|jt5tjdddd|jt5tjddddd|j	tjddd|j	tjdddy#1swYxYw#1swYcxYw)NrOr{rrr()rrrposonly_keywordsrr9s rtest_posonly_keywordsz*ClinicFunctionalTest.test_posonly_keywordsxs


y
)	*&&q)	*


y
)	1&&a0	133Aq96B33A;VD	*	*	1	1sB7	C7CCc|jt5tjdddd|jt5tjddddd|jt5tjddddd|j	tjdddy#1swYxYw#1swYrxYw#1swYIxYw)NrOr{rr(r)rrrposonly_kwonlyrr9s rtest_posonly_kwonlyz(ClinicFunctionalTest.test_posonly_kwonlys


y
)	($$Q'	(


y
)	+$$Q*	+


y
)	/$$qA.	/11!q96B
	(	(	+	+	/	/s#C	C=CCCC&c(|jt5tjdddd|jt5tjdddddd|jt5tjdddddd|j	tjdddd|j	tjddddy#1swYxYw#1swYxYw#1swYrxYw)NrOr{rErr1r$rr)rrrposonly_keywords_kwonlyrr9s rtest_posonly_keywords_kwonlyz1ClinicFunctionalTest.test_posonly_keywords_kwonlys


y
)	1--a0	1


y
)	7--aA6	7


y
)	=--Q!<	=::1a1EyQ::1QGS	1	1	7	7	=	=s#C0	C<>D0C9<DDc|jt5tjdddd|j	tjddd|j	tjdddd|j	tjddddd|j	tjddd|j	tjddd	d|jt5tjdddd
ddd|j	tjdddddy#1swY/xYw#1swY@xYw)NrOr{r8rEr9r:r<r(r1r;rrr^)rrrposonly_keywords_optrr9s rtest_posonly_keywords_optz.ClinicFunctionalTest.test_posonly_keywords_opts&


y
)	.**1-	.771=?QR771a@/R771aC\R77Q?AST771BOT


y
)	?**Q!qA>	?77Q!qI<X	.	.	?	?sE
E&E#&E/c|jtjdd|jtjddd|jtjdddd|jtjddddd|jt5tjdd	ddd|jtjddd
d|jtjddddd|jt5tjdddddddy#1swYxYw#1swYyxYw)
NrOr7r{r8rEr9r:r<r(r1rr^r;)rrposonly_opt_keywords_optrrr9s rtest_posonly_opt_keywords_optz2ClinicFunctionalTest.test_posonly_opt_keywords_opts0;;A>@UV;;AqACUV;;Aq!DoV;;Aq!QGV


y
)	7..qA6	7;;AqAFX;;AqAK\Z


y
)	C..a1B	C	C		7	7	C	Cs0E6E%E"%E.cx|jt5tjdddd|jt5tjddddd|j	tjddd|j	tjdddd|j	tjdddd	d
|jt5tjdddddddy#1swYxYw#1swYxYw#1swYyxYw)NrOr{r(r8rErIr9r:rMr<r;)rrrposonly_kwonly_optrr9s rtest_posonly_kwonly_optz,ClinicFunctionalTest.test_posonly_kwonly_opts


y
)	,((+	,


y
)	/((A.	/55a1=?QR55a1BOT55a1QGV


y
)	=((1Q!<	=	=	,	,	/	/
	=	=s#D	D$5D0D!$D-0D9c@|jtjdd|jtjddd|jt5tjdddddd|jt5tjddddd|jtjdddd|jtjdddd	
dy#1swYxYw#1swYgxYw)NrOr7r{r8rEr(r1r9r:rQr<)rrposonly_opt_kwonly_optrrr9s rtest_posonly_opt_kwonly_optz0ClinicFunctionalTest.test_posonly_opt_kwonly_opts99!<>ST99!Q?AST


y
)	6,,Q15	6


y
)	5,,Q!4	599!Q!DoV99!Q!qI<X	6	6	5	5s!DDDDc	|jt5tjdddd|jt5tjddddd|jt5tjddddd|jt5tjdddddd|jt5tjdddddd|j	tjdddd|j	tjdddd|j	tjdddd	
d|j	tjdddd	d
dy#1swYxYw#1swY[xYw#1swY3xYw#1swYxYw#1swYxYw)NrOr{r(rErr1rOr{rENNrIr:rQrOr{rEr:Nrrr^erOr{rEr:r)rrrposonly_keywords_kwonly_optrr9s r test_posonly_keywords_kwonly_optz5ClinicFunctionalTest.test_posonly_keywords_kwonly_opts


y
)	511!4	5


y
)	811!Q7	8


y
)	:11!q9	:


y
)	;11!Q:	;


y
)	A11Aa@	A>>q!qIK`a>>qAKMbc>>q!qANPbc>>q!qAQRSUde	5	5	8	8	:	:	;	;	A	As;F,	F9=G2G'G ,F69GGG G)c	|jt5tjdddd|j	tjddd|j	tjddd|jt5tjddddddd|jt5tjddddd|j	tjdddd	|j	tjddd
d	|j	tjddddd|j	tjdddd
d|j	tjdddddd|j	tjddddddy#1swYxYw#1swYCxYw#1swYxYw)NrOr{)rOr{NNNr(rEr:rr1r[rIr^r\rQrr^r^r_r])rrrposonly_keywords_opt_kwonly_optrr9s r$test_posonly_keywords_opt_kwonly_optz9ClinicFunctionalTest.test_posonly_keywords_opt_kwonly_opts


y
)	955a8	9BB1aHJbcBB1JLde


y
)	B55aAqA	B


y
)	@55Q?	@BB1a1MOdeBB1QOQfgBB1aaPRdeBB1a1PQRTfgBB1aaSTUWfgBB1a1PQUVWYhi	9	9	B	B	@	@s#G#G0G=#G-0G:=Hc|jtjdd|jtjddd|jt5tjddddd|jtjdddd|jtjdddd|jtjdddd	
d|jtjdddd	d|jt5tjdddd	dddy#1swYxYw#1swYyxYw)
NrOr7r{r8r(rEr9r1r:rcr<rQ)rr#posonly_opt_keywords_opt_kwonly_optrrr9s r(test_posonly_opt_keywords_opt_kwonly_optz=ClinicFunctionalTest.test_posonly_opt_keywords_opt_kwonly_opts:FFqIK`aFFq!LN`a


y
)	B99!qA	BFFq!QOQ`aFFq!qQSbcFFq!QRSTVbcFFq!qTUVXde


y
)	F99!Q1E	F	F
	B	B	F	Fs!E7E%E"%E.cJ|jt5tjddd|jt5tjdddd|j	tjddy#1swYcxYw#1swY<xYw)NrOrrO)rrrkeyword_only_parameterrr9s rtest_keyword_only_parameterz0ClinicFunctionalTest.test_keyword_only_parameters}


y
)	/,,.	/


y
)	0,,Q/	099A>E		/	/	0	0sB
B
BB"cj|jt5tjddd|j	tjddd|j	tjddd|j	tjdddddy#1swYxYw)NrOr{)rOr{r$r(rEr:)rOr{)rEr:)rrrposonly_varargrr9s rtest_posonly_varargz(ClinicFunctionalTest.test_posonly_varargs


y
)	'$$&	'11!Q7D11!q9:F11!Q1=~N		'	'sB))B2cR|jt5tjddd|jt5tjddddd|j	tjdddddy#1swYgxYw#1swY>xYwNrOr{r(rEr:)rOr{rEr:)rrrvararg_and_posonlyrr9s rtest_vararg_and_posonlyz,ClinicFunctionalTest.test_vararg_and_posonlys


y
)	+((*	+


y
)	1((a0	155aAqA>R		+	+	1	1BBBB&cR|jt5tjddd|jt5tjddddd|j	tjdddddy#1swYgxYw#1swY>xYwrr)rrrvarargrr9s rtest_varargz ClinicFunctionalTest.test_varargs


y
)		


y
)	%Q!$	%))!Q15~F				%	%rvc	r|jt5tjddd|j	tjddd|j	tjddddd|j	tjddddd	d
y#1swYxYw)NrOFr()rOr$Fr{rEr:)rOrsFT)rOrsT)rrrvararg_with_defaultrr9s rtest_vararg_with_defaultz-ClinicFunctionalTest.test_vararg_with_defaults


y
)	,))+	,66qEBNS66q!QBDYZ66q!QTJL`a		,	,sB--B6c	|jtjd|jtjdd|jtjddd|jtjddddd	|jtjddddd
dy)N)r$Nr{r()r$r{rO)rkr{rEr:)r<Nr)r<r)rrvararg_with_only_defaultsr9s rtest_vararg_with_only_defaultsz3ClinicFunctionalTest.test_vararg_with_only_defaultss<<>
K<<qA7K<<Q!DjQ<<Q1aHJ^_<<Q1a1MO`arc:tjddddddy)NrOr{rEr:r)kw1kw2)rgh_32092_oobr9s rtest_gh_32092_oobz&ClinicFunctionalTest.test_gh_32092_oobsq!Qqa8rc2tjdddy)NrOr{rE)rgh_32092_kw_passr9s rtest_gh_32092_kw_passz*ClinicFunctionalTest.test_gh_32092_kw_passs""1a+rcd}tj|}tj|tj|}|j	||y)Nz5*A unique string is not referenced by anywhere else.*)r`getrefcountrgh_99233_refcountr)rargarg_refcount_originarg_refcount_afters    rtest_gh_99233_refcountz+ClinicFunctionalTest.test_gh_99233_refcountsEE!ooc2##C( __S1,.@Arcd}|jt|5tjdddddy#1swYyxYw)NzVgh_99240_double_free\(\) argument 2 must be encoded string without null bytes, not strrzb)rrrgh_99240_double_free)rexpected_errors  rtest_gh_99240_double_freez.ClinicFunctionalTest.test_gh_99240_double_free#s<r

#
#I~
>	7**36	7	7	7s	9Acd}|jtd5tj|ddd|jtd5tj|dddy#1swY>xYw#1swYyxYw)Nrclone_f1clone_f2)rrrrr)r
incorrect_args  r"test_cloned_func_exception_messagez7ClinicFunctionalTest.test_cloned_func_exception_message(sr


#
#Iz
:	.}-	.

#
#Iz
:	.}-	.	.	.	.	.	.sA,
A8,A58BcdD]D}|j|5tt|}|j||dddFy#1swYQxYw)N)clone_with_conv_f1clone_with_conv_f2r/)rrrr)rr(funcs   r1test_cloned_func_with_converter_exception_messagezFClinicFunctionalTest.test_cloned_func_with_converter_exception_message/sW>	/D4(
/y$/  .
/
/	/
/
/r{N):r r!r"localsupdatedirrrrrrrrrrrrrrrrrrrr
rrrrr!r&r*r-r5r>rArDrGrKrOrSrVrYrarfrirmrpruryr|rrrrrrrr$rrrrcsN
HOOL #ILLD^
WO
c
Ej	CkOh	Dj	Ip	Q	K>CDD	Y	gp
?
FKZRECT
Y
C	=Yf j 
FFOSGbb9,B7
./rrc"eZdZdZdZdZdZy)PermutationTestsz#Test permutation support functions.cd}ttgd}ttj|}|j||y)N)r$)rE)r{rEr$r$)rrjrrpermute_left_option_groupsrrrdatars    rtest_permute_left_option_groupsz0PermutationTests.test_permute_left_option_groups9s>
C	N#v88>?*rcd}ttgd}ttj|}|j||y)N)r$rkrr$r$)rrjrrpermute_right_option_groupsrrs    r test_permute_right_option_groupsz1PermutationTests.test_permute_right_option_groupsDs>
C	N#v99$?@*rc	ddddd}ddddd}dddd	d}ddd
dd}dddd
d}ddddd}ddddd}ddddd}ddddd}	|||||||||	f	}
|
D]f}|jdi|5|j\}}
}}tj||
|}t	|}|j||dddhy#1swYsxYw)Nr$)r$)leftrequiredrightrr(r1)r(rIrIrc)rIrMrd)rIrM)rrr^r^r)r(r)rIrr)r1rIr)r(rrrQ)r^r)rQrMr;)rrrr^r^)rrrr^r^r)rrrrrr)remptynoleft1noleft2noleft3noright1noright2noright3
leftandright1
leftandright2rtrrrrrpermutationsrs                  rtest_permute_optional_groupsz-PermutationTests.test_permute_optional_groupsOsXB

FV
K&
K*


R
FR


J	


Wgh=	
	3F''
328--//hx%==dHeT|,  2	
3
3	3
3
3s
"A
B77C	N)r r!r"__doc__rrrr$rrrr6s-	+	+N3rrc<eZdZdZdZdZdZdZdZdZ	dZ
y	)
FormatHelperTestscd}|D]H\}}|j||5tj|}|j||dddJy#1swYUxYw)N)	)a
br)za
b
r)za
b r)z
a
b

r)z

a
b

r)z

a

b

za

b) a
br)z a
b r)z
 
 
 a
b 
 
 r)rnr)rr&strip_leading_and_trailing_blank_linesr)rrtrnrrs     r+test_strip_leading_and_trailing_blank_linesz=FormatHelperTests.test_strip_leading_and_trailing_blank_linessh
 '	0OE8EH=
0CCEJ  h/
0
0	0
0
0(AA	cd}d}d}d}|||d}|jD]I\}}|j|5tj||}|j	||dddKy#1swYVxYw)Nz;
            one
            two
            three
        z
one
two
threez    one
    two
    threez%        one
        two
        three)rr:)indent)itemsrrnormalize_snippetr)	rsnippetzero_indentfour_indenteight_indentexpected_outputsrrrs	         rtest_normalize_snippetz(FormatHelperTests.test_normalize_snippets
	
	
	
 +{|L 0 6 6 8	3FHV,
311'&I  2
3
3	3
3
3s*A,,A5	cttj}|j|jd|j	d|j|jd|j|jd|j	d|j|jd|j|jd|j	d|j	d|j|jd|j|jdy)NrDrrrr^cd)rtext_accumulatorrrappend)raccs  rtest_accumulatorz"FormatHelperTests.test_accumulators%%'r*

3s+r*

3s+r*

3

3t,r*rcd}|D]H\}}|j||5tj|}|j||dddJy#1swYUxYw)N))r#r#)z\abcz\\abc)z\a\bcz\\a\\bc)z\a\\bcz	\\a\\\\bc)z"abc"z\"abc\")z'a'z\'a\')ror)rrquoted_for_c_stringr)rrtrorrs     rtest_quoted_for_c_stringz*FormatHelperTests.test_quoted_for_c_stringsh
&	0ND(4(;
0006  h/
0
0	0
0
0rcZd}d}tj|}|j||y)Nza 
b
 c
 d 
z
a
b
 c
 d
)rrstrip_linesrrrnrrs    rtest_rstrip_linesz#FormatHelperTests.test_rstrip_liness8
	
	!!%(h'rcZd}d}tj|}|j||y)Nz{}, {a}z{{}}, {{a}})r
format_escaper)rrorrs    rtest_format_escapez$FormatHelperTests.test_format_escapes, ""4(h'rc|jtjdddd}d}tj|d}|j||d}d}tj|d}|j||y)NrDbar)prefixone
twoz
barone
bartwo	
one
two
zbar
barone
bartwo
)rrindent_all_linesrs    rtest_indent_all_linesz'FormatHelperTests.test_indent_all_lines	00EBBG
	

	%%eE:h'
	
	%%eE:h'rc|jtjdddd}d}tj|d}|j||d}d}tj|d}|j||y)NrDfoo)suffixrz
onefoo
twofoorzfoo
onefoo
twofoo
)rrsuffix_all_linesrs    rtest_suffix_all_linesz'FormatHelperTests.test_suffix_all_lines$	rrN)r r!r"rrrrrrrrr$rrrrs*0&3:+
0( ((>(rr__main__)0testrrtest.supportrrrtest.support.os_helperrr	textwrapr
unittestrrUreos.pathr'r	r`skip_if_missingimports_under_toolrr
rr&r-r6rmrrBrprrrrr	r r_testclinicrImportErrorskipIfrrrr mainr$rr<module>rs
%";1

8$"Z""8,! !

G(
G00QQFMM362-8-8`c +c L-*h-*`2&X2&h

##:H:zT
+{T
+nB B J#d"$<=O/8,,O/>O/dg3x((g3Ta())a(HzHMMOcI!!Z2Is'FFFF"!F"