+
    BiW                       ^ RI Ht ^ RIHtHt ^ RIHt ^ RIHtH	t	H
t
 ^ RIHt ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIt]P(                  ! R4       ]P*                  ! R4      ;_uu_ 4        ^ RIt^ R	IHtHtHtHt ^ R
IHtHtHt ^ RIH t H!t!H"t"H#t#H$t$H%t%H&t&H't' ^ RI(t(^ RI)H*t* ^ RI+H,t,H-t- ^ RI.H/t/H0t0 ^ RI1H2t2H3t3 ^ RI4H5t5H6t6 ^ RI7H8t8 ^ RI9H:t:H;t; RRR4       R t<RRRR/R lt=RRRRRR/R lt>R t?R t@ ! R R ]4      tA ! R! R"]4      tB ! R# R$]4      tC ! R% R&]4      tD ! R' R(4      tE ! R) R*4      tF ! R+ R,]4      tG ! R- R.]4      tH ! R/ R0]4      tI ^ RIJtK]P                  ! ]KRJ R14       ! R2 R3]P                  4      4       tN ! R4 R5]P                  4      tO ^ RIPtP]P                  ! ]PRJ R64       ! R7 R8]P                  4      4       tQ ! R9 R:]P                  4      tR ! R; R<]P                  4      tS ! R= R>]P                  4      tT]UR?8X  d   ]P                  ! 4        R# R#   + '       g   i     ELc; i  ]L d    RtK Li ; i  ]L d    RtP Li ; i)@    )partial)support
test_tools)	os_helper)TESTFNunlinkrmtreededent)TestCaseNclinic)ClinicErrorunspecifiedNULLfail)int_converterstr_converterself_converter)ModuleClassFunctionFunctionKind	Parameterpermute_optional_groupspermute_right_option_groupspermute_left_option_groups)	CLanguage)
converterslegacy_converters)return_convertersint_return_converter)BlockBlockParser)BlockPrinterDestination)	DSLParser)
parse_fileClinicc                     a  V 3R  lpV# )c                    <a  VV 3R  lpV# )c                    < S F.  pV P                  VR 7      ;_uu_ 4        S! W4       RRR4       K0  	  R#   + '       g   i     KE  ; i))fnN)subTest)selfr,   	functionstests   & '/usr/lib/python3.14/test/test_clinic.pywrapped+repeat_fn.<locals>.wrapper.<locals>.wrapped&   s7    \\R\((N )(  (((s	   	8A	 )r0   r2   r/   s   f r1   wrapperrepeat_fn.<locals>.wrapper%   s    	#     r4   )r/   r5   s   j r1   	repeat_fnr8   $   s     Nr7   filenameclinic_testslimited_capiFc                 X    \        V 4      p\        W VR 7      p\        RV4      Vn        V# )r9   r;    )r   r(   r#   block_parser)r9   r;   clangcs   $$  r1   _make_clinicrB   -   s+    hEulCA U+ANHr7   linenostripTc                   \        V4      pV'       d   VP                  4       p\        P                  ! V4      pV P	                  \
        V4      ;_uu_ 4       pV! V4       R R R 4       Ve'   V P                  XP                  P                  V4       Ve'   V P                  XP                  P                  V4       XP                  #   + '       g   i     Lp; iN)
r   rD   reescapeassertRaisesRegexr   assertEqual	exceptionr9   rC   )tcparsercodeerrmsgr9   rC   rD   cms   &&&&$$$ r1   _expect_failurerQ   4   s     $<Dzz|YYvF			k6	2	2bt 
3
r||,,h7
r||**F3<< 
3	2s   	C		C	c                 L    V P                   ! 4        V P                  ! V4       R # rF   )clearupdate)r   old_converterss   &&r1   restore_dictrV   L   s    n%r7   c                    V P                  \        \        \        P                  ! 4       4       V P                  \        \        \        P                  ! 4       4       V P                  \        \
        \
        P                  ! 4       4       R # rF   )
addCleanuprV   r   copyr   r    )testcases   &r1   save_restore_convertersr[   Q   s\    j")+&7)..02&7)..02r7   c                   D  a  ] tR t^Zt o RtRRRR/R ltR tR tR tR t	R	 t
R
 tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR t R  t!R! t"R" t#R# t$R$ t%R% t&R& t'R' t(R( t)R) t*R* t+R+ t,R, t-R- t.R. t/R/ t0R0 t1R1 t2R2t3V t4R# )3ClinicWholeFileTestNr9   rC   c          	     J    \        W P                  P                  WW4R 7       R# )r9   rC   N)rQ   r   parse)r.   rawrO   r9   rC   s   &&&$$r1   expect_failure"ClinicWholeFileTest.expect_failure]   s    kk//!)	:r7   c                >    \        V 4       \        R R7      V n        R# )test.cr9   N)r[   rB   r   r.   s   &r1   setUpClinicWholeFileTest.setUpa   s    %"H5r7   c                    R pV P                   P                  V4      P                  4       pV^,          P                  4       pV P	                  VR4       V P                  VR4       R# )z/*[clinic]
foo
[clinic]*/z[clinic]*/[clinic]*/z
[clinic]*/N)r   r`   
splitlinesrstripassertNotEqualrJ   )r.   ra   cookedend_lines   &   r1   test_eolClinicWholeFileTest.test_eole   s[     ,""3'224!9##% 	H&<=<0r7   c                6    R pRpV P                  WR^R7       R# )z
            /*[clinic input]
            [clinic start generated code]*/
            /*[clinic end generated code: foo]*/
        zKMangled Argument Clinic marker line: '/*[clinic end generated code: foo]*/'re   r_   Nrb   r.   ra   errs   &  r1   test_mangled_marker_line,ClinicWholeFileTest.test_mangled_marker_linev   s*    5 	 	CxBr7   c                6    R pRpV P                  WR^R7       R# )z
            /*[clinic input]
            [clinic start generated code]*/
            /*[clinic end generated code: output=0123456789abcdef input=fedcba9876543210]*/
        zKChecksum mismatch! Expected '0123456789abcdef', computed 'da39a3ee5e6b4b0d're   r_   Nrs   rt   s   &  r1   test_checksum_mismatch*ClinicWholeFileTest.test_checksum_mismatch   s&    
JCxBr7   c                6    R pRpV P                  WR^R7       R# )z_
            /*[clinic input]
            [clinic start generated code]*/foobarfoobar!
        z(Garbage after stop line: 'foobarfoobar!'re   r_   Nrs   rt   s   &  r1   test_garbage_after_stop_line0ClinicWholeFileTest.test_garbage_after_stop_line   s%     9CxBr7   c                6    R pRpV P                  WR^R7       R# )zS
            /*[clinic input]
             [clinic start generated code]*/
        zRWhitespace is not allowed before the stop line: ' [clinic start generated code]*/'re   r_   Nrs   rt   s   &  r1    test_whitespace_before_stop_line4ClinicWholeFileTest.test_whitespace_before_stop_line   s*    
1 	 	CxBr7   c                
   \        R 4      pRVn        RVn        RVn        \	        VRRR7      p\        R4      P                  4       pVP                  V4      p\        R4      P                  4       pV P                  WE4       R # )	Nz//z//[{dsl_name} start]z//[{dsl_name} stop]re   Fr=   z\
            //[clinic start]
            //module test
            //[clinic stop]
        z
            //[clinic start]
            //module test
            //
            //[clinic stop]
            /*[clinic end generated code: output=da39a3ee5e6b4b0d input=65fab8adff58cf08]*/
        )
r   body_prefix
start_line	stop_liner(   r   rD   r`   lstriprJ   )r.   r@   clra   outexpecteds   &     r1   test_parse_with_body_prefix/ClinicWholeFileTest.test_parse_with_body_prefix   s    $ 1/EH5A   UW	 	
 hhsm   VX 	 	'r7   c                6    R pRpV P                  WR^R7       R# )zR
            /* start
            /* nested
            */
            */
        zNested block comment!re   r_   Nrs   rt   s   &  r1   *test_cpp_monitor_fail_nested_block_comment>ClinicWholeFileTest.test_cpp_monitor_fail_nested_block_comment   s%     &CxBr7   c                6    R pRpV P                  WR^R7       R# )z<
            #if
            a()
            #endif
        z)Invalid format for #if line: no argument!re   r_   Nrs   rt   s   &  r1   *test_cpp_monitor_fail_invalid_format_noarg>ClinicWholeFileTest.test_cpp_monitor_fail_invalid_format_noarg   s%    
 :CxBr7   c                6    R pRpV P                  WR^R7       R# )zC
            #ifdef A B
            a()
            #endif
        z?Invalid format for #ifdef line: should be exactly one argument!re   r_   Nrs   rt   s   &  r1   0test_cpp_monitor_fail_invalid_format_toomanyargsDClinicWholeFileTest.test_cpp_monitor_fail_invalid_format_toomanyargs   s&    
 PCxBr7   c                6    R pRpV P                  WR^R7       R# )z#elsez.#else without matching #if / #ifdef / #ifndef!re   r_   Nrs   rt   s   &  r1   $test_cpp_monitor_fail_no_matching_if8ClinicWholeFileTest.test_cpp_monitor_fail_no_matching_if   s!    >CxBr7   c                0    R pRpV P                  W4       R# )zy
            /*[clinic input]
            output preset nosuchpreset
            [clinic start generated code]*/
        zUnknown preset 'nosuchpreset'Nrs   rt   s   &  r1   $test_directive_output_unknown_preset8ClinicWholeFileTest.test_directive_output_unknown_preset   s    
 .C%r7   c                0    R pRpV P                  W4       R# )zi
            /*[clinic input]
            output pop
            [clinic start generated code]*/
        z"Can't 'output pop', stack is emptyNrs   rt   s   &  r1   test_directive_output_cant_pop2ClinicWholeFileTest.test_directive_output_cant_pop   s    
 3C%r7   c                   \        R 4      pV P                  P                  V4      pV P                  V\        R 4      4       0 RmpV F7  pV P	                  VR7      ;_uu_ 4        V P                  WB4       RRR4       K9  	  VP                  4       P                  R4      R,          pV P                  VR4       R#   + '       g   i     K  ; i)z~
            /*[clinic input]
            output print 'I told you once.'
            [clinic start generated code]*/
        )fieldN
z%/*[clinic end generated code: output=>
   cpp_if	cpp_endifimpl_prototypeimpl_definitionmethoddef_definemethoddef_ifndefparser_prototypeparser_definitiondocstring_prototypedocstring_definition)r   r   r`   assertStartsWithr-   assertInrl   split)r.   ra   r   fieldsr   	last_lines   &     r1   test_directive_output_print/ClinicWholeFileTest.test_directive_output_print   s      
 kk$ 	c6 + $ 	

 EE**e) +*  JJL&&t,R0	i)PQ +**s   %B==Cc                B    \        R 4      pRpV P                  W4       R# )z
            /*[clinic input]
            preserve foo bar baz eggs spam ham mushrooms
            [clinic start generated code]*/
        z,takes 1 positional argument but 8 were givenN)r   rb   rt   s   &  r1   test_directive_wrong_arg_number3ClinicWholeFileTest.test_directive_wrong_arg_number  s&      
 =C%r7   c                0    R pRpV P                  W4       R# )z
            /*[clinic input]
            destination buffer nosuchcommand
            [clinic start generated code]*/
        z+unknown destination command 'nosuchcommand'Nrs   rt   s   &  r1    test_unknown_destination_command4ClinicWholeFileTest.test_unknown_destination_command  s    
 <C%r7   c                0    R pRpV P                  W4       R# )a  
            /*[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<accessing self.function inside converter_init is disallowed!Nrs   rt   s   &  r1   +test_no_access_to_members_in_converter_init?ClinicWholeFileTest.test_no_access_to_members_in_converter_init  s$     K 	 	C%r7   c                4    R pRpV P                  W!^	R7       R# )z3'kind' of function and cloned function don't match!a&  
            /*[clinic input]
            module m
            @classmethod
            m.f1
                a: object
            [clinic start generated code]*/
            /*[clinic input]
            @staticmethod
            m.f2 = m.f1
            [clinic start generated code]*/
        rC   Nrs   r.   ru   blocks   &  r1   test_clone_mismatch'ClinicWholeFileTest.test_clone_mismatch-  s#    C 	Eq1r7   c                4    R pRpV P                  W!^R7       R# )z+Badly formed annotation for 'm.f': 'Custom'aW  
            /*[python input]
            class Custom_return_converter(CReturnConverter):
                def __init__(self):
                    raise ValueError("abc")
            [python start generated code]*/
            /*[clinic input]
            module m
            m.f -> Custom
            [clinic start generated code]*/
        r   Nrs   r   s   &  r1   #test_badly_formed_return_annotation7ClinicWholeFileTest.test_badly_formed_return_annotation=  s#    ;
 	Eq1r7   c                4    R pRpV P                  W!^R7       R# )''my_test_func' uses '*' more than once.z
            /*[clinic input]
            my_test_func

                pos_arg: object
                *args: tuple
                *
                kw_arg: object
            [clinic start generated code]*/
        r   Nrs   r   s   &  r1   test_star_after_vararg*ClinicWholeFileTest.test_star_after_varargL  #    7	 	Eq1r7   c                4    R pRpV P                  W!^R7       R# )r   z
            /*[clinic input]
            my_test_func

                pos_arg: object
                *
                *args: tuple
                kw_arg: object
            [clinic start generated code]*/
        r   Nrs   r   s   &  r1   test_vararg_after_star*ClinicWholeFileTest.test_vararg_after_starZ  r   r7   c                4    R pRpV P                  W!^R7       R# )zAlready defined module 'm'!z|
            /*[clinic input]
            module m
            module m
            [clinic start generated code]*/
        r   Nrs   r   s   &  r1   test_module_already_got_one/ClinicWholeFileTest.test_module_already_got_oneh  s#    + 	Eq1r7   c                4    R pRpV P                  W!^R7       R# )z"Destination already exists: 'test'z
            /*[clinic input]
            destination test new buffer
            destination test new buffer
            [clinic start generated code]*/
        r   Nrs   r   s   &  r1    test_destination_already_got_one4ClinicWholeFileTest.test_destination_already_got_oner  s#    2 	Eq1r7   c                4    R pRpV P                  W!^R7       R# )z'Destination does not exist: '/dev/null'zz
            /*[clinic input]
            output everything /dev/null
            [clinic start generated code]*/
        r   Nrs   r   s   &  r1   test_destination_does_not_exist3ClinicWholeFileTest.test_destination_does_not_exist|  s#    7
 	Eq1r7   c                4    R pRpV P                  W!^R7       R# )zAlready defined class 'C'!z
            /*[clinic input]
            class C "" ""
            class C "" ""
            [clinic start generated code]*/
        r   Nrs   r   s   &  r1   test_class_already_got_one.ClinicWholeFileTest.test_class_already_got_one  s#    * 	Eq1r7   c                4    R pRpV P                  W!^R7       R# )z#Can't nest a module inside a class!z
            /*[clinic input]
            class C "" ""
            module C.m
            [clinic start generated code]*/
        r   Nrs   r   s   &  r1   "test_cant_nest_module_inside_class6ClinicWholeFileTest.test_cant_nest_module_inside_class  s#    3 	Eq1r7   c                B   R p\        R4      p\        R4      p\        P                  ! 4       ;_uu_ 4       pV P                  P	                  V4      pRRR4       V P                  VXP                  4       4       V P                  XV4       R#   + '       g   i     LD; i)z?Destination buffer 'buffer' not empty at end of file, emptying.a  
            /*[clinic input]
            output everything buffer
            fn
                a: object
                /
            [clinic start generated code]*/
            /*[clinic end generated code: output=da39a3ee5e6b4b0d input=1c4668687f5fd002]*/

            /*[clinic input]
            dump buffer
            [clinic start generated code]*/

            PyDoc_VAR(fn__doc__);

            PyDoc_STRVAR(fn__doc__,
            "fn($module, a, /)\n"
            "--\n"
            "\n");

            #define FN_METHODDEF    \
                {"fn", (PyCFunction)fn, METH_O, fn__doc__},

            static PyObject *
            fn(PyObject *module, PyObject *a)
            /*[clinic end generated code: output=be6798b148ab4e53 input=524ce2e021e4eba6]*/
        z
            /*[clinic input]
            output everything buffer
            fn
                a: object
                /
            [clinic start generated code]*/
        N)r   r   captured_stdoutr   r`   r   getvaluerJ   )r.   expected_warningexpected_generatedr   stdout	generateds   &     r1   !test_dest_buffer_not_empty_at_eof5ClinicWholeFileTest.test_dest_buffer_not_empty_at_eof  s    5# % 6    $$&&&))%0I '&(9:$67 '&s   BB	c                4    R pRpV P                  W!^R7       R# )z9Can't clear destination 'file': it's not of type 'buffer'zu
            /*[clinic input]
            destination file clear
            [clinic start generated code]*/
        r   Nrs   r   s   &  r1   test_dest_clear#ClinicWholeFileTest.test_dest_clear  s#    I
 	Eq1r7   c                4    R pRpV P                  W!^R7       R# )zunknown variable 'ets'zj
            /*[clinic input]
            set ets tse
            [clinic start generated code]*/
        r   Nrs   r   s   &  r1   test_directive_set_misuse-ClinicWholeFileTest.test_directive_set_misuse  s#    &
 	Eq1r7   c                x    \        R 4      pV P                  P                  V4      pRpV P                  W24       R# )a  
            /*[clinic input]
            set line_prefix '// '
            output everything suppress
            output docstring_prototype buffer
            fn
                a: object
                /
            [clinic start generated code]*/
            /* We need to dump the buffer.
             * If not, Argument Clinic will emit a warning */
            /*[clinic input]
            dump buffer
            [clinic start generated code]*/
        z// PyDoc_VAR(fn__doc__);Nr   r   r`   r   r.   r   r   expected_docstring_prototypes   &   r1   test_directive_set_prefix-ClinicWholeFileTest.test_directive_set_prefix  s:       KK%%e,	'A$2>r7   c                x    \        R 4      pV P                  P                  V4      pRpV P                  W24       R# )a  
            /*[clinic input]
            set line_suffix '  // test'
            output everything suppress
            output docstring_prototype buffer
            fn
                a: object
                /
            [clinic start generated code]*/
            /* We need to dump the buffer.
             * If not, Argument Clinic will emit a warning */
            /*[clinic input]
            dump buffer
            [clinic start generated code]*/
        zPyDoc_VAR(fn__doc__);  // testNr   r   s   &   r1   test_directive_set_suffix-ClinicWholeFileTest.test_directive_set_suffix  s:       KK%%e,	'G$2>r7   c                x    \        R 4      pV P                  P                  V4      pRpV P                  W24       R# )a  
            /*[clinic input]
            set line_prefix '{block comment start} '
            set line_suffix ' {block comment end}'
            output everything suppress
            output docstring_prototype buffer
            fn
                a: object
                /
            [clinic start generated code]*/
            /* We need to dump the buffer.
             * If not, Argument Clinic will emit a warning */
            /*[clinic input]
            dump buffer
            [clinic start generated code]*/
        z/* PyDoc_VAR(fn__doc__); */Nr   r   s   &   r1   $test_directive_set_prefix_and_suffix8ClinicWholeFileTest.test_directive_set_prefix_and_suffix  s:        KK%%e,	'D$2>r7   c                    \        R 4      p\        R4      pV P                  P                  V4      pV P                  W24       R# )z
            /*[clinic input]
            output everything buffer
            printout test
            [clinic start generated code]*/
        z
            /*[clinic input]
            output everything buffer
            printout test
            [clinic start generated code]*/
            test
            /*[clinic end generated code: output=4e1243bd22c66e76 input=898f1a32965d44ca]*/
        Nr   r   r`   rJ   )r.   r   r   r   s   &   r1   test_directive_printout+ClinicWholeFileTest.test_directive_printout  sF          KK%%e,	-r7   c                4    R pRpV P                  W!^R7       R# )z)Can't have 'preserve' twice in one block!z|
            /*[clinic input]
            preserve
            preserve
            [clinic start generated code]*/
        r   Nrs   r   s   &  r1   test_directive_preserve_twice1ClinicWholeFileTest.test_directive_preserve_twice%  s#    9 	Eq1r7   c                4    R pRpV P                  W!^R7       R# )z?'preserve' only works for blocks that don't produce any output!z
            /*[clinic input]
            preserve
            fn
                a: object
                /
            [clinic start generated code]*/
        r   Nrs   r   s   &  r1   test_directive_preserve_input1ClinicWholeFileTest.test_directive_preserve_input/  s#    O 	Eq1r7   c                t    \        R 4      pV P                  P                  V4      pV P                  W!4       R# )a  
            /*[clinic input]
            output everything buffer
            preserve
            [clinic start generated code]*/
            // Preserve this
            /*[clinic end generated code: output=eaa49677ae4c1f7d input=559b5db18fddae6a]*/
            /*[clinic input]
            dump buffer
            [clinic start generated code]*/
            /*[clinic end generated code: output=da39a3ee5e6b4b0d input=524ce2e021e4eba6]*/
        Nr   r.   r   r   s   &  r1   test_directive_preserve_output2ClinicWholeFileTest.test_directive_preserve_output;  s5       KK%%e,	*r7   c                b    \        R 4      P                  4       pRpV P                  W!^R7       R# )a  
            Invalid command or destination name 'cmd'. Must be one of:
             - 'preset'
             - 'push'
             - 'pop'
             - 'print'
             - 'everything'
             - 'cpp_if'
             - 'docstring_prototype'
             - 'docstring_definition'
             - 'methoddef_define'
             - 'impl_prototype'
             - 'parser_prototype'
             - 'parser_definition'
             - 'cpp_endif'
             - 'methoddef_ifndef'
             - 'impl_definition'
        zp
            /*[clinic input]
            output cmd buffer
            [clinic start generated code]*/
        r   N)r   rD   rb   r   s   &  r1   %test_directive_output_invalid_command9ClinicWholeFileTest.test_directive_output_invalid_commandK  s9      " UW# 	$
 	Eq1r7   c                4    R pRpV P                  W^R7       R# )a  
            /*[clinic input]
            class C "void *" ""
            C.meth
              a: int
            [clinic start generated code]*/
            /*[clinic input]
            @classmethod
            C.__init__ = C.meth
            [clinic start generated code]*/
        zD'__init__' must be a normal method; got 'FunctionKind.CLASS_METHOD'!r   Nrs   r.   r   ru   s   &  r1   test_validate_cloned_init-ClinicWholeFileTest.test_validate_cloned_inite  s$    
 UEq1r7   c                4    R pRpV P                  W^R7       R# )a  
            /*[clinic input]
            class C "void *" ""
            C.meth
              a: int
            [clinic start generated code]*/
            /*[clinic input]
            C.__new__ = C.meth
            [clinic start generated code]*/
        z '__new__' must be a class methodr   Nrs   r  s   &  r1   test_validate_cloned_new,ClinicWholeFileTest.test_validate_cloned_newt  s#    	 1Eq1r7   c                4    R pRpV P                  W^R7       R# )z
            /*[clinic input]
            foo2
            [clinic start generated code]*/
            /*[clinic input]
            foo as = foo2
            [clinic start generated code]*/
        )No C basename provided after 'as' keywordr   Nrs   r  s   &  r1   test_no_c_basename_cloned-ClinicWholeFileTest.test_no_c_basename_cloned  s#     :Eq1r7   c                @   \        R 4      pV P                  P                  V4       V P                  P                  pV P	                  \        V4      ^4       V P	                  V^,          P                  R4       V P	                  V^,          P                  R4       R# )a9  
            /*[clinic input]
            # Make sure we don't create spurious clinic/ directories.
            output everything suppress
            foo2
            [clinic start generated code]*/

            /*[clinic input]
            foo as foo1 = foo2
            [clinic start generated code]*/
        foofoo1N)r   r   r`   r/   rJ   lenname
c_basename)r.   ra   funcss   &  r1   "test_cloned_with_custom_c_basename6ClinicWholeFileTest.test_cloned_with_custom_c_basename  sz     
 
 	#%%UQ'q.q,,f5r7   c                4    R pRpV P                  W^R7       R# )z
            /*[clinic input]
            class C "void *" ""
            foo1
            [clinic start generated code]*/

            /*[clinic input]
            foo2 as .illegal. = foo1
            [clinic start generated code]*/
        zIllegal C basename: '.illegal.'r   Nrs   r  s   &  r1   #test_cloned_with_illegal_c_basename7ClinicWholeFileTest.test_cloned_with_illegal_c_basename  s#    	 0Eq1r7   c                \   \        R 4      pV P                  P                  V4       V P                  \        R4       V P                  P
                  pV P                  \        V4      ^4       V^ ,          P                  P                  R4      pV^,          P                  P                  R4      pV P                  V^ ,          R4       V P                  V^ ,          R4       V P                  RV4       V P                  RV4       V P                  RV4       V P                  RV4       R# )ar  
            /*[clinic input]
            @text_signature "($module, a[, b])"
            src
                a: object
                    param a
                b: object = NULL
                /

            docstring
            [clinic start generated code]*/

            /*[clinic input]
            dst = src
            [clinic start generated code]*/
        r   r   zsrc($module, a[, b])zdst($module, a[, b])z    param a	docstringN)r   r   r`   rX   r	   r/   rJ   r  r  r   r   assertNotIn)r.   r   r  src_docstring_linesdst_docstring_liness   &    r1   !test_cloned_forced_text_signature5ClinicWholeFileTest.test_cloned_forced_text_signature  s        	% )%%UQ'#Ah0066t<#Ah0066t< 	,Q/1GH,Q/1GH 	m%89m%89 	k#67&9:r7   c                4    R pRpV P                  W^R7       R# )ax  
            /*[clinic input]
            @text_signature "($module, a[, b])"
            src
                a: object
                b: object = NULL
                /
            [clinic start generated code]*/

            /*[clinic input]
            @text_signature "($module, a_override[, b])"
            dst = src
            [clinic start generated code]*/
        z2Cannot use @text_signature when cloning a functionr   Nrs   r  s   &  r1   )test_cloned_forced_text_signature_illegal=ClinicWholeFileTest.test_cloned_forced_text_signature_illegal  s$     CEr2r7   c                r    R F0  p\        RV RV R24      pV P                  P                  V4       K2  	  R# )r   z                /*[z| input]
                # CPP directives, valid or not, should be ignored in C comments.
                #
                [z% start generated code]*/
            N)r   python)r   r   r`   )r.   dslra   s   &  r1   $test_ignore_preprocessor_in_comments8ClinicWholeFileTest.test_ignore_preprocessor_in_comments  sJ    %C 5   	 C KKc" &r7   r   )5__name__
__module____qualname____firstlineno__maxDiffrb   rh   rp   rv   ry   r|   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r  r  r	  r  r  r  r  r#  r&  r+  __static_attributes____classdictcell____classdict__s   @r1   r]   r]   Z   s    G:d :4 :61"
CCC	C(*CCCC
&&RB&&&&2 22222222)8V22?(?(?*.$2
2+ 2422
26$2#;J3$# #r7   r]   c                   V   a  ] tR tRt o RRRR/R ltV 3R lR ltV 3R	 lR
 ltRtV tR# )ParseFileUnitTesti  verifyToutputNc                   \         P                  ! \        V4      P                  4       4      pV P	                  \
        V4      ;_uu_ 4        \        VR R7       RRR4       R#   + '       g   i     R# ; i)Fr;   N)rG   rH   r   rD   rI   r   r'   )r.   r9   expected_errorr9  r:  rO   s   &$$$$ r1   expect_parsing_failure(ParseFileUnitTest.expect_parsing_failure  sL     6.1779:##K88xe4 9888s   A$$A5	c                   < V ^8  d   QhRR/#    returnNr4   )formatr6  s   "r1   __annotate__ParseFileUnitTest.__annotate__  s     
 
d 
r7   c                ,    V P                  R RR7       R# )r  z&Can't extract file type for file 'foo'r9   r=  N)r>  rg   s   &r1   test_parse_file_no_extension.ParseFileUnitTest.test_parse_file_no_extension  s    ##C 	$ 	
r7   c                   < V ^8  d   QhRR/# rA  r4   )rD  r6  s   "r1   rE  rF    s     V V4 Vr7   c                    R RRRRR/pVP                  4        F:  w  r#V P                  VR7      ;_uu_ 4        V P                  W#R7       RRR4       K<  	  R#   + '       g   i     KQ  ; i)	zfoo.rsz*Can't identify file type for file 'foo.rs'zfoo.hsz*Can't identify file type for file 'foo.hs'zfoo.jsz*Can't identify file type for file 'foo.js'rf   rH  N)itemsr-   r>  )r.   filenames_to_errorsr9   rO   s   &   r1   !test_parse_file_strange_extension3ParseFileUnitTest.test_parse_file_strange_extension  sh    BBB

 !4 9 9 ;Hx00++X+U 10 !<000s   AA*r4   )	r.  r/  r0  r1  r>  rI  rO  r3  r4  r5  s   @r1   r8  r8    s0     5265?C5
 
V Vr7   r8  c                   D   a  ] tR tRt o R tR tR tR tR tR t	Rt
V tR	# )
ClinicGroupPermuterTesti	  c                @    \        WV4      pV P                  WE4       R # rF   )r   rJ   )r.   lmrr:  computeds   &&&&& r1   _testClinicGroupPermuterTest._test
  s    *13*r7   c                8    V P                  R ..R.R..R4       R# )startstopstepN))r\  )r[  r\  )r[  r\  r]  rX  rg   s   &r1   
test_range"ClinicGroupPermuterTest.test_range  s#    

WI;F8*	r7   c                :    V P                  R R..R.R..R4       R# )xychattrN))rd  )rd  re  )rb  rc  rd  )rb  rc  rd  re  r^  rg   s   &r1   test_add_window'ClinicGroupPermuterTest.test_add_window  s%    

S#J<$6(	r7   c                H    V P                  . RORR..R.RR.. RO.R	4       R# )
a1b1b2c1d1d2N)ri  a2a3)e1e2e3))rl  )rj  rk  rl  )rj  rk  rl  rm  rn  )ri  ro  rp  rj  rk  rl  )ri  ro  rp  rj  rk  rl  rm  rn  )ri  ro  rp  rj  rk  rl  rm  rn  rq  rr  rs  r^  rg   s   &r1   test_ludicrous&ClinicGroupPermuterTest.test_ludicrous  s/    

&t5vtN`?a	r7   c                :    V P                  . . R .R.R..R4       R# )abrA   N)r4   rw  rw  rx  rw  rx  rA   r^  rg   s   &r1   test_right_only'ClinicGroupPermuterTest.test_right_only*  s&    

2rSE3%.	r7   c                8    R  pV P                  \        V4       R# )c                  "    \        R .. . 4       R# )rw  N)r   r4   r7   r1   r,   PClinicGroupPermuterTest.test_have_left_options_but_required_is_empty.<locals>.fn4  s    #SE2r2r7   N)assertRaises
ValueErrorr.   r,   s   & r1   ,test_have_left_options_but_required_is_emptyDClinicGroupPermuterTest.test_have_left_options_but_required_is_empty3  s    	3*b)r7   r4   N)r.  r/  r0  r1  rX  r_  rf  rt  r|  r  r3  r4  r5  s   @r1   rR  rR  	  s(     +	* *r7   rR  c                   V   a  ] tR tRt o R tR tR tR tR tR t	R t
R	 tR
 tRtV tR# )ClinicLinearFormatTesti9  c                V    \         P                  ! V3/ VB pV P                  W$4       R # rF   )	libcliniclinear_formatrJ   )r.   inputr:  kwargsrW  s   &&&, r1   rX  ClinicLinearFormatTest._test:  s%    **5;F;*r7   c                *    V P                  R R 4       R# )r>   Nr^  rg   s   &r1   test_empty_strings)ClinicLinearFormatTest.test_empty_strings>  s    

2rr7   c                *    V P                  R R 4       R# )r   Nr^  rg   s   &r1   test_solo_newline(ClinicLinearFormatTest.test_solo_newlineA  s    

4r7   c                *    V P                  R R 4       R# )z
          abc
        Nr^  rg   s   &r1   test_no_substitution+ClinicLinearFormatTest.test_no_substitutionD  s    

 	r7   c                .    V P                  R RRR7       R# )6
          abc
          {name}
          def
        z%
          abc
          def
        r>   r  Nr^  rg   s   &r1   test_empty_substitution.ClinicLinearFormatTest.test_empty_substitutionK  s"    

   	 	r7   c                .    V P                  R RRR7       R# )r  z6
          abc
          GARGLE
          def
        GARGLEr  Nr^  rg   s   &r1   test_single_line_substitution4ClinicLinearFormatTest.test_single_line_substitutionU  s"    

   	 	r7   c                .    V P                  R RRR7       R# )r  zH
          abc
          bingle
          bungle

          def
        zbingle
bungle
r  Nr^  rg   s   &r1   test_multiline_substitution2ClinicLinearFormatTest.test_multiline_substitution`  s"    

  % 	 
	&r7   c                    \         P                  ! R 4      pV P                  \        V4      ;_uu_ 4        \        P
                  ! RRR7       RRR4       R#   + '       g   i     R# ; i)zfound before '{marker}'z'no text before marker for you! {marker}not allowed!markerNrG   rH   rI   r   r  r  r.   regexs   & r1   test_text_before_block_marker4ClinicLinearFormatTest.test_text_before_block_markerm  sG    		34##K77##$M+9; 8777   AA)	c                    \         P                  ! R 4      pV P                  \        V4      ;_uu_ 4        \        P
                  ! RRR7       RRR4       R#   + '       g   i     R# ; i)zfound after '{marker}'z&{marker} no text after marker for you!r  r  Nr  r  s   & r1   test_text_after_block_marker3ClinicLinearFormatTest.test_text_after_block_markers  sG    		23##K77##$L+9; 8777r  r4   N)r.  r/  r0  r1  rX  r  r  r  r  r  r  r  r  r3  r4  r5  s   @r1   r  r  9  s7     +	&;; ;r7   r  c                   ,   a  ] tR tRt o R tR tRtV tR# )InertParseriz  c                    R # rF   r4   r.   r   s   &&r1   __init__InertParser.__init__{      r7   c                    R # rF   r4   r.   r   s   &&r1   r`   InertParser.parse~  r  r7   r4   Nr.  r/  r0  r1  r  r`   r3  r4  r5  s   @r1   r  r  z  s      r7   r  c                   ,   a  ] tR tRt o R tR tRtV tR# )
CopyParseri  c                    R # rF   r4   r  s   &&r1   r  CopyParser.__init__  r  r7   c                (    VP                   Vn        R # rF   )r  r:  r  s   &&r1   r`   CopyParser.parse  s    {{r7   r4   Nr  r5  s   @r1   r  r    s     # #r7   r  c                   D   a  ] tR tRt o R tR tR tR tR tR t	Rt
V tR	# )
ClinicBlockParserTesti  c                    \        R 4      p\        \        W4      4      p\        V4      pV F  pVP	                  V4       K  	  VP
                  P                  4       pR # rF   )r   listr#   r$   print_blockfr   )r.   r  r:  languageblockswriterr   s   &&&    r1   rX  ClinicBlockParserTest._test  sN    T?k%23h'Eu% ""$r7   c                $    V P                  W4      # rF   r^  )r.   r  s   &&r1   
round_trip ClinicBlockParserTest.round_trip  s    zz%''r7   c                (    V P                  R 4       R# )z@
            verbatim text here
            lah dee dah
        Nr  rg   s   &r1   test_round_trip_1'ClinicBlockParserTest.test_round_trip_1  s      	r7   c                (    V P                  R 4       R# )z
    verbatim text here
    lah dee dah
/*[inert]
abc
[inert]*/
def
/*[inert checksum: 7b18d017f89f61cf17d47f92749ea6930a3f1deb]*/
xyz
Nr  rg   s   &r1   test_round_trip_2'ClinicBlockParserTest.test_round_trip_2  s     	 		r7   c                    \        R 4      p\        VRRR7      p\        V4      VP                  R&   \	        V4      VP                  R&   VP                  V4      pV P                  W%4       R # )NfileFr=   inertrY   )r   r(   r  parsersr  r`   rJ   )r.   r  r:  r  rA   rW  s   &&&   r1   _test_clinic"ClinicBlockParserTest._test_clinic  sX    T?8f5A(^		'&qM		&775>*r7   c                *    V P                  R R4       R# )z
    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
N)r  rg   s   &r1   test_clinic_1#ClinicBlockParserTest.test_clinic_1  s     			r7   r4   N)r.  r/  r0  r1  rX  r  r  r  r  r  r3  r4  r5  s   @r1   r  r    s)     k(

+ r7   r  c                     a  ] tR tRt o R tR~R ltRRRRRR/R	 ltR
 tR tR t	R t
R tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR  tR! tR" tR# t R$ t!R% t"R& t#R' t$R( t%R) t&R* t'R+ t(R, t)R- t*R. t+R/ t,R0 t-R1 t.R2 t/R3 t0R4 t1R5 t2R6 t3R7 t4R8 t5R9 t6R: t7R; t8R< t9R= t:R> t;R? t<R@ t=RA t>RB t?RC t@RD tARE tBRF tCRG tDRH tERI tFRJ tGRK tHRL tIRM tJRN tKRO tLRP tMRQ tNRR tORS tPRT tQRU tRRV tSRW tTRX tURY tVRZ tWR[ tXR\ tYR] tZR^ t[R_ t\R` t]Ra t^Rb t_Rc t`Rd taRe tbRf tcRg tdRh teRi tfRj tgRk thRl tiRm tjRn tkRo tlRp tmRq tnRr toRs tpRt tqRu trRv tsRw ttRx tuRy tvRz twR{ txR| tyR}tzV t{R# )ClinicParserTesti  c                h    \        4       p\        V4      p\        V4      pVP                  V4       V# rF   )rB   r&   r"   r`   )r.   textrA   rM   r   s   &&   r1   r`   ClinicParserTest.parse  s,    N1dUr7   c                    V P                  V4      pVP                  pV P                  \        V4      V4       WS,          # rF   )r`   
signaturesrJ   r  )r.   r  signatures_in_blockfunction_indexr   ss   &&&&  r1   parse_functionClinicParserTest.parse_function  s;    

4 Q!45   r7   r9   NrC   rD   Tc          
     4    \        W P                  WW4VR 7      # ))r9   rC   rD   )rQ   r  )r.   r   ru   r9   rC   rD   s   &&&$$$r1   rb   ClinicParserTest.expect_failure  s     t%8%8%(0uN 	Nr7   c                    V P                  \        VR 4      4       V P                  \        V4      P	                  4       VP
                  P	                  4       4       R# )r  N)
assertTruehasattrrJ   r   rD   r  )r.   r,   r   s   &&&r1   checkDocstringClinicParserTest.checkDocstring  sC    K01)//1++-	/r7   c                    \        \        4       4      p\        R 4      pVP                  V4       VP                  w  r4V P                  RVP                  4       V P                  RVP                  4       R# )z5
            module os
            os.access
        accessosN)r&   rB   r"   r`   r  rJ   r  )r.   rM   r   modulefunctions   &    r1   test_trivialClinicParserTest.test_trivial  sa    <>*   	U ++8==1v{{+r7   c                    V P                  \        R 4      4      pVP                  w  r#V P                  RVP                  4       V P                  RVP                  4       R# )zC
            #
            module os
            os.access
        r  r  N)r`   r   r  rJ   r  )r.   r   r  r  s   &   r1   test_ignore_line!ClinicParserTest.test_ignore_line  sT    

6 #  
 !++8==1v{{+r7   c                H   V P                  R 4      pV P                  RVP                  4       V P                  ^\        VP                  4      4       VP                  R,          pV P                  RVP                  4       V P                  VP                  \        4       R# )zO
            module os
            os.access
                path: int
        r  pathN)r  rJ   r  r  
parametersassertIsInstance	converterr   r.   r  ps   &  r1   
test_paramClinicParserTest.test_param  s    && ( 
 	8==1C 3 345'(akk=9r7   c                    V P                  R 4      pVP                  R,          pV P                  RVP                  4       R# )zb
            module os
            os.access
                follow_symlinks: bool = True
        follow_symlinksTNr  r  rJ   defaultr   s   &  r1   test_param_default#ClinicParserTest.test_param_default  s>    && ( 
  12qyy)r7   c                    V P                  R 4      pVP                  R,          pV P                  RVP                  4       R# )z
            module os
            os.access
                follow_symlinks: \
                bool \
                = \
                True
        r  TNr  r   s   &  r1   test_param_with_continuations.ClinicParserTest.test_param_with_continuations  s>    && (   12qyy)r7   c                   V P                  R 4      pVP                  R,          pV P                  \        P                  VP
                  4       V P                  RVP                  P                  4       RpRpV P                  WC^R7       R# )z
            module os
            os.access
                follow_symlinks: int(c_default='MAXSIZE') = sys.maxsize
            r  MAXSIZEzlWhen 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
        r   N)	r  r  rJ   sysmaxsizer  r  	c_defaultrb   )r.   r  r  ru   r   s   &    r1   &test_param_default_expr_named_constant7ClinicParserTest.test_param_default_expr_named_constant  s    && ( 
  12aii0AKK$9$9:2 	
 	Eq1r7   c           	         R pRpR FK  pV P                  VR7      ;_uu_ 4        VP                  VR7      pV P                  WB^R7       RRR4       KM  	  R#   + '       g   i     Kb  ; i)zf
            module os
            os.access
                follow_symlinks: int = {default}
        z'Unsupported expression as default value)bad_default)r  r   N)z	{1, 2, 3}z3 if bool() else 4z[x for x in range(42)])r-   rD  rb   )r.   templateru   bad_default_valuer   s   &    r1   /test_param_with_bizarre_default_fails_correctly@ClinicParserTest.test_param_with_bizarre_default_fails_correctly,  si    
 8"

 *;<< 0AB##Eq#9 =<"

 =<<s   &AA)c                j    R pRpV P                  W^R7      pV P                  R\        V4      4       R# )z}
            module os
            os.access
                follow_symlinks: int(c_default='MAXSIZE') = unspecified
        z+'unspecified' is not a legal default value!r   +Malformed expression given as default valueN)rb   r   str)r.   r   ru   excs   &   r1   -test_unspecified_not_allowed_as_default_value>ClinicParserTest.test_unspecified_not_allowed_as_default_value<  s:    
 <!!%Q!7FCQr7   c                4    R pRpV P                  W^R7       R# )zu
            module os
            os.access
                follow_symlinks: int(c_default='MAXSIZE') = 1/0
        r  r   Nrs   r  s   &  r1   *test_malformed_expression_as_default_value;ClinicParserTest.test_malformed_expression_as_default_valueF  s#    
 <Eq1r7   c                4    R pRpV P                  W!^R7       R# )zcWhen you specify an expression ('a + b') as your default value, you MUST specify a valid c_default.zE
            fn
                follow_symlinks: int = a + b
        r   Nrs   r   s   &  r1   test_param_default_expr_binop.ClinicParserTest.test_param_default_expr_binopO  s(    2 	 	Eq1r7   c                    V P                  R 4      pV P                  ^\        VP                  4      4       VP                  R,          P                  pV P                  V\        4       R# )z
            module os
            os.access
                follow_symlinks: bool = True
                something_else: str = ''
        something_elseN)r  rJ   r  r  r  r  r   )r.   r  convs   &  r1   test_param_no_docstring(ClinicParserTest.test_param_no_docstringZ  s[    && (  	C 3 345""#34>>dM2r7   c                4    R pRpV P                  W!^R7       R# )z]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: str
        r   Nrs   r   s   &  r1   *test_param_default_parameters_out_of_order;ClinicParserTest.test_param_default_parameters_out_of_ordere  s(    0 	 	Eq1r7   c                    V P                  R 4      pVP                  R,          pV P                  ^VP                  P                  R,          4       R# )z^
            module os
            os.access
                path: path_t(allow_fd=1)
        r  allow_fdN)r  r  rJ   r  argsr   s   &  r1   !disabled_test_converter_arguments2ClinicParserTest.disabled_test_converter_argumentsr  sH    && ( 
 'AKK,,Z89r7   c                L    V P                  R 4      pV P                  VR4       R# )a  
            module os
            os.stat as os_stat_fn

               path: str
                   Path to be examined
                   Ensure that multiple lines are indented correctly.

            Perform a stat system call on the given path.

            Ensure that multiple lines are indented correctly.
            Ensure that multiple lines are indented correctly.
        ap  
            stat($module, /, path)
            --

            Perform a stat system call on the given path.

              path
                Path to be examined
                Ensure that multiple lines are indented correctly.

            Ensure that multiple lines are indented correctly.
            Ensure that multiple lines are indented correctly.
        Nr  r  r.   r  s   & r1   test_function_docstring(ClinicParserTest.test_function_docstring{  s.    && (  	H ' 	r7   c                L    V P                  R 4      pV P                  VR4       R# )zmodule t
t.s
   a: object
      Param docstring with trailing whitespace  
Func docstring summary with trailing whitespace  
  
Func docstring body with trailing whitespace  
z
            s($module, /, a)
            --

            Func docstring summary with trailing whitespace

              a
                Param docstring with trailing whitespace

            Func docstring body with trailing whitespace
        Nr4  r5  s   & r1   "test_docstring_trailing_whitespace3ClinicParserTest.test_docstring_trailing_whitespace  s.    &&?
 	H 
' 
	r7   c                ^    V P                  \        R 4      4      pV P                  VR4       R# )z
            module foo
            foo.bar
              x: int
                 Documentation for x.
              y: int

            This is the documentation for foo.

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

            This is the documentation for foo.

              x
                Documentation for x.

            Okay, we're done here.
        Nr  r   r  r5  s   & r1   %test_explicit_parameters_in_docstring6ClinicParserTest.test_explicit_parameters_in_docstring  s5    &&v 
/ 
( 
 	H 
' 
	r7   c                ^    V P                  \        R 4      4      pV P                  VR4       R# )a
  
            module foo
            foo.bar
              x: int
                 # We're about to have
                 # the documentation for x.
                 Documentation for x.
                 # We've just had
                 # the documentation for x.
              y: int

            # We're about to have
            # the documentation for foo.
            This is the documentation for foo.
            # We've just had
            # the documentation for foo.

            Okay, we're done here.
        r<  Nr=  r5  s   & r1   test_docstring_with_comments-ClinicParserTest.test_docstring_with_comments  s5    &&v / ( & 	H 
' 
	r7   c                ^    V P                  \        R 4      4      pV P                  VR4       R# )zt
            module os
            os.stat
                path: str
            This/used to break Clinic!
        zc
            stat($module, /, path)
            --

            This/used to break Clinic!
        Nr=  r5  s   & r1   Ttest_parser_regression_special_character_in_parameter_column_of_docstring_first_lineeClinicParserTest.test_parser_regression_special_character_in_parameter_column_of_docstring_first_line  s5    &&v / (  	H ' 	r7   c                `    V P                  R 4      pV P                  RVP                  4       R# )zA
            module os
            os.stat as os_stat_fn
        
os_stat_fnN)r  rJ   r  r5  s   & r1   test_c_nameClinicParserTest.test_c_name  s/    && (  	x':':;r7   c                4    R pRpV P                  W^R7       R# )z\
            module os
            os.stat
                invalid syntax: int = 42
        zPFunction 'stat' has an invalid parameter declaration: 'invalid syntax: int = 42'r   Nrs   r  s   &  r1   test_base_invalid_syntax)ClinicParserTest.test_base_invalid_syntax  s$    
 aEq1r7   c                4    R pRpV P                  W^R7       R# )z[
            module os
            os.stat
                x: int = invalid syntax
        z5Function 'stat' has an invalid parameter declaration:r   Nrs   r  s   &  r1   !test_param_default_invalid_syntax2ClinicParserTest.test_param_default_invalid_syntax  s$    
 FEq1r7   c                    R pRp\         P                  ! 4       ;_uu_ 4       pV P                  W^ R7       RRR4       \        R4      pXP	                  4       pV P                  WC4       R#   + '       g   i     L>; i)zn
            cloned = fooooooooooooooooo
            This is trying to clone a nonexistent function!!
        z5Couldn't find existing function 'fooooooooooooooooo'!r   Nz            cls=None, module=<clinic.Clinic object>, existing='fooooooooooooooooo'
            (cls or module).functions=[]
        )r   captured_stderrrb   r   r   r   )r.   r   ru   stderrexpected_debug_prints   &    r1   1test_cloning_nonexistent_function_correctly_failsBClinicParserTest.test_cloning_nonexistent_function_correctly_fails  sn     F$$&&&15 '% '   "*3 '&s   A,,A<	c                h    V P                  R 4      pV P                  VP                  \        4       R# )z:
            module os
            os.stat -> int
        N)r  r  return_converterr!   r5  s   & r1   test_return_converter&ClinicParserTest.test_return_converter  s0    && (  	h779MNr7   c                0    R pRpV P                  W4       R# )zE
            module os
            os.stat -> invalid syntax
        z7Badly formed annotation for 'os.stat': 'invalid syntax'Nrs   r  s   &  r1   $test_return_converter_invalid_syntax5ClinicParserTest.test_return_converter_invalid_syntax"  s     HE'r7   c                0    R pRpV P                  W4       R# )z:
            module os
            os.stat -> "s"
        z6Legacy converter 's' not allowed as a return converterNrs   r  s   &  r1   5test_legacy_converter_disallowed_in_return_annotationFClinicParserTest.test_legacy_converter_disallowed_in_return_annotation*  s     GE'r7   c                0    R pRpV P                  W4       R# )zO
            module os
            os.stat -> fooooooooooooooooooooooo
        z?No available return converter called 'fooooooooooooooooooooooo'Nrs   r  s   &  r1   test_unknown_return_converter.ClinicParserTest.test_unknown_return_converter2  s     PE'r7   c                    V P                  R 4      pVP                  R,          pV P                  \        P                  P
                  VP                  4       V P                  ^ VP                  4       R# )zt
            module os
            os.access
                *
                follow_symlinks: bool = True
        r  N)r  r  rJ   inspectr   KEYWORD_ONLYkindgroupr   s   &  r1   	test_starClinicParserTest.test_star:  s^    && (   12**77@AGG$r7   c                    V P                  R 4      pVP                  R,          pV P                  ^VP                  4       R# )z
            module window
            window.border
                [
                ls: int
                ]
                /
        lsN)r  r  rJ   rg  r   s   &  r1   
test_groupClinicParserTest.test_groupE  s=    && (  %AGG$r7   c                   V P                  R 4      pRpV F  w  r4V P                  W4R7      ;_uu_ 4        VP                  V,          pV P                  VP                  V4       V P                  VP
                  \        P                  P                  4       RRR4       K  	  V P                  VR4       R#   + '       g   i     K  ; i)a  
            module curses
            curses.addch
                [
                y: int
                    Y-coordinate.
                x: int
                    X-coordinate.
                ]
                ch: char
                    Character to add.
                [
                attr: long
                    Attributes for the character.
                ]
                /
        r  rg  Na  
            addch([y, x,] ch, [attr])


              y
                Y-coordinate.
              x
                X-coordinate.
              ch
                Character to add.
              attr
                Attributes for the character.
        ))rc  r   )rb  r   rd  r   )re     
r  r-   r  rJ   rg  rf  rd  r   POSITIONAL_ONLYr  r.   r  datasetr  rg  r  s   &     r1   test_left_group ClinicParserTest.test_left_groupQ  s    && ( "

 #KD455''-  %0  ):):)J)JK 65 #
 	H ' 		 655   A$B99C
c                   V P                  R 4      pRpV F  w  r4V P                  W4R7      ;_uu_ 4        VP                  V,          pV P                  VP                  V4       V P                  VP
                  \        P                  P                  4       RRR4       K  	  V P                  VR4       R#   + '       g   i     K  ; i)a  
            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.
               ]
               ]
               /
        ro  Na  
            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.
        ))y1)y2r{  )x1r   )x2r   rp  )attr1rq  )attr2rq  )attr3rq  )attr4rB  )attr5rB  )attr6rB  rr  rt  s   &     r1   test_nested_groups#ClinicParserTest.test_nested_groups{  s    && "( "F
 #KD455''-  %0  ):):)J)JK 65 # 	H ' 	 655rx  c                4    R pRpV P                  W!^R7       R# )z`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
        r   Nrs   r   s   &  r1   0test_disallowed_grouping__two_top_groups_on_leftAClinicParserTest.test_disallowed_grouping__two_top_groups_on_left  s(    4 	
 	Eq1r7   c                0    R pRpV P                  W4       R# )z
            module foo
            foo.two_top_groups_on_right
                param: int
                [
                group1 : int
                ]
                [
                group2 : int
                ]
        zaFunction 'two_top_groups_on_right' has an unsupported group configuration. (Unexpected state 6.b)Nrs   r  s   &  r1   1test_disallowed_grouping__two_top_groups_on_rightBClinicParserTest.test_disallowed_grouping__two_top_groups_on_right  #    
4 	 	E'r7   c                0    R pRpV P                  W4       R# )z
            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)Nrs   r  s   &  r1   8test_disallowed_grouping__parameter_after_group_on_rightIClinicParserTest.test_disallowed_grouping__parameter_after_group_on_right  r  r7   c                0    R pRpV P                  W4       R# )z
            module foo
            foo.group_after_parameter_on_left
                [
                group2 : int
                [
                group1 : int
                ]
                ]
                param: int
        zgFunction 'group_after_parameter_on_left' has an unsupported group configuration. (Unexpected state 2.b)Nrs   r  s   &  r1   7test_disallowed_grouping__group_after_parameter_on_leftHClinicParserTest.test_disallowed_grouping__group_after_parameter_on_left  r  r7   c                0    R pRpV P                  W4       R# )z
            module foo
            foo.empty_group
                [
                [
                ]
                group2 : int
                ]
                param: int
        ZFunction 'empty_group' has an empty group. All groups must contain at least one parameter.Nrs   r  s   &  r1   -test_disallowed_grouping__empty_group_on_left>ClinicParserTest.test_disallowed_grouping__empty_group_on_left  #    	> 	 	E'r7   c                0    R pRpV P                  W4       R# )z
            module foo
            foo.empty_group
                param: int
                [
                [
                ]
                group2 : int
                ]
        r  Nrs   r  s   &  r1   .test_disallowed_grouping__empty_group_on_right?ClinicParserTest.test_disallowed_grouping__empty_group_on_right"  r  r7   c                0    R pRpV P                  W4       R# )z
            module foo
            foo.empty_group
                param: int
                ]
                group2: int
                ]
        z7Function 'empty_group' has a ']' without a matching '['Nrs   r  s   &  r1   -test_disallowed_grouping__no_matching_bracket>ClinicParserTest.test_disallowed_grouping__no_matching_bracket3  s     HE'r7   c                    RpRpV F7  pV P                  VR7      ;_uu_ 4        V P                  W24       RRR4       K9  	  R#   + '       g   i     KN  ; i)o
            with_kwds
                [
                *
                a: object
                ]
        z\You cannot use optional groups ('[' and ']') unless all parameters are positional-only ('/')r   N)r  z]
            with_kwds
                [
                a: object
                ]
        r-   rb   r.   ru  ru   r   s   &   r1   /test_disallowed_grouping__must_be_position_only@ClinicParserTest.test_disallowed_grouping__must_be_position_only?  sP    3 	 EE**##E/ +* ***   AAc                    V P                  R 4      pV P                  RVP                  4       V P                  ^\        VP                  4      4       R# )zL
            module foo
            foo.bar

            Docstring

        zbar($module, /)
--

DocstringNr  rJ   r  r  r  r5  s   & r1   test_no_parameters#ClinicParserTest.test_no_parametersT  sK    && (  	;X=O=OPC 3 345r7   c                    V P                  R ^^R7      pV P                  RVP                  4       V P                  ^\        VP                  4      4       R# )z
            module foo
            class foo.Bar "unused" "notneeded"
            foo.Bar.__init__

            Docstring

        r  r  zBar()
--

DocstringNr  r5  s   & r1   test_init_with_no_parameters-ClinicParserTest.test_init_with_no_parameters_  sW    && ( "#1 ' 6 	183E3EFC 3 345r7   c                0    R pRpV P                  W4       R# )zM
            module foo
            foo.bar => int
                /
        z'Illegal function name: 'foo.bar => int'Nrs   r  s   &  r1   test_illegal_module_line)ClinicParserTest.test_illegal_module_linen  s    
 8E'r7   c                0    R pRpV P                  W4       R# )zM
            module foo
            foo.bar as 935
                /
        zIllegal C basename: '935'Nrs   r  s   &  r1   test_illegal_c_basename(ClinicParserTest.test_illegal_c_basenamew  s    
 *E'r7   c                4    R pRpV P                  WRR7       R# )zfoo as r  F)rD   Nrs   r  s   &  r1   test_no_c_basename#ClinicParserTest.test_no_c_basename  s    9Ee4r7   c                0    R pRpV P                  W4       R# )zX
            module foo
            foo.bar
                *
                *
        'Function 'bar' uses '*' more than once.Nrs   r  s   &  r1   test_single_star!ClinicParserTest.test_single_star  s     8E'r7   c                    RpRpV F7  pV P                  VR7      ;_uu_ 4        V P                  W24       RRR4       K9  	  R#   + '       g   i     KN  ; i)module foo
foo.bar
  *z:Function 'bar' specifies '*' without following parameters.r  N)r  z&module foo
foo.bar
  *
Docstring here.z"module foo
foo.bar
  this: int
  *z-module foo
foo.bar
  this: int
  *
Docstring.r  r  s   &   r1   #test_parameters_required_after_star4ClinicParserTest.test_parameters_required_after_star  sL    
 KEE**##E/ +* ***r  c                   RpV Fh  w  r#V P                  W#R7      ;_uu_ 4        V P                  V4      pVP                  R,          pV P                  VP                  V4       RRR4       Kj  	  R#   + '       g   i     K  ; i)Tr  rN   N))r  zL
                class T "void *" ""
                T.__init__
            )zm.Tz
                module m
                class m.T "void *" ""
                @classmethod
                m.T.__new__
            )zm.T.Cz
                module m
                class m.T "void *" ""
                class m.T.C "void *" ""
                m.T.C.__init__
            r   r-   r`   r  rJ   fulldisplaynamer.   ru  r  rN   r   funcs   &     r1   test_fulldisplayname_class+ClinicParserTest.test_fulldisplayname_class  sn    
$ "JD433

4(''+  !5!5t< 43 "333   AA33Bc                   RpV Fh  w  r#V P                  W#R7      ;_uu_ 4        V P                  V4      pVP                  R,          pV P                  VP                  V4       RRR4       Kj  	  R#   + '       g   i     K  ; i)r  r  N))r  r  )zm.funcz=
                module m
                m.func
            )zT.methzH
                class T "void *" ""
                T.meth
            )zm.T.methze
                module m
                class m.T "void *" ""
                m.T.meth
            )z
m.T.C.methz
                module m
                class m.T "void *" ""
                class m.T.C "void *" ""
                m.T.C.meth
            r   r  r  s   &     r1   test_fulldisplayname_meth*ClinicParserTest.test_fulldisplayname_meth  sn    
, "JD433

4(''+  !5!5t< 43 "333r  c                4    R pRpV P                  W^R7       R# )z
            module foo
            foo.bar
                this: int
                * [from 3]
            Docstring.
        zdFunction 'bar': expected format '[from major.minor]' where 'major' and 'minor' are integers; got '3'r   Nrs   r  s   &  r1   test_depr_star_invalid_format_10ClinicParserTest.test_depr_star_invalid_format_1  s(    > 	 	Eq1r7   c                4    R pRpV P                  W^R7       R# )z
            module foo
            foo.bar
                this: int
                * [from a.b]
            Docstring.
        zfFunction 'bar': expected format '[from major.minor]' where 'major' and 'minor' are integers; got 'a.b'r   Nrs   r  s   &  r1   test_depr_star_invalid_format_20ClinicParserTest.test_depr_star_invalid_format_2  s)    @ 	 	Eq1r7   c                4    R pRpV P                  W^R7       R# )z
            module foo
            foo.bar
                this: int
                * [from 1.2.3]
            Docstring.
        zhFunction 'bar': expected format '[from major.minor]' where 'major' and 'minor' are integers; got '1.2.3'r   Nrs   r  s   &  r1   test_depr_star_invalid_format_30ClinicParserTest.test_depr_star_invalid_format_3  s)    B 	 	Eq1r7   c                4    R pRpV P                  W^R7       R# )z
            module foo
            foo.bar
                this: int
                * [from 3.14]
            Docstring.
        EFunction 'bar' specifies '* [from ...]' without following parameters.r   Nrs   r  s   &  r1   (test_parameters_required_after_depr_star9ClinicParserTest.test_parameters_required_after_depr_star  s(    $ 	 	Eq1r7   c                4    R pRpV P                  W^R7       R# )z
            module foo
            foo.bar
                a: int
                * [from 3.14]
                *
                b: int
            Docstring.
        r  r   Nrs   r  s   &  r1   )test_parameters_required_after_depr_star2:ClinicParserTest.test_parameters_required_after_depr_star2	  (    $ 	 	Eq1r7   c                4    R pRpV P                  W^R7       R# )z
            module foo
            foo.bar
                a: int
                * [from 3.14]
                *args: tuple
                b: int
            Docstring.
        r  r   Nrs   r  s   &  r1   )test_parameters_required_after_depr_star3:ClinicParserTest.test_parameters_required_after_depr_star3  r  r7   c                4    R pRpV P                  W^R7       R# )z
            module foo
            foo.bar
                a: int
                *
                * [from 3.14]
                b: int
            Docstring.
        /Function 'bar': '* [from ...]' must precede '*'r   Nrs   r  s   &  r1   $test_depr_star_must_come_before_star5ClinicParserTest.test_depr_star_must_come_before_star)  $     @Eq1r7   c                4    R pRpV P                  W^R7       R# )z
            module foo
            foo.bar
                a: int
                *args: tuple
                * [from 3.14]
                b: int
            Docstring.
        r  r   Nrs   r  s   &  r1   &test_depr_star_must_come_before_vararg7ClinicParserTest.test_depr_star_must_come_before_vararg6  r  r7   c                4    R pRpV P                  W^R7       R# )z
            module foo
            foo.bar
                a: int
                * [from 3.14]
                b: int
                * [from 3.14]
                c: int
            Docstring.
        z3Function 'bar' uses '* [from 3.14]' more than once.r   Nrs   r  s   &  r1   test_depr_star_duplicate)ClinicParserTest.test_depr_star_duplicateC  $    	 DEq1r7   c                4    R pRpV P                  W^R7       R# )z
            module foo
            foo.bar
                a: int
                * [from 3.14]
                b: int
                * [from 3.15]
                c: int
            Docstring.
        z<Function 'bar': '* [from 3.15]' must precede '* [from 3.14]'r   Nrs   r  s   &  r1   test_depr_star_duplicate2*ClinicParserTest.test_depr_star_duplicate2Q  $    	 MEq1r7   c                4    R pRpV P                  W^R7       R# )z
            module foo
            foo.bar
                a: int
                / [from 3.14]
                b: int
                / [from 3.14]
                c: int
            Docstring.
        z3Function 'bar' uses '/ [from 3.14]' more than once.r   Nrs   r  s   &  r1   test_depr_slash_duplicate*ClinicParserTest.test_depr_slash_duplicate_  r  r7   c                4    R pRpV P                  W^R7       R# )z
            module foo
            foo.bar
                a: int
                / [from 3.15]
                b: int
                / [from 3.14]
                c: int
            Docstring.
        z<Function 'bar': '/ [from 3.14]' must precede '/ [from 3.15]'r   Nrs   r  s   &  r1   test_depr_slash_duplicate2+ClinicParserTest.test_depr_slash_duplicate2m  r  r7   c                0    R pRpV P                  W4       R# )zX
            module foo
            foo.bar
                /
                /
        MFunction 'bar' has an unsupported group configuration. (Unexpected state 0.d)Nrs   r  s   &  r1   test_single_slash"ClinicParserTest.test_single_slash{  #    % 	 	E'r7   c                4    R pRpV P                  W^R7       R# )zi
            module foo
            foo.bar
                / [from 3.14]
            Docstring.
        EFunction 'bar' specifies '/ [from ...]' without preceding parameters.r   Nrs   r  s   &  r1   *test_parameters_required_before_depr_slash;ClinicParserTest.test_parameters_required_before_depr_slash  s(    $ 	 	Eq1r7   c                4    R pRpV P                  W^R7       R# )z
            module foo
            foo.bar
                a: int
                /
                / [from 3.14]
            Docstring.
        r  r   Nrs   r  s   &  r1   +test_parameters_required_before_depr_slash2<ClinicParserTest.test_parameters_required_before_depr_slash2  s(    $ 	 	Eq1r7   c                0    R pRpV P                  W4       R# )z
            module foo
            foo.bar
                a: int
                /
                b: int
                /
        z'Function 'bar' uses '/' more than once.Nrs   r  s   &  r1   test_double_slash"ClinicParserTest.test_double_slash  s     8E'r7   c                0    R pRpV P                  W4       R# )z
            module foo
            foo.bar
               x: int
               y: int
               *
               z: int
               /
        $Function 'bar': '/' must precede '*'Nrs   r  s   &  r1   test_slash_after_star&ClinicParserTest.test_slash_after_star       5E'r7   c                0    R pRpV P                  W4       R# )z
            module foo
            foo.bar
               x: int
               y: int
               *args: tuple
               z: int
               /
        r  Nrs   r  s   &  r1   test_slash_after_vararg(ClinicParserTest.test_slash_after_vararg  r
  r7   c                4    R pRpV P                  W^R7       R# )z
            module foo
            foo.bar
                a: int
                * [from 3.14]
                /
                b: int
            Docstring.
        z/Function 'bar': '/' must precede '* [from ...]'r   Nrs   r  s   &  r1   $test_depr_star_must_come_after_slash5ClinicParserTest.test_depr_star_must_come_after_slash  r  r7   c                4    R pRpV P                  W^R7       R# )z
            module foo
            foo.bar
                a: int
                * [from 3.14]
                / [from 3.14]
                b: int
            Docstring.
        z:Function 'bar': '/ [from ...]' must precede '* [from ...]'r   Nrs   r  s   &  r1   )test_depr_star_must_come_after_depr_slash:ClinicParserTest.test_depr_star_must_come_after_depr_slash  s$     KEq1r7   c                4    R pRpV P                  W^R7       R# )z
            module foo
            foo.bar
                a: int
                *
                / [from 3.14]
                b: int
            Docstring.
        /Function 'bar': '/ [from ...]' must precede '*'r   Nrs   r  s   &  r1   $test_star_must_come_after_depr_slash5ClinicParserTest.test_star_must_come_after_depr_slash  r  r7   c                4    R pRpV P                  W^R7       R# )z
            module foo
            foo.bar
                a: int
                *args: tuple
                / [from 3.14]
                b: int
            Docstring.
        r  r   Nrs   r  s   &  r1   &test_vararg_must_come_after_depr_slash7ClinicParserTest.test_vararg_must_come_after_depr_slash  r  r7   c                4    R pRpV P                  W^R7       R# )z
            module foo
            foo.bar
                a: int
                / [from 3.14]
                /
                b: int
            Docstring.
        z/Function 'bar': '/' must precede '/ [from ...]'r   Nrs   r  s   &  r1   %test_depr_slash_must_come_after_slash6ClinicParserTest.test_depr_slash_must_come_after_slash  r  r7   c                0    R pRpV P                  W4       R# )z]
            module foo
            foo.bar
                /
                x: int
        r  Nrs   r  s   &  r1   1test_parameters_not_permitted_after_slash_for_nowBClinicParserTest.test_parameters_not_permitted_after_slash_for_now  r  r7   c                4    R pRpV P                  W!^R7       R# )r  zr
            module foo
            foo.bar
               *vararg1: tuple
               *vararg2: tuple
        r   Nrs   r   s   &  r1   'test_parameters_no_more_than_one_vararg8ClinicParserTest.test_parameters_no_more_than_one_vararg  #    7 	Eq1r7   c                L    V P                  R 4      pV P                  VR4       R# )z
              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.
        Nr4  r5  s   & r1   test_function_not_at_column_0.ClinicParserTest.test_function_not_at_column_0"  s.    && (  	H ' 	r7   c                L    V P                  R 4      pV P                  VR4       R# )zH
              module m
              m.f
              summary
        zG
            f($module, /)
            --

            summary
        Nr4  r5  s   & r1   test_docstring_only_summary,ClinicParserTest.test_docstring_only_summary6  s.    && ( 
 	H ' 	r7   c                L    V P                  R 4      pV P                  VR4       R# )z4
              module m
              m.f


        z2
            f($module, /)
            --
        Nr4  r5  s   & r1   test_docstring_empty_lines+ClinicParserTest.test_docstring_empty_linesC  s.    && (  	H ' 	r7   c                L    V P                  R 4      pV P                  VR4       R# )a  
              module m
              m.f
                a: int
                    Param docstring for 'a' will be included
                b: int
                c: int
                    Param docstring for 'c' will be included
              This is the summary line.

              We'll now place the params section here:
              {parameters}
              And now for something completely different!
              (Note the added newline)
        a  
            f($module, /, a, b, c)
            --

            This is the summary line.

            We'll now place the params section here:
              a
                Param docstring for 'a' will be included
              c
                Param docstring for 'c' will be included

            And now for something completely different!
            (Note the added newline)
        Nr4  r5  s   & r1   (test_docstring_explicit_params_placement9ClinicParserTest.test_docstring_explicit_params_placementO  s.    && (  	H ' 	r7   c                0    R pRpV P                  W4       R# )zp
            module foo
            foo.bar
               *vararg1: tuple
            	*vararg2: tuple
        zATab characters are illegal in the Clinic DSL: '\t*vararg2: tuple'Nrs   r  s   &  r1   test_indent_stack_no_tabs*ClinicParserTest.test_indent_stack_no_tabso  s    &E'r7   c                0    R pRpV P                  W4       R# )zc
            module foo
            foo.bar
              a: object
             b: object
        zIllegal outdentNrs   r  s   &  r1   !test_indent_stack_illegal_outdent2ClinicParserTest.test_indent_stack_illegal_outdentz  s      E'r7   c                   a \        \        4       4      oR Sn        V3R lSP                  R&   \	        R4      pSP                  V4       V P                  SP                  4       R# )Fc                     < \        S R R4      # )flagT)setattr)rM   s   r1   <lambda>1ClinicParserTest.test_directive.<locals>.<lambda>  s    0Mr7   setflagN)r&   rB   r9  
directivesr"   r`   r  )r.   r   rM   s   & @r1   test_directiveClinicParserTest.test_directive  sL    <>*'M)$i U$r7   c                    V P                  R 4      pVP                  w  r#VP                  R,          P                  pV P	                  V\
        4       R# )z module os
os.access
   path: "s"r  N)r`   r  r  r  r  r   )r.   r   r  r  r(  s   &    r1   test_legacy_converters'ClinicParserTest.test_legacy_converters  sE    

?@ ++##F+66dM2r7   c           	         R pRpV F9  pV P                  VR7      ;_uu_ 4        V P                  W1^R7       RRR4       K;  	  R#   + '       g   i     KP  ; i)?Annotations must be either a name, a function call, or a stringr  r   N)zmodule 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"r  r.   ru   ru  r   s   &   r1   5test_legacy_converters_non_string_constant_annotationFClinicParserTest.test_legacy_converters_non_string_constant_annotation  sP    O
 EE**##Eq#9 +* ***   AAc           	         R pRpV F9  pV P                  VR7      ;_uu_ 4        V P                  W1^R7       RRR4       K;  	  R#   + '       g   i     KP  ; i)rE  r  r   N)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))r  rF  s   &   r1   -test_other_bizarre_things_in_annotations_fail>ClinicParserTest.test_other_bizarre_things_in_annotations_fail  sP    O

 EE**##Eq#9 +* ***rI  c                    R pRpV F7  pV P                  VR7      ;_uu_ 4        V P                  W14       RRR4       K9  	  R#   + '       g   i     KN  ; i)z6Cannot use a kwarg splat in a function-call annotationr  N)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})r  rF  s   &   r1   9test_kwarg_splats_disallowed_in_function_call_annotationsJClinicParserTest.test_kwarg_splats_disallowed_in_function_call_annotations  sK    F
 EE**##E/ +* ***r  c                4    R pRpV P                  W!^R7       R# )zVA '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 *")
        r   Nrs   r   s   &  r1   test_self_param_placement*ClinicParserTest.test_self_param_placement  s(    & 	 	Eq1r7   c                4    R pRpV P                  W!^R7       R# )z-A 'self' parameter cannot be marked optional.zj
            module foo
            foo.func
                self: self(type="PyObject *") = None
        r   Nrs   r   s   &  r1   "test_self_param_cannot_be_optional3ClinicParserTest.test_self_param_cannot_be_optional  s#    =
 	Eq1r7   c                4    R pRpV P                  W!^R7       R# )z}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
        r   Nrs   r   s   &  r1   #test_defining_class_param_placement4ClinicParserTest.test_defining_class_param_placement  s)    M 	 	Eq1r7   c                4    R pRpV P                  W!^R7       R# )z7A 'defining_class' parameter cannot be marked optional.zs
            module foo
            foo.func
                cls: defining_class(type="PyObject *") = None
        r   Nrs   r   s   &  r1   ,test_defining_class_param_cannot_be_optional=ClinicParserTest.test_defining_class_param_cannot_be_optional  s#    G
 	Eq1r7   c                    R pRpV P                  \        V4      ;_uu_ 4        V P                  V4       RRR4       R#   + '       g   i     R# ; i)z
            module foo
            class Foo "" ""
            Foo.__init__
                cls: defining_class
                a: object
        z0Slot methods cannot access their defining class.N)rI   r  r  r  s   &  r1   .test_slot_methods_cannot_access_defining_class?ClinicParserTest.test_slot_methods_cannot_access_defining_class  sA     A##J44& 5444s	   ?A	c                4    R pRpV P                  W!^R7       R# )z!'__new__' must be a class method!zT
            module foo
            class Foo "" ""
            Foo.__new__
        r   Nrs   r   s   &  r1   test_new_must_be_a_class_method0ClinicParserTest.test_new_must_be_a_class_method  s#    1
 	Eq1r7   c           	        R pRRRRRR/pVP                  4        FR  w  r4V P                  W4R7      ;_uu_ 4        RV R	2pVP                  V4      pV P                  WV^R
7       RRR4       KT  	  R#   + '       g   i     Ki  ; i)z:'__init__' must be a normal method; got 'FunctionKind.{}'!z@classmethodCLASS_METHODz@staticmethodSTATIC_METHOD@getterGETTER)
annotationinvalid_kindX
                    module foo
                    class Foo "" ""
                    z2
                    Foo.__init__
                r   N)rM  r-   rD  rb   )r.   err_templateannotationsrg  rh  r   r=  s   &      r1   !test_init_must_be_a_normal_method2ClinicParserTest.test_init_must_be_a_normal_method  s    SN_x

 )4(9(9(;$JOO  L ! ".!4!4\!B##E!#D PO )<OOOs   +A33Bc                4    R pRpV P                  W^R7       R# )zF
            class Foo "" ""
            Foo.__init__ -> long
        z,__init__ methods cannot define a return typer   Nrs   r.   r   r=  s   &  r1   %test_init_cannot_define_a_return_type6ClinicParserTest.test_init_cannot_define_a_return_type		  s$     HE!<r7   c           	        R R.pV F`  pV P                  VR7      ;_uu_ 4        RV R2pV R2pV P                  W4^R7       RV R2pV R	2pV P                  W44       R
R
R
4       Kb  	  R
#   + '       g   i     Kw  ; i)re  @setterrg  ri  9
                    Foo.property -> int
                z# method cannot define a return typer   zU
                   module foo
                   class Foo "" ""
                   zj
                   Foo.property
                       obj: int
                       /
                z! methods cannot define parametersNr  r.   rk  rg  r   r=  s   &    r1   test_invalid_getset$ClinicParserTest.test_invalid_getset	  s     ),%J44  L ! %/</R!S##E!#D <   %/</P!Q##E:' 54 &444s   ;A--A>c                0    R pRpV P                  W4       R# )z
            module foo
            class Foo "" ""
            @setter
            Foo.property

            foo

            bar
            [clinic start generated code]*/
        z6docstrings are only supported for @getter, not @setterNrs   ro  s   &  r1   test_setter_docstring&ClinicParserTest.test_setter_docstring)	  s    
 RE2r7   c           	         R R.pV FH  pV P                  VR7      ;_uu_ 4        RV RV R2pRV R2pV P                  W4^R7       R	R	R	4       KJ  	  R	#   + '       g   i     K_  ; i)
re  rs  rt  ri  
                    ru  zCannot apply z twice to the same function!r   Nr  rv  s   &    r1   test_duplicate_getset&ClinicParserTest.test_duplicate_getset8	  s     ),%J44  L !L !	 $1<X!Y##E!#D 54 &444s   #AA&c           	         RR	.pV FR  pV P                  VR7      ;_uu_ 4        RV^ ,           RV^,           R2pRpV P                  W4^R7       RRR4       KT  	  R#   + '       g   i     Ki  ; i)
re  )dupri  r}  ru  z;Cannot apply both @getter and @setter to the same function!r   Nre  rs  )rs  re  r  )r.   dup_annotationsr  r   r=  s   &    r1   2test_getter_and_setter_disallowed_on_same_functionCClinicParserTest.test_getter_and_setter_disallowed_on_same_functionF	  s    13IJ"C#&& VH VH 	 "_##E!#D '& #&&&s   -AA0c           	         R FA  pV P                  VR7      ;_uu_ 4        RV R2pRpV P                  W#^R7       RRR4       KC  	  R#   + '       g   i     KX  ; i)re  rt  z2
                    module m
                    z,
                    m.func
                z#@getter and @setter must be methodsr   Nr  r  )r.   rg  r   r=  s   &   r1   test_getset_no_class%ClinicParserTest.test_getset_no_classT	  s`    .J44L !
 "G##E!#D 54 /444s   A

Ac                4    R pRpV P                  W!^R7       R# )zCalled @coexist twicezY
            module m
            @coexist
            @coexist
            m.fn
        r   Nrs   r   s   &  r1   test_duplicate_coexist'ClinicParserTest.test_duplicate_coexist_	  s#    % 	Eq1r7   c                P  a V P                  R 4      pVP                  ^,          pVP                  oV3R lpRRRR/RRRR/RRRR/RR	RR/3pV F  pVP                  4       w  rgV P	                  WgR
7      ;_uu_ 4        V! V4      pV P                  WxP                  4       VP                  RR7      p	V'       d   V P                  RV	4       MV P                  RV	4       VP                  RR7      p
V P                  RV
4       RRR4       K  	  R#   + '       g   i     K  ; i)z
            module foo
            foo.func
                fn: object
                k: float
                i: float(unused=True)
                /
                *
                flag: bool(unused=True) = False
        c                 *   < SV ,          P                   # rF   r  )r,   paramss   &r1   r;  4ClinicParserTest.test_unused_param.<locals>.<lambda>v	  s    &*..r7   r  r,   unusedFkiTr9  )r  r  )	in_parser	Py_UNUSEDN)
r`   r  r  valuesr-   rJ   r  simple_declarationr   r   )r.   r   sigr(  ru  paramr  r  r  declparser_declr  s   &          @r1   test_unused_param"ClinicParserTest.test_unused_parami	  s   

 	 	 q!.T8U+S(E*S(D)VXt,	
 E <<>LD477J  2 ++e+<MM+t4$$[$7  22T2B  k: 87 777s   ?BDD%c           
     R   V P                  \        \        4      R 4       V P                  \        \        4      R4       \        P
                  ! 4       ;_uu_ 4       pRpV P                  \        V4      ;_uu_ 4       p\        VR^ER7       RRR4       XP                  pV P                  VP                  R4       V P                  VP                  ^E4       V P                  VP                  4       R4       RRR4       R#   + '       g   i     L~; i  + '       g   i     R# ; i)z<Unspecified>z<Null>zThe igloos are meltingz	clown.txt)r9   line_numberNr>   )rJ   reprr   r   r   r   rI   r   r   rK   r9   rC   r   )r.   r   rO   rP   r  s   &    r1   test_scaffolding!ClinicParserTest.test_scaffolding	  s    k*O<dX. $$&&&-F''V<<VkrB =,,CS\\;7SZZ,V__.3 '&<< '&&s%   !D=D	A,DDDD&	c                    R p\         P                  ! 4       ;_uu_ 4       pV P                  V4       RRR4       \        R4      pV P	                  XP                  4       V4       R#   + '       g   i     L=; i)u   
            module test
            test.fn
                a: int
                    á param docstring
            docstring fü bár baß
        Nu               Warning:
            Non-ascii characters are not allowed in docstrings: 'á'

            Warning:
            Non-ascii characters are not allowed in docstrings: 'ü', 'á', 'ß'

        )r   r   r`   r   rJ   r   )r.   r   r   r   s   &   r1   %test_non_ascii_character_in_docstring6ClinicParserTest.test_non_ascii_character_in_docstring	  s`     $$&&&JJu '    	*H5 '&s   A''A7	c                4    R pRpV P                  W!^R7       R# )zIllegal C identifier: 17azS
            module test
            test.fn
                a as 17a: int
        r   Nrs   r   s   &  r1   test_illegal_c_identifier*ClinicParserTest.test_illegal_c_identifier	  s#    )
 	Eq1r7   c                4    R pRpV P                  W!^R7       R# )z5'__len__' is a special method and cannot be convertedz9
            class T "" ""
            T.__len__
        r   Nrs   r   s   &  r1   "test_cannot_convert_special_method3ClinicParserTest.test_cannot_convert_special_method	  s#    E 	Eq1r7   c                4    R pRpV P                  W!^R7       R# )z@You can't specify py_default without specifying a default value!zE
            fn
                a: object(py_default='NULL')
        r   Nrs   r   s   &  r1   -test_cannot_specify_pydefault_without_default>ClinicParserTest.test_cannot_specify_pydefault_without_default	  s#    P 	Eq1r7   c                4    R pRpV P                  W!^R7       R# )z3Function 'fn' has an invalid parameter declaration:z<
            fn
                *args: tuple = None
        r   Nrs   r   s   &  r1   %test_vararg_cannot_take_default_value6ClinicParserTest.test_vararg_cannot_take_default_value	  s#    C 	Eq1r7   c                4    R pRpV P                  W!^R7       R# )zCint_converter: default value 2.5 for field 'a' is not of type 'int'z5
            fn
                a: int = 2.5
        r   Nrs   r   s   &  r1   #test_default_is_not_of_correct_type4ClinicParserTest.test_default_is_not_of_correct_type	  s%    & 	Eq1r7   c                4    R pRpV P                  W!^R7       R# )z%'fhi' is not a valid legacy converterz1
            fn
                a: 'fhi'
        r   Nrs   r   s   &  r1   test_invalid_legacy_converter.ClinicParserTest.test_invalid_legacy_converter	  s#    5 	Eq1r7   c                4    R pRpV P                  W!^R7       R# )z+Parent class or module 'baz' does not existz3
            module m
            baz.func
        r   Nrs   r   s   &  r1   *test_parent_class_or_module_does_not_exist;ClinicParserTest.test_parent_class_or_module_does_not_exist	  s#    ; 	Eq1r7   c                4    R pRpV P                  W!^R7       R# )z'You can't have two parameters named 'a'za
            module m
            m.func
                a: int
                a: float
        r   Nrs   r   s   &  r1   test_duplicate_param_name*ClinicParserTest.test_duplicate_param_name	  r$  r7   c                4    R pRpV P                  W!^R7       R# )z+Parameter 'module' requires a custom C namezM
            module m
            m.func
                module: int
        r   Nrs   r   s   &  r1   !test_param_requires_custom_c_name2ClinicParserTest.test_param_requires_custom_c_name	  s#    ;
 	Eq1r7   c                4    R pRpV P                  W!^R7       R# )z0Function 'func' has a ']' without a matching '['zY
            module m
            m.func
                ]
            docstring
        r   Nrs   r   s   &  r1   )test_state_func_docstring_assert_no_group:ClinicParserTest.test_state_func_docstring_assert_no_group 
  s#    @ 	Eq1r7   c                4    R pRpV P                  W!^R7       R# )z4Docstring for 'm.func' does not have a summary line!z_
            module m
            m.func
            docstring1
            docstring2
        r   Nrs   r   s   &  r1   $test_state_func_docstring_no_summary5ClinicParserTest.test_state_func_docstring_no_summary

  s#    D 	Eq1r7   c                4    R pRpV P                  W!^R7       R# )z?You may not specify {parameters} more than once in a docstring!z
            module m
            m.func
            docstring summary

            these are the params:
                {parameters}
            these are the params again:
                {parameters}
        r   Nrs   r   s   &  r1   1test_state_func_docstring_only_one_param_templateBClinicParserTest.test_state_func_docstring_only_one_param_template
  s#    O	 	Eq1r7   c                    V P                  R ^^R7      pVP                  R,          pV P                  VP                  \        P
                  P                  4       R# )z}
            module m
            class m.C "PyObject *" ""
            m.C.meth
                cls: defining_class
        r  clsN)r  r  rJ   rf  rd  r   rs  r   s   &  r1   test_kind_defining_class)ClinicParserTest.test_kind_defining_class"
  sU    && (
 "#1 ' 6 &!2!2!B!BCr7   c                4    R pRpV P                  W!^R7       R# )z?A 'defining_class' parameter cannot be defined at module level.zU
            module m
            m.func
                cls: defining_class
        r   Nrs   r   s   &  r1   ,test_disallow_defining_class_at_module_level=ClinicParserTest.test_disallow_defining_class_at_module_level,
  s#    O
 	Eq1r7   r4   )rB  rq  )|r.  r/  r0  r1  r`   r  rb   r  r  r  r  r  r  r  r  r  r!  r$  r)  r,  r1  r6  r9  r>  rA  rD  rH  rK  rN  rT  rX  r[  r^  ra  rh  rl  rv  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r"  r&  r)  r,  r/  r2  r5  r?  rB  rG  rK  rN  rQ  rT  rW  rZ  r]  r`  rl  rp  rw  rz  r~  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r3  r4  r5  s   @r1   r  r    s    !N $N-1N9=N
/
	,,
:*
*2*: R2	2	32:8,0@<224O(((	%
%(TL\2$($($($("("
(0*	66((5
(
0=2=:22222 2 222222(22
(((22222(2(
@	((%3
:	:
02222
'2E$=;03EE	E2$;L46*222222222222D2 2r7   r  c                      a  ] tR tRt o RtR tR tR tR tR t	R t
R	 tR
 tR tR t]P                   R 4       tR tR tR tR tR tR tR tRtV tR# )ClinicExternalTesti6
  Nc                    \        V 4       R # rF   )r[   rg   s   &r1   rh   ClinicExternalTest.setUp9
  s
    %r7   c                   \         P                  ! 4       ;_uu_ 4       p\         P                  ! 4       ;_uu_ 4       pV P                  \        4      ;_uu_ 4       p\
        P                  ! V4       R R R 4       R R R 4       R R R 4       XP                  4       XP                  4       XP                  P                  3#   + '       g   i     LU; i  + '       g   i     L`; i  + '       g   i     Lk; irF   )
r   r   rQ  r  
SystemExitr   mainr   rK   rN   )r.   r0  r   ru   rP   s   &*   r1   
run_clinicClinicExternalTest.run_clinic<
  s    ##%%##%%j))RKK * & &
 ||~s||~r||/@/@@@ *) &% &%s:   C$C	B>1C	9C$>C	C	C!C$$C4	c                    V P                   ! V!  w  r#pV^ 8w  d'   V P                  RP                  RV: 2W#.4      4       V P                  VR4       V# )r   r   zUnexpected failure: args=r>   )r  r   joinrJ   r.   r0  r   ru   rN   s   &*   r1   expect_success!ClinicExternalTest.expect_successE
  sR    $/$19IIdii#=w!? JKLb!
r7   c                \    V P                   ! V!  w  r#pV P                  V^ RV: 24       W#3# )r   zUnexpected success: args=)r  rm   r  s   &*   r1   rb   !ClinicExternalTest.expect_failureL
  s5    $/$D!'AD7%CDxr7   c                   R p\         P                  ! V4      p\        VRR7      ;_uu_ 4       pVP                  4       pRRR4       V P	                  \
        \        4       V P                  RR\        V4      pV P                  VR4       \        \        RR7      ;_uu_ 4       pVP                  4       pRRR4       V P                  XX4       R#   + '       g   i     L; i  + '       g   i     L7; i)zclinic.test.cutf-8encodingN-f-or>   )	r   findfileopenreadrX   r   r   r  rJ   )r.   CLINIC_TESTsourcer  orig_contentsr   new_contentss   &      r1   test_external ClinicExternalTest.test_externalQ
  s    %!!+.&7++qFFHM , 	'!!$ff=b!&7++q668L , 	}5 ,+ ,+s   C$C$C!	$C4	c           	        \        R 4      p\        P                  ! 4       ;_uu_ 4       p\        P                  P                  VR4      p\        VRRR7      ;_uu_ 4       pVP                  V4       RRR4       \        P                  ! V4      P                  pV P                  V4       \        P                  ! V4      P                  pRRR4       V P                  XX4       R#   + '       g   i     L}; i  + '       g   i     L7; i)z
            /*[clinic input]
            [clinic start generated code]*/
            /*[clinic end generated code: output=da39a3ee5e6b4b0d input=da39a3ee5e6b4b0d]*/
        re   wr  r  N)r   r   temp_dirr  r  r  r  writestatst_mtime_nsr  rJ   )r.   rN   tmp_dirr,   r  	pre_mtime
post_mtimes   &      r1   test_no_change!ClinicExternalTest.test_no_changea
  s       
 !!Wgx0Bb#00A 1//I#00J " 	J/ 10 "!s$   7C: C'	2AC:'C72C::D
	c           	        \        R 4      pRp\        P                  ! 4       ;_uu_ 4       p\        P                  P                  VR4      p\        VRRR7      ;_uu_ 4       pVP                  V4       RRR4       V P                  V4      w  rgV P                  Wr4       V P                  RV4      pV P                  VR4       R	p	\        VRR7      ;_uu_ 4       pVP                  4       p
RRR4       V P                  X
V	4       RRR4       R#   + '       g   i     L; i  + '       g   i     L?; i  + '       g   i     R# ; i)
aA  
            /*[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]*/
        zChecksum mismatch! Expected 'bogus', computed '2ed19'. Suggested fix: remove all generated code including the end marker, or use the '-f' option.
re   r  r  r  Nr  r>   zP/*[clinic end generated code: output=a2957bc4d43a3c2f input=9543a8d2da235301]*/
)r   r   r  r  r  r  r  r  rb   assertEndsWithr  rJ   r  )r.   invalid_inputfail_msgr  r,   r  _ru   r   checksumr   s   &          r1   test_cli_force!ClinicExternalTest.test_cli_forceu
  s    
  
( 	
 !!Wgx0Bb#00A& 1
 ((,FA.%%dB/CS"%F  b7++qFFH	 ,	84' "!00 ,+# "!!s<   7D6"D	4A'D6D#	,D6D D6#D3.D66E	c           
     `   \        R 4      pRpR
pRpR p\        P                  ! 4       ;_uu_ 4       pV! W6V4       V! WFV4       \        P                  P                  VR4      p\        P                  ! VR7      ;_uu_ 4       pV! W8V4       V P                  RRRV4      p	RRR4       V FW  p
V P                  V
R	7      ;_uu_ 4        \        P                  P                  Wj4      pV P                  VX	4       RRR4       KY  	  V FW  p
V P                  V
R	7      ;_uu_ 4        \        P                  P                  Wj4      pV P                  VX	4       RRR4       KY  	  V FW  p
V P                  V
R	7      ;_uu_ 4        \        P                  P                  Wz4      pV P                  VX	4       RRR4       KY  	  RRR4       R#   + '       g   i     EL2; i  + '       g   i     EKE  ; i  + '       g   i     K  ; i  + '       g   i     K  ; i  + '       g   i     R# ; i)R
            /*[clinic input]
            [clinic start generated code]*/
        passc                     V  FR  p\         P                  P                  W4      p\        VR RR7      ;_uu_ 4       pVP	                  V4       RRR4       KT  	  R#   + '       g   i     Ki  ; i)r  r  r  N)r  r  r  r  r  )filessrcdirrN   r,   r  r  s   &&&   r1   create_files6ClinicExternalTest.test_cli_make.<locals>.create_files
  sL    ww||F/$g66!GGDM 76 666s   AA,	externals)r  -v--make--srcdirNrf   )file1.cfile2.c)zfile1.pyzfile2.py)
r   r   r  r  r  r  r  r-   r   r   )r.   c_codepy_codec_filespy_filesr	  r  ext_pathr  r   r9   r  s   &           r1   test_cli_make ClinicExternalTest.test_cli_make
  s      &)	" !!W62G4 ww||G[9H##22iW8 ))$*gN	 3 $\\8\4477<<:DMM$, 54 $ %\\8\4477<<:D$$T3/ 54 %
 $\\8\4477<<;D$$T3/ 54 $/ "! 322 544 544
 5441 "!!sl   AHG	"'H	2G;+H&2G4+H2H5HG	HG1*
H4H?	HH	HH-	c                   \        R 4      p\        P                  ! RR7      ;_uu_ 4       pR FR  p\        P                  P                  W#4      p\        VRRR	7      ;_uu_ 4       pVP                  V4       R
R
R
4       KT  	  V P                  RRRVR\        P                  P                  VR4      R\        P                  P                  VR4      RR4
      pV P                  RV4       V P                  RV4       V P                  RV4       V P                  RV4       R
R
R
4       R
#   + '       g   i     EK  ; i  + '       g   i     R
# ; i)r  F)quietr  r  file3.cfile4.cr  r  r  Nr  r  r  z	--excludez	./file3.c)r  r  r  r  )r   r   r  r  r  r  r  r  r  r   r   )r.   rN   r  r,   r  r  r   s   &      r1   test_cli_make_exclude(ClinicExternalTest.test_cli_make_exclude
  s      e,,@ww||G0$g66!GGDM 76 A %%h
GRWW\\'9=RWW\\';?YC MM)S)Y,Y,Y,- -, 766	 -,,s$   ;E&D,8B*E,D>7
EE	c           	        \         P                  ! 4       ;_uu_ 4       p\        P                  P	                  VR 4      p\        VRRR7      ;_uu_ 4       pVP                  R4       RRR4       V P                  RV4      pV P                  VP                  4       V4       RRR4       R#   + '       g   i     LL; i  + '       g   i     R# ; i)re   r  r  r  r>   Nr  )
r   r  r  r  r  r  r  r  rJ   rD   )r.   r  r,   r  r   s   &    r1   test_cli_verbose#ClinicExternalTest.test_cli_verbose
  s    !!Wgx0Bb#00A 1%%dB/CSYY["- "!00 "!!s#   7B>B+	':B>+B;6B>>C	c                L    V P                  R 4      pV P                  RV4       R# )z-hzusage: clinic.pyN)r  r   )r.   r   s   & r1   test_cli_help ClinicExternalTest.test_cli_help
  s!    !!$'(#.r7   c                   \        R 4      pRp\        R4      pV P                  R4      pV P                  WA4       V P                  WC4       VP	                  V4      pVP                  V4      pVP                  R4      p\        W%4       FI  w  rgVP                  4       pV P                  VR7      ;_uu_ 4        V P                  Wv4       RRR4       KK  	  R#   + '       g   i     K`  ; i)z
            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:
        a  
            Return converters:
                bool()
                double()
                float()
                int()
                long()
                object()
                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).
        --convertersr   r  N) boolbytechardefining_classdoublefildesfloatintlong	long_longobject	Py_buffer
Py_complex
Py_ssize_t
Py_UNICODEPyByteArrayObjectPyBytesObjectr.   shortsize_tslice_indexr  uint16uint32uint64uint8unicodeunsigned_charunsigned_intunsigned_longunsigned_long_longunsigned_short)
r   r  r   r  removeprefixremovesuffixr   zipr   r-   )r.   preludeexpected_convertersfinaler   linesr  lines   &       r1   test_cli_converters&ClinicExternalTest.test_cli_converters
  s      !
D     !!.1
 	c+C(w'v&		$"#6>OI;;=D	22%%d6 32  ?222s   9CC*c                T    V P                  R R4      w  rRpV P                  W24       R# )r%  re   z:can't specify --converters and a filename at the same timeNrb   r   r.   r  ru   msgs   &   r1   %test_cli_fail_converters_and_filename8ClinicExternalTest.test_cli_fail_converters_and_filename:  s'    $$^X>Jcr7   c                N    V P                  4       w  rV P                  R V4       R# )zno input filesNrO  )r.   r  ru   s   &  r1   test_cli_fail_no_filename,ClinicExternalTest.test_cli_fail_no_filename?  s!    $$&&,r7   c                X    V P                  R RRR4      w  rRpV P                  W24       R# )r  out.czinput.czmoreinput.cz+error: can't use -o with multiple filenamesNrO  rP  s   &   r1   'test_cli_fail_output_and_multiple_files:ClinicExternalTest.test_cli_fail_output_and_multiple_filesC  s+    $$T7I}M;cr7   c                    R pR FM  pV P                  VR7      ;_uu_ 4        V P                  ! R.VO5!  w  r4V P                  W4       RRR4       KO  	  R#   + '       g   i     Kd  ; i)z%can't use -o or filenames with --make)optsr  N))r  rX  )z
filename.c)r-   rb   r   )r.   rQ  r\  r  ru   s   &    r1   )test_cli_fail_filename_or_output_and_make<ClinicExternalTest.test_cli_fail_filename_or_output_and_makeH  sW    54D4((,,X==c' )( 5(((s   (AA)c                V    V P                  R RR4      w  rRpV P                  W24       R# )r  r  r>   z-error: --srcdir must not be empty with --makeNrO  rP  s   &   r1   !test_cli_fail_make_without_srcdir4ClinicExternalTest.test_cli_fail_make_without_srcdirO  s)    $$Xz2>=cr7   c           	        \        R 4      pRp\        R4      p\        P                  ! 4       ;_uu_ 4       p\        P                  P                  VR4      p\        P                  P                  VR4      p\        VRRR7      ;_uu_ 4       pVP                  V4       RRR4       \        VRRR7      ;_uu_ 4       pVP                  R	4       RRR4       V P                  V4      w  rR
V: R2p
V P                  W4       V P                  RV4      p\        VRR7      ;_uu_ 4       pVP                  4       pV V 2pV P                  W4       RRR4       \        VRR7      ;_uu_ 4       pVP                  4       pV P                  W4       RRR4       RRR4       R#   + '       g   i     EL; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     LT; i  + '       g   i     R# ; i)z
            /*[clinic input]
            destination test new file {path}.h
            output everything test
            func
                a: object
                /
            [clinic start generated code]*/
        zP/*[clinic end generated code: output=da39a3ee5e6b4b0d input=b602ab8e173ac3bd]*/
a              /*[clinic input]
            preserve
            [clinic start generated code]*/

            PyDoc_VAR(func__doc__);

            PyDoc_STRVAR(func__doc__,
            "func($module, a, /)\n"
            "--\n"
            "\n");

            #define FUNC_METHODDEF    \
                {"func", (PyCFunction)func, METH_O, func__doc__},

            static PyObject *
            func(PyObject *module, PyObject *a)
            /*[clinic end generated code: output=3dde2d13002165b9 input=a9049054013a1b77]*/
        re   ztest.c.hr  r  r  Nr>   zModified destination file z; not overwriting!r  )r   r   r  r  r  r  r  r  rb   r   r  r  rJ   )r.   r   expected_checksum_lineexpected_outputr  in_fnout_fnr  r  ru   expected_errdataexpected_blocks   &            r1   test_file_dest!ClinicExternalTest.test_file_destT  s     B 	 ! " & !!WGGLL(3EWW\\':6FeS733q 4fcG44 5 ((/FA8
 C/ /LMM,,##D%0Aeg..!vvx$)7+A*B!C  6 / fw//1vvx  7 0' "! 43344 /. 0/' "!!sm   AG/F"	G/=F6	AG/)(G		G/."G	G/"F3-	G/6GG/	GG/G,'G//H 	r4   )r.  r/  r0  r1  r2  rh   r  r  rb   r  r  r  r  r  r  r   force_not_colorizedr"  rL  rR  rU  rY  r]  r`  rj  r3  r4  r5  s   @r1   r  r  6
  s     G&A
6 0($5L)0V-:.   / !/H7T 
- 
( 
68 68r7   r  z_testclinic is missingc                     a  ] tR tRt o ]! 4       P                  R ]! ]4       4       4       R tRR/R lt	RR/R lt
R tR	 tR
 tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR t R t!R t"R  t#R! t$R" t%R# t&R$ t'R% t(R& t)R' t*R( t+R) t,R* t-R+ t.R, t/R- t0R. t1R/ t2R0 t3]Ee5   ]4! ]Pj                  ]Pl                  ]Pn                  Pp                  ]Pn                  Pr                  4      R1 4       t:]4! ]Pv                  ]Px                  ]Pn                  Pz                  ]Pn                  P|                  4      R2 4       t?]4! ]P                  ]P                  ]Pn                  P                  ]Pn                  P                  4      R3 4       tD]4! ]P                  ]P                  ]Pn                  P                  ]Pn                  P                  4      R4 4       tIR5 tJR6 tKR7 tLR8 tMR9 tNR: tOR; tPR< tQR= tRR> tSR? tTR@ tURA tVRB tWRC tXRD tYRE tZRF t[RG t\RH t]RI t^RJ t_RK t`RL taRM tbRN tcRO tdRP teRQ tfRR tgRS thRT tiRU tjRV tkRW tlRX tmRY tnRZ toR[ tpR\ tqR] trR^ tsR_ ttR` tuRa tvRbtwV txR# )cClinicFunctionalTesti  c              #  v   "   T F/  qP                  R 4      '       g   K  V\        \        V4      3x  K1  	  R# 5itest_N)
startswithgetattr	ac_tester.0r  s   & r1   	<genexpr>ClinicFunctionalTest.<genexpr>  s/      L .//'2J 5T79d34 .   99c               >   V P                  \        V4      ;_uu_ 4       pV! V/ VB \        P                  ! 4       P                  rvR R R 4       V P                  XP                  \        4       V P                  VP                  X4       R #   + '       g   i     LN; irF   )	assertWarnsRegexDeprecationWarningr  	_getframef_linenorJ   r9   __file__rC   )r.   r  r,   r0  kwdsrP   r  rC   s   """*,   r1   
check_deprClinicFunctionalTest.check_depr  so    ""#5u== D)D)3==?+C+Cv > 	h/F+ >=s   'BB	r  Nc                  Vf4   VP                   p\        V\        4      '       d   VP                   RV 2pR\        P
                  ! V4       RV R2pV P                  ! Wb.VO5/ VB  R # )N.z:Passing( more than)?( [0-9]+)? positional argument(s)? to z \(\) is deprecated. Parameters? z: will become( a)? keyword-only parameters? in Python 3\.14r0  
isinstancetyper/  rG   rH   r  )r.   pnamesr,   r  r0  r  r  s   """$*, r1   check_depr_star$ClinicFunctionalTest.check_depr_star  ss    <??D"d##--$0I		$  @ IDE 	
 	1D1D1r7   c                  Vf4   VP                   p\        V\        4      '       d   VP                   RV 2pRV9   d   RMRpRV RV R\        P
                  ! V4       RV RV R2pV P                  ! Wr.VO5/ VB  R # )	Nr   r  r>   zPassing keyword argumentz to z\(\) is deprecated. Parameterz- will become positional-only in Python 3\.14.r  )r.   r  r,   r  r0  r  plr  s   &&&$*,  r1   check_depr_kwd#ClinicFunctionalTest.check_depr_kwd  s    <??D"d##--$06MSr't1VHD		$  =bT6( K<= 	
 	1D1D1r7   c                   V P                  \        4      ;_uu_ 4        \        P                  ! 4        R R R 4       V P	                  \        P                  ! ^^4      R4       V P	                  \        P                  ! . R4      . R34       V P	                  \        P                  ! ^4      R4       R #   + '       g   i     L; i)Nzwhatever classrq  rB  rq  N)r  	TypeErrorrt  objects_converterrJ   rg   s   &r1   test_objects_converter+ClinicFunctionalTest.test_objects_converter  s    y))'') *44Q:FC44R9IJRQaLbc44Q7C	 *)s   B44C	c                    V P                  \        4      ;_uu_ 4        \        P                  ! ^4       RRR4       V P	                  \        P                  ! R4      R4       R#   + '       g   i     L8; i)rq  N   BytesObject)r  )r  r  rt  bytes_object_converterrJ   rg   s   &r1   test_bytes_object_converter0ClinicFunctionalTest.test_bytes_object_converter  sK    y)),,Q/ *99.IK\] *)   A%%A5	c                   V P                  \        4      ;_uu_ 4        \        P                  ! ^4       RRR4       \	        R4      pV P                  \        P                  ! V4      V34       R#   + '       g   i     LD; i)rq  Ns   ByteArrayObject)r  r  rt  byte_array_object_converter	bytearrayrJ   )r.   byte_arrs   & r1    test_byte_array_object_converter5ClinicFunctionalTest.test_byte_array_object_converter  sW    y))11!4 */0>>xH8+V *)s   A11B	c                    V P                  \        4      ;_uu_ 4        \        P                  ! ^4       RRR4       V P	                  \        P                  ! R4      R4       R#   + '       g   i     L8; i)rq  Nr>  )r>  )r  r  rt  unicode_converterrJ   rg   s   &r1   test_unicode_converter+ClinicFunctionalTest.test_unicode_converter  sJ    y))''* *44Y?N *)r  c                   V P                  \        4      ;_uu_ 4        \        P                  ! R R R4       RRR4       V P	                  \        P                  ! 4       R4       V P	                  \        P                  ! R. ^4      R4       V P	                  \        P                  ! R^^/^ 4      R4       R#   + '       g   i     L; i)Fz	not a intNr>   )TTT)FFT)z	not empty)TTF)r  r  rt  bool_converterrJ   rg   s   &r1   test_bool_converter(ClinicFunctionalTest.test_bool_converter  s    y))$$UE;? *1135GH11"b!<>RS11.1a&!LNab	 *)s   B88C	c                    V P                  \        P                  ! 4       R4       V P                  \        P                  ! RRRR4      R4       R# )rq  FTN)rq  r   r{  )r   rq  r   rq  )rJ   rt  bool_converter_c_defaultrg   s   &r1   test_bool_converter_c_default2ClinicFunctionalTest.test_bool_converter_c_default  s@    ;;=~N;;E4PTU%	'r7   c                   V P                  \        4      ;_uu_ 4        \        P                  ! ^4       RRR4       V P                  \        4      ;_uu_ 4        \        P                  ! R4       RRR4       . ROp\        ;QJ d    . R V 4       F  NK  	  5M! R V 4       4      pV P                  \        P                  ! 4       V4       . ROp\        ;QJ d    . R V 4       F  NK  	  5M! R V 4       4      pV P                  \        P                  ! V!  V4       R#   + '       g   i     L; i  + '       g   i     L; i)rq  Ns   abc              3   8   "   T F  p\        V4      x  K  	  R # 5irF   ordrv  rA   s   & r1   rw  ;ClinicFunctionalTest.test_char_converter.<locals>.<genexpr>       /AQ   c              3   8   "   T F  p\        V4      x  K  	  R # 5irF   r  r  s   & r1   rw  r    r  r  )   A         	   
            "   '   ?   \       )   1   2   3   4   5   6   7   8   9   0   a   b   c   d)r  r  rt  char_convertertuplerJ   )r.   charsr   s   &  r1   test_char_converter(ClinicFunctionalTest.test_char_converter  s    y))$$Q' *y))$$U+ *r5//55///113X>d5//55///11598D *)))s   D$D7$D4	7E	c                   ^ RI Hp V P                  \        4      ;_uu_ 4        \        P
                  ! R4       RRR4       V P                  \        4      ;_uu_ 4        \        P
                  ! V^,           4       RRR4       V P                  \        4      ;_uu_ 4        \        P
                  ! ^ V^,           4       RRR4       V P                  \        4      ;_uu_ 4        \        P
                  ! . 4       RRR4       V P                  \        P
                  ! 4       R4       V P                  \        P
                  ! ^ ^ V^,           4      R4       V P                  \        P
                  ! ^ ^ V^,           ^,          ^{,           4      R4       R#   + '       g   i     ELg; i  + '       g   i     EL8; i  + '       g   i     EL; i  + '       g   i     L; i)r   )	UCHAR_MAXNr      "   8   r   r   r   r   r   {   )	_testcapir  r  OverflowErrorrt  unsigned_char_converterr  rJ   )r.   r  s   & r1   test_unsigned_char_converter1ClinicFunctionalTest.test_unsigned_char_converter  s3   '}----b1 .}----i!m< .}----aQ? .y))--b1 *::<lK::1aQOQZ[::1a)a-STATWZAZ[]hi .--------))/   F F-#G'GF*	-F>	G	G%	c                   ^ RI HpHp V P                  \        4      ;_uu_ 4        \
        P                  ! V^,
          4       RRR4       V P                  \        4      ;_uu_ 4        \
        P                  ! V^,           4       RRR4       V P                  \        4      ;_uu_ 4        \
        P                  ! . 4       RRR4       V P                  \
        P                  ! R4      R4       V P                  \
        P                  ! R4      R4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L; i)r   )SHRT_MINSHRT_MAXN  .r  )r  )	r  r  r  r  r  rt  short_converterr  rJ   )r.   r  r  s   &  r1   test_short_converter)ClinicFunctionalTest.test_short_converter  s    0}--%%hl3 .}--%%hl3 .y))%%b) *22598D2248'B .---))s#   D)D,,D?D)	,D<	?E	c                   ^ RI Hp V P                  \        4      ;_uu_ 4        \        P
                  ! R4       RRR4       V P                  \        4      ;_uu_ 4        \        P
                  ! V^,           4       RRR4       V P                  \        4      ;_uu_ 4        \        P
                  ! ^ V^,           4       RRR4       V P                  \        4      ;_uu_ 4        \        P
                  ! . 4       RRR4       V P                  \        P
                  ! 4       R4       V P                  \        P
                  ! ^ ^ V^,           4      R4       V P                  \        P
                  ! ^ ^ V^,           ^,          ^{,           4      R4       R#   + '       g   i     ELg; i  + '       g   i     EL8; i  + '       g   i     EL; i  + '       g   i     L; i)r   )	USHRT_MAXNr   r  r  r  )	r  r  r  r  rt  unsigned_short_converterr  r  rJ   )r.   r  s   & r1   test_unsigned_short_converter2ClinicFunctionalTest.test_unsigned_short_converter  s3   'z**..r2 +}--..y1}= .}--..q)a-@ .y))..r2 *;;=|L;;Aq)a-PR[\;;Aq9q=TUBUX[B[\^ij +**------))r  c                b   ^ RI HpHp V P                  \        4      ;_uu_ 4        \
        P                  ! V^,
          4       RRR4       V P                  \        4      ;_uu_ 4        \
        P                  ! V^,           4       RRR4       V P                  \        4      ;_uu_ 4        \
        P                  ! ^^^4       RRR4       V P                  \        4      ;_uu_ 4        \
        P                  ! . 4       RRR4       V P                  \
        P                  ! 4       R4       V P                  \
        P                  ! ^^R4      ^^\        R4      34       R#   + '       g   i     EL); i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L; i)r   )INT_MININT_MAXN3)r  r  -   )
r  r  r  r  r  rt  r   r  rJ   r  )r.   r  r  s   &  r1   test_int_converter'ClinicFunctionalTest.test_int_converter  s   .}--##GaK0 .}--##GaK0 .y))##Aq!, *y))##B' *002LA00As;aCH=MN .----))))s/   E$)E8,F*F$E5	8F	F	F.	c                   ^ RI Hp V P                  \        4      ;_uu_ 4        \        P
                  ! R4       RRR4       V P                  \        4      ;_uu_ 4        \        P
                  ! V^,           4       RRR4       V P                  \        4      ;_uu_ 4        \        P
                  ! ^ V^,           4       RRR4       V P                  \        4      ;_uu_ 4        \        P
                  ! . 4       RRR4       V P                  \        P
                  ! 4       R4       V P                  \        P
                  ! ^ ^ V^,           4      R4       V P                  \        P
                  ! ^ ^ V^,           ^,          ^{,           4      R4       R#   + '       g   i     ELg; i  + '       g   i     EL8; i  + '       g   i     EL; i  + '       g   i     L; i)r   )UINT_MAXNr   r  r  r  )	r  r  r  r  rt  unsigned_int_converterr  r  rJ   )r.   r  s   & r1   test_unsigned_int_converter0ClinicFunctionalTest.test_unsigned_int_converter  s2   &z**,,R0 +}--,,X\: .}--,,Q1= .y)),,R0 *99;\J99!Q1MyY99!QAQR@RUX@XY[fg +**------))r  c                   ^ RI HpHp V P                  \        4      ;_uu_ 4        \
        P                  ! V^,
          4       RRR4       V P                  \        4      ;_uu_ 4        \
        P                  ! V^,           4       RRR4       V P                  \        4      ;_uu_ 4        \
        P                  ! . 4       RRR4       V P                  \
        P                  ! 4       R4       V P                  \
        P                  ! R4      R4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L; i)r   )LONG_MINLONG_MAXNr  r  r  )	r  r  r  r  r  rt  long_converterr  rJ   )r.   r  r  s   &  r1   test_long_converter(ClinicFunctionalTest.test_long_converter(  s    0}--$$X\2 .}--$$X\2 .y))$$R( *113U;11%8(C .---))#   D)D+,D>D(	+D;	>E	c                   ^ RI Hp V P                  \        4      ;_uu_ 4        \        P
                  ! R4       RRR4       V P                  \        4      ;_uu_ 4        \        P
                  ! V^,           4       RRR4       V P                  \        4      ;_uu_ 4        \        P
                  ! ^ V^,           4       RRR4       V P                  \        4      ;_uu_ 4        \        P
                  ! . 4       RRR4       V P                  \        P
                  ! 4       R4       V P                  \        P
                  ! ^ ^ V^,           4      R4       V P                  \        P
                  ! ^ ^ V^,           ^,          ^{,           4      R4       R#   + '       g   i     ELg; i  + '       g   i     EL8; i  + '       g   i     EL; i  + '       g   i     L; i)r   )	ULONG_MAXNr   r  r  r  )	r  r  r  r  rt  unsigned_long_converterr  r  rJ   )r.   r  s   & r1   test_unsigned_long_converter1ClinicFunctionalTest.test_unsigned_long_converter3  s3   'z**--b1 +}----i!m< .}----aQ? .y))--b1 *::<lK::1aQOQZ[::1a)a-STATWZAZ[]hi +**------))r  c                   ^ RI HpHp V P                  \        4      ;_uu_ 4        \
        P                  ! V^,
          4       RRR4       V P                  \        4      ;_uu_ 4        \
        P                  ! V^,           4       RRR4       V P                  \        4      ;_uu_ 4        \
        P                  ! . 4       RRR4       V P                  \
        P                  ! 4       R4       V P                  \
        P                  ! R4      R4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L; i)r   )	LLONG_MIN	LLONG_MAXNr  r  r  )	r  r  r  r  r  rt  long_long_converterr  rJ   )r.   r  r  s   &  r1   test_long_long_converter-ClinicFunctionalTest.test_long_long_converterA  s    2}--)))a-8 .}--)))a-8 .y))))"- *668%@66u=xH .---))r
  c                   ^ RI Hp V P                  \        4      ;_uu_ 4        \        P
                  ! R4       RRR4       V P                  \        4      ;_uu_ 4        \        P
                  ! V^,           4       RRR4       V P                  \        4      ;_uu_ 4        \        P
                  ! ^ V^,           4       RRR4       V P                  \        4      ;_uu_ 4        \        P
                  ! . 4       RRR4       V P                  \        P
                  ! 4       R4       V P                  \        P
                  ! ^ ^ V^,           4      R4       V P                  \        P
                  ! ^ ^ V^,           ^,          ^{,           4      R4       R#   + '       g   i     ELg; i  + '       g   i     EL8; i  + '       g   i     EL; i  + '       g   i     L; i)r   )
ULLONG_MAXNr   r  r  r  )	r  r  r  r  rt  unsigned_long_long_converterr  r  rJ   )r.   r  s   & r1   !test_unsigned_long_long_converter6ClinicFunctionalTest.test_unsigned_long_long_converterL  s5   (z**2226 +}--22:>B .}--221j1nE .y))2226 *??A<P??1jSTnUW`a??1zTU~YZFZ]`F`acno +**------))r  c                   ^ RI HpHp V P                  \        4      ;_uu_ 4        \
        P                  ! V^,
          4       RRR4       V P                  \        4      ;_uu_ 4        \
        P                  ! V^,           4       RRR4       V P                  \        4      ;_uu_ 4        \
        P                  ! . 4       RRR4       V P                  \
        P                  ! 4       R4       V P                  \
        P                  ! ^^R4      R4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L; i)r   PY_SSIZE_T_MINPY_SSIZE_T_MAXNr  rq  rB  r  )	r  r  r  r  r  rt  py_ssize_t_converterr  rJ   r.   r  r  s   &  r1   test_py_ssize_t_converter.ClinicFunctionalTest.test_py_ssize_t_converterZ  s    <}--**>A+=> .}--**>A+=> .y))**2. *779<H771dCZP .---))s#   D)D-,E D*	-D=	 E	c                *   ^ RI HpHp V P                  \        4      ;_uu_ 4        \
        P                  ! . 4       RRR4       V P                  \
        P                  ! 4       R4       V P                  \
        P                  ! ^^R4      R4       V P                  \
        P                  ! W"^,           VR,           4      W"V34       V P                  \
        P                  ! W^,
          VR,
          4      WV34       R#   + '       g   i     L; i)r   r  Ni  r  r  )r  r  r  r  r  rt  slice_index_converterrJ   r!  s   &  r1   test_slice_index_converter/ClinicFunctionalTest.test_slice_index_convertere  s    <y))++B/ *88:LI88AtDjQ88Z[I[]knr]rs(.I	K88Z[I[]knr]rs(.I	K *)s   DD	c                   V P                  \        4      ;_uu_ 4        \        P                  ! R4       RRR4       V P                  \        4      ;_uu_ 4        \        P                  ! . 4       RRR4       V P                  \        P                  ! 4       R4       R#   + '       g   i     Ls; i  + '       g   i     LJ; i)rq  Nr   r  )r  r  rt  size_t_converterr  rJ   rg   s   &r1   test_size_t_converter*ClinicFunctionalTest.test_size_t_converterp  ss    z**&&r* +y))&&r* *335u=	 +*))s   B B3 B0	3C	c                :   V P                  \        4      ;_uu_ 4        \        P                  ! . 4       R R R 4       V P	                  \        P                  ! 4       R4       V P	                  \        P                  ! R4      R4       R #   + '       g   i     L]; iN)g      )@      ࿩r.  )r  r  rt  float_converterrJ   rg   s   &r1   test_float_converter)ClinicFunctionalTest.test_float_converterw  sc    y))%%b) *224g>2248'B *)   B

B	c                :   V P                  \        4      ;_uu_ 4        \        P                  ! . 4       R R R 4       V P	                  \        P                  ! 4       R4       V P	                  \        P                  ! R4      R4       R #   + '       g   i     L]; ir-  )r  r  rt  double_converterrJ   rg   s   &r1   test_double_converter*ClinicFunctionalTest.test_double_converter}  sc    y))&&r* *335w?33D97C *)r3  c                $   V P                  \        4      ;_uu_ 4        \        P                  ! . 4       R R R 4       V P	                  \        P                  ! \        ^^4      4      \        ^^4      34       V P	                  \        P                  ! \        R4      4      \        R4      34       V P	                  \        P                  ! R4      R4       V P	                  \        P                  ! ^
4      R4       R #   + '       g   i     L; i)Nz-1-2jr.  r/  )
   )r  r  rt  py_complex_converterrJ   complexrg   s   &r1   test_py_complex_converter.ClinicFunctionalTest.test_py_complex_converter  s    y))**2. *771FQRTUHXY778HIGT[L\K^_77=wG77;UC *)s   C??D	c                   V P                  \        4      ;_uu_ 4        \        P                  ! ^4       RRR4       V P                  \        4      ;_uu_ 4        \        P                  ! RRR4       RRR4       V P                  \        4      ;_uu_ 4        \        P                  ! RRR4       RRR4       V P                  \        P                  ! RRR4      R	4       V P                  \        P                  ! RRR4      R	4       V P                  \        P                  ! RRR4      R
4       R#   + '       g   i     EL; i  + '       g   i     L; i  + '       g   i     L; i)rq  Nrw  rx  rA      b br  r  c cr{  rw  rx  r@  )r  r  rt  r   r  rJ   rg   s   &r1   test_str_converter'ClinicFunctionalTest.test_str_converter  s    y))##A& *y))##Cc2 *z**##C#6 +00dC@/R00dDA?S00dFCEWX *))))**s#   D3EE3E	E	E*	c                   V P                  \        4      ;_uu_ 4        \        P                  ! ^4       RRR4       V P	                  \        P                  ! RRR4      R4       V P                  \        4      ;_uu_ 4        \        P                  ! RRR4       RRR4       V P	                  \        P                  ! RR\        \        R4      .4      4      R4       V P	                  \        P                  ! RR\        \        R4      ^ \        R4      .4      4      R	4       V P	                  \        P                  ! RRR4      R	4       R#   + '       g   i     EL"; i  + '       g   i     L; i)
rq  Nrw  rx  rA   r?  r  s   c cr{  rA  )r  r  rt  str_converter_encodingrJ   r  r  rg   s   &r1   test_str_converter_encoding0ClinicFunctionalTest.test_str_converter_encoding  s   y)),,Q/ *99#sCH/Zy)),,S'3? *99#tYPSTWPXzEZ[]lm99#tYPSTWPXZ[]`ad]eOfEgh-	/99#tYOQef *)) *)s   EE"E	"E2	c           	     
   V P                  \        4      ;_uu_ 4        \        P                  ! R R4       RRR4       V P	                  \        P                  ! R\        . RO4      4      R4       R#   + '       g   i     LD; i)rw  rx  Nabcrq  rB     )s   abcs   )r  r  rt  py_buffer_converterrJ   r  rg   s   &r1   test_py_buffer_converter-ClinicFunctionalTest.test_py_buffer_converter  sT    y))))#s3 *66ui	>RSUno *)s   A22B	c                    V P                  \        P                  ! ^^4      R4       V P                  \        P                  ! ^^R7      R4       V P                  \        P                  ! ^^R7      R4       R# )rq  rx  rz  Nr  )rJ   rt  keywordsrg   s   &r1   test_keywords"ClinicFunctionalTest.test_keywords  sY    ++Aq16:++A3V<++a15v>r7   c                F   V P                  \        4      ;_uu_ 4        \        P                  ! ^^4       RRR4       V P	                  \        P                  ! ^^R7      R4       V P	                  \        P                  ! ^^R7      R4       R#   + '       g   i     Lb; i)rq  NrP  rz  r  )r  r  rt  keywords_kwonlyrJ   rg   s   &r1   test_keywords_kwonly)ClinicFunctionalTest.test_keywords_kwonly  sk    y))%%a+ *221:FC22Q!<fE *)s   BB 	c                4   V P                  \        P                  ! ^4      R4       V P                  \        P                  ! ^^4      R4       V P                  \        P                  ! ^^^4      R4       V P                  \        P                  ! ^^R7      R4       V P                  \        P                  ! ^^^R7      R4       V P                  \        P                  ! ^^R7      R	4       V P                  \        P                  ! ^^^R7      R4       R# )
rq  NrP  rA   rw  rA   r{  rq  NNrq  rB  NrJ  rq  NrK  )rJ   rt  keywords_optrg   s   &r1   test_keywords_opt&ClinicFunctionalTest.test_keywords_opt  s    //2OD//15|D//1a8)D//Q7F//1:IF//!q9<H//!qA>	Jr7   c           	        V P                  \        P                  ! ^4      R4       V P                  \        P                  ! ^^4      R4       V P                  \        4      ;_uu_ 4        \        P                  ! ^^^4       RRR4       V P                  \        P                  ! ^^R7      R4       V P                  \        P                  ! ^^^R7      R4       V P                  \        P                  ! ^^R7      R	4       V P                  \        P                  ! ^^^^R7      R
4       R#   + '       g   i     L; i)rq  NrP  rY  rZ  rw  rx  rA   drq  NNNrq  rB  NNrq  rB  rK  N)rq  NrK  Nrq  rB  rK     )rJ   rt  keywords_opt_kwonlyr  r  rg   s   &r1   test_keywords_opt_kwonly-ClinicFunctionalTest.test_keywords_opt_kwonly  s    66q9;PQ66q!<>PQy))))!Q2 *66qA>@RS66q!qA?S66a@BTU66a1JLY *)s   +D11E	c                   V P                  \        P                  ! ^4      R4       V P                  \        4      ;_uu_ 4        \        P                  ! ^^4       RRR4       V P                  \        P                  ! ^^R7      R4       V P                  \        P                  ! ^^R7      R4       V P                  \        P                  ! ^^^R7      R4       R#   + '       g   i     L; i)	rq  NrP  rZ  r{  r[  r\  r]  rJ  )rJ   rt  keywords_kwonly_optr  r  rg   s   &r1   test_keywords_kwonly_opt-ClinicFunctionalTest.test_keywords_kwonly_opt  s    66q9?Ky))))!Q/ *66qA>M66a@,O66a1EyQ	 *)s   CC/	c                   V P                  \        4      ;_uu_ 4        \        P                  ! ^4       RRR4       V P                  \        4      ;_uu_ 4        \        P                  ! ^^R7       RRR4       V P	                  \        P                  ! ^^4      R4       V P	                  \        P                  ! ^^R7      R4       R#   + '       g   i     L; i  + '       g   i     Lt; irq  Nrz  rP  r  )r  r  rt  posonly_keywordsrJ   rg   s   &r1   test_posonly_keywords*ClinicFunctionalTest.test_posonly_keywords  s    y))&&q) *y))&&a0 *33Aq96B33A;VD *)))s   CCC	C/	c                6   V P                  \        4      ;_uu_ 4        \        P                  ! ^4       RRR4       V P                  \        4      ;_uu_ 4        \        P                  ! ^^4       RRR4       V P                  \        4      ;_uu_ 4        \        P                  ! ^^R7       RRR4       V P	                  \        P                  ! ^^R7      R4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L`; irq  )r  r  rt  posonly_kwonlyrJ   rg   s   &r1   test_posonly_kwonly(ClinicFunctionalTest.test_posonly_kwonly  s    y))$$Q' *y))$$Q* *y))$$qA. *11!q96B *)))))s#   C"C5D"C2	5D	D	c                   V P                  \        4      ;_uu_ 4        \        P                  ! ^4       RRR4       V P                  \        4      ;_uu_ 4        \        P                  ! ^^^4       RRR4       V P                  \        4      ;_uu_ 4        \        P                  ! ^^^R7       RRR4       V P	                  \        P                  ! ^^^R7      R4       V P	                  \        P                  ! ^^^R7      R4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L; i)rq  Nr{  rY  rx  rA   rJ  )r  r  rt  posonly_keywords_kwonlyrJ   rg   s   &r1   test_posonly_keywords_kwonly1ClinicFunctionalTest.test_posonly_keywords_kwonly  s    y))--a0 *y))--aA6 *y))--Q!< *::1a1EyQ::1QGS *)))))s#   DD!D4D	!D1	4E	c           	     2   V P                  \        4      ;_uu_ 4        \        P                  ! ^4       RRR4       V P	                  \        P                  ! ^^4      R4       V P	                  \        P                  ! ^^^4      R4       V P	                  \        P                  ! ^^^^4      R4       V P	                  \        P                  ! ^^R7      R4       V P	                  \        P                  ! ^^^R7      R4       V P                  \        4      ;_uu_ 4        \        P                  ! ^^^^R7       RRR4       V P	                  \        P                  ! ^^^^R7      R4       R#   + '       g   i     ELF; i  + '       g   i     LP; i)	rq  NrP  rY  rb  rx  rA   rc  re  rf  rg  )r  r  rt  posonly_keywords_optrJ   rg   s   &r1   test_posonly_keywords_opt.ClinicFunctionalTest.test_posonly_keywords_opt  s!   y))**1- *771=?QR771a@/R771aC\R77Q?AST771BOTy))**Q!qA> *77Q!qI<X *)) *)s   E2#F2F	F	c           	     2   V P                  \        P                  ! ^4      R4       V P                  \        P                  ! ^^4      R4       V P                  \        P                  ! ^^^4      R4       V P                  \        P                  ! ^^^^4      R	4       V P                  \        4      ;_uu_ 4        \        P                  ! ^^R7       RRR4       V P                  \        P                  ! ^^^R7      R4       V P                  \        P                  ! ^^^^R7      R	4       V P                  \        4      ;_uu_ 4        \        P                  ! ^^^^R7       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)
rq  NrP  rY  rA   rc  rb  rd  re  rf  rg  )rJ   rt  posonly_opt_keywords_optr  r  rg   s   &r1   test_posonly_opt_keywords_opt2ClinicFunctionalTest.test_posonly_opt_keywords_opt  s$   ;;A>@UV;;AqACUV;;Aq!DoV;;Aq!QGVy))..qA6 *;;AqAFX;;AqAK\Zy))..a1B *)	 *) *))s   <E2F2F	F	c           	        V P                  \        4      ;_uu_ 4        \        P                  ! ^4       RRR4       V P                  \        4      ;_uu_ 4        \        P                  ! ^^4       RRR4       V P	                  \        P                  ! ^^R7      R4       V P	                  \        P                  ! ^^^R7      R4       V P	                  \        P                  ! ^^^^R7      R4       V P                  \        4      ;_uu_ 4        \        P                  ! ^^^^R7       RRR4       R#   + '       g   i     EL; i  + '       g   i     L; i  + '       g   i     R# ; i)	rq  NrP  rz  r  rb  re  rf  rg  )r  r  rt  posonly_kwonly_optrJ   rg   s   &r1   test_posonly_kwonly_opt,ClinicFunctionalTest.test_posonly_kwonly_opt  s    y))((+ *y))((A. *55a1=?QR55a1BOT55a1QGVy))((1Q!< *) *))))
 *))s#   D7EE7E	E	E/	c           	        V P                  \        P                  ! ^4      R4       V P                  \        P                  ! ^^4      R4       V P                  \        4      ;_uu_ 4        \        P                  ! ^^^4       RRR4       V P                  \        4      ;_uu_ 4        \        P                  ! ^^R7       RRR4       V P                  \        P                  ! ^^^R7      R4       V P                  \        P                  ! ^^^^R7      R4       R#   + '       g   i     L; i  + '       g   i     Lx; i)	rq  NrP  rY  r  rd  re  rf  rg  )rJ   rt  posonly_opt_kwonly_optr  r  rg   s   &r1   test_posonly_opt_kwonly_opt0ClinicFunctionalTest.test_posonly_opt_kwonly_opt
  s    99!<>ST99!Q?ASTy)),,Q15 *y)),,Q!4 *99!Q!DoV99!Q!qI<X *)))s   +D)D2D/	2E	c           
        V P                  \        4      ;_uu_ 4        \        P                  ! ^4       RRR4       V P                  \        4      ;_uu_ 4        \        P                  ! ^^4       RRR4       V P                  \        4      ;_uu_ 4        \        P                  ! ^^R7       RRR4       V P                  \        4      ;_uu_ 4        \        P                  ! ^^^4       RRR4       V P                  \        4      ;_uu_ 4        \        P                  ! ^^^R7       RRR4       V P	                  \        P                  ! ^^^R7      R4       V P	                  \        P                  ! ^^^R7      R4       V P	                  \        P                  ! ^^^^R7      R	4       V P	                  \        P                  ! ^^^^^R7      R
4       R#   + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL_; i  + '       g   i     EL5; i  + '       g   i     EL
; i)rq  NrP  r{  rY  rz  r  rA   rc  erq  rB  rK  NNrq  rB  rK  rh  Nrq  rB  rK  rh     )r  r  rt  posonly_keywords_kwonly_optrJ   rg   s   &r1    test_posonly_keywords_kwonly_opt5ClinicFunctionalTest.test_posonly_keywords_kwonly_opt  s}   y))11!4 *y))11!Q7 *y))11!q9 *y))11!Q: *y))11Aa@ *>>q!qIK`a>>qAKMbc>>q!qANPbc>>q!qAQRSUde *))))))))))))))s;   GG2HHH.G/	2H	H	H+	.H?	c           
        V P                  \        4      ;_uu_ 4        \        P                  ! ^4       RRR4       V P	                  \        P                  ! ^^4      R
4       V P	                  \        P                  ! ^^R7      R
4       V P                  \        4      ;_uu_ 4        \        P                  ! ^^^^4       RRR4       V P                  \        4      ;_uu_ 4        \        P                  ! ^^R7       RRR4       V P	                  \        P                  ! ^^^R7      R4       V P	                  \        P                  ! ^^^R7      R4       V P	                  \        P                  ! ^^^^R7      R4       V P	                  \        P                  ! ^^^^R7      R4       V P	                  \        P                  ! ^^^^^R7      R4       V P	                  \        P                  ! ^^^^^R	7      R4       R#   + '       g   i     EL; i  + '       g   i     ELa; i  + '       g   i     EL7; i)rq  NrP  rz  rY  rz  rc  r  rc  r  r  )rq  rB  NNNr  r  r  )r  r  rt  posonly_keywords_opt_kwonly_optrJ   rg   s   &r1   $test_posonly_keywords_opt_kwonly_opt9ClinicFunctionalTest.test_posonly_keywords_opt_kwonly_opt$  s   y))55a8 *BB1aHJbcBB1JLdey))55aAqA *y))55Q? *BB1a1MOdeBB1QOQfgBB1aaPRdeBB1a1PQRTfgBB1aaSTUWfgBB1a1PQUVWYhi *)) *)))))s#   H)H(H/H	H,	/I 	c           	     2   V P                  \        P                  ! ^4      R4       V P                  \        P                  ! ^^4      R4       V P                  \        4      ;_uu_ 4        \        P                  ! ^^R7       RRR4       V P                  \        P                  ! ^^^4      R4       V P                  \        P                  ! ^^^R7      R4       V P                  \        P                  ! ^^^^R7      R	4       V P                  \        P                  ! ^^^^R7      R	4       V P                  \        4      ;_uu_ 4        \        P                  ! ^^^^4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)
rq  NrP  rY  r  r  rd  re  rf  rg  )rJ   rt  #posonly_opt_keywords_opt_kwonly_optr  r  rg   s   &r1   (test_posonly_opt_keywords_opt_kwonly_opt=ClinicFunctionalTest.test_posonly_opt_keywords_opt_kwonly_opt4  s*   FFqIK`aFFq!LN`ay))99!qA *FFq!QOQ`aFFq!qQSbcFFq!QRSTVbcFFq!qTUVXdey))99!Q1E *) *) *))s   +E2F2F	F	c                   V P                  \        4      ;_uu_ 4        \        P                  ! 4        R R R 4       V P                  \        4      ;_uu_ 4        \        P                  ! ^4       R R R 4       V P	                  \        P                  ! ^R7      R4       R #   + '       g   i     Lu; i  + '       g   i     LL; i)Nry  rq  )r  r  rt  keyword_only_parameterrJ   rg   s   &r1   test_keyword_only_parameter0ClinicFunctionalTest.test_keyword_only_parameter@  ss    y)),,. *y)),,Q/ *99A>E	 *)))s   B!B4!B1	4C	c                f    V P                  V! 4       R4       V P                  V! ^^4      R4       R# rq  Nr4   r  )rJ   r  s   &&r1   test_varpos ClinicFunctionalTest.test_varposH  s,     RT2&R1Xv.r7   c                    V P                  \        V4       V P                  \        V^4       V P                  \        V^^R7       V P                  V! ^^4      R4       V P                  V! ^^^^4      R4       R# )rq  rP  Nrq  rB  r4   rq  rB  rK  rh  r  r  rJ   r  s   &&r1   test_posonly_varpos(ClinicFunctionalTest.test_posonly_varposQ  sm     i,iQ/iQ!4R1Xz2R1a^^<r7   c                    V P                  \        V4       V P                  \        V^R7       V P                  V! ^4      R4       V P                  V! ^^4      R4       V P                  V! ^^^^4      R4       R# )rq  ry  N)rq  Fr4   r  r  r  r  s   &&r1   test_posonly_req_opt_varpos0ClinicFunctionalTest.test_posonly_req_opt_varpos]  sm     i,iq1RUN3R1Xz2R1a^^<r7   c           
     `   V P                  \        V4       V P                  V! ^^4      R4       V P                  V! ^^R7      R4       V P                  V! ^^^^4      R4       V P                  \        V^R7       \        P                  ! R4      pV P                  \        W!^^^^R7       R# )rq  rP  z$given by name ('b') and position (2)Nr  r  )r  r  rJ   rG   rH   rI   r.   r,   rO   s   && r1   test_posonly_poskw_varpos.ClinicFunctionalTest.test_posonly_poskw_varposi  s     i,R1Xz2RQZ4R1a^^<iq1YYEFF""9f!QQ"Gr7   c                z   \         P                  pV P                  \        V4       V P                  \        V^^R7       V P	                  V! ^R7      R4       \
        P                  ! R4      pV P                  \        W!^^R7       V P	                  V! ^4      R4       V P	                  V! ^^^^4      R4       R# )rq  rP  ry  $given by name ('a') and position (1)N)rq  r4   )rq  rB  rK  rh  )rt  poskw_varposr  r  rJ   rG   rH   rI   r  s   &  r1   test_poskw_varpos&ClinicFunctionalTest.test_poskw_varposw  s    ##)R()Ra0a'*ABy&a1=A(Aq!Q8r7   c           
        \         P                  pV P                  \        V4       \        P
                  ! R 4      pV P                  \        W!^^R7       V P                  V! ^^R7      R4       V P                  V! ^^^^4      R4       V P                  V! ^^^^^R7      R4       V P                  V! ^R7      R4       V P                  V! ^^R7      R4       R# )	r  ry  rP  rz  N)rq  r4   T)rq  r  F)rq  r  T)rq  r4   F)rt  poskw_varpos_kwonly_optr  r  rG   rH   rI   rJ   r  s   &  r1   test_poskw_varpos_kwonly_opt1ClinicFunctionalTest.test_poskw_varpos_kwonly_opt  s    ..)R(ABy&a1=A]3Aq!Q)>?Aq!Q!,.BCa.1a1}5r7   c           
     \   \         P                  pV P                  \        V4       \        P
                  ! R 4      pV P                  \        W!^^R7       V P                  V! ^^R7      R4       V P                  V! ^^^R7      R4       V P                  V! ^^^4      R	4       V P                  V! ^^^^R7      R
4       V P                  V! ^^^^^R7      R4       V P                  V! ^R7      R4       V P                  V! ^^R7      R4       V P                  V! ^^^R7      R4       R# )r  ry  rP  rz  rz  r{  N)rq  r4   rB  F)rq  r4   rB  rK  )rq  rB  rK  FF)rq  r  rh  F)rq  r  rh  r  )rq  r4   FF)rt  poskw_varpos_kwonly_opt2r  r  rG   rH   rI   rJ   r  s   &  r1   test_poskw_varpos_kwonly_opt22ClinicFunctionalTest.test_poskw_varpos_kwonly_opt2  s
   //)R(ABy&a1=A%67Aa-8Aq!&?@Aq!q)+@AAq!qA.0ABa"78a1'89a1*M:r7   c           
     *   \         P                  pV P                  V! 4       R4       V P                  V! ^R7      R4       V P                  V! ^^R7      R4       V P                  V! ^^^^4      R4       V P                  V! ^^^^^R7      R4       R# )FrP  N)r4   F)r4   rB  )r  rB  )rg  F)rg  r  )rt  varpos_kwonly_optrJ   r  s   & r1   test_varpos_kwonly_opt+ClinicFunctionalTest.test_varpos_kwonly_opt  s    (({+a'*AZ0Aq!Q)>?Aq!Q!,.?@r7   c           	        \         P                  pV P                  \        V4       V P	                  V! ^R7      R4       V P	                  V! ^^R7      R4       V P	                  V! ^^^R7      R4       V P                  \        V^4       V P	                  V! ^^R7      R4       V P	                  V! ^^^R7      R	4       V P	                  V! ^^^^R7      R
4       R# )rq  ry  rz  r{  N)r4   rq  FF)r4   rq  rB  F)r4   rq  rB  rK  )r  rB  FF)r  rB  rK  F)r  rB  rK  rh  )rt  varpos_kwonly_req_optr  r  rJ   r  s   & r1   test_varpos_kwonly_req_opt/ClinicFunctionalTest.test_varpos_kwonly_req_opt  s    ,,)R(a"78a1'89a1*M:)R+A%<=Aa*=>Aa1-?r7   c           	     >    \         P                  ! ^^^^^^R7       R# )rq  )kw1kw2N)rt  gh_32092_oobrg   s   &r1   test_gh_32092_oob&ClinicFunctionalTest.test_gh_32092_oob  s    q!Qqa8r7   c                6    \         P                  ! ^^^4       R# r  )rt  gh_32092_kw_passrg   s   &r1   test_gh_32092_kw_pass*ClinicFunctionalTest.test_gh_32092_kw_pass  s    ""1a+r7   c                    R p\         P                  ! V4      p\        P                  ! V4       \         P                  ! V4      pV P	                  W#4       R# )z5*A unique string is not referenced by anywhere else.*N)r  getrefcountrt  gh_99233_refcountrJ   )r.   argarg_refcount_originarg_refcount_afters   &   r1   test_gh_99233_refcount+ClinicFunctionalTest.test_gh_99233_refcount  sB    E!ooc2##C( __S1,Ar7   c                    \         P                  ! R 4      pV P                  \        V4      ;_uu_ 4        \        P
                  ! RR4       RRR4       R#   + '       g   i     R# ; i)zTgh_99240_double_free() argument 2 must be encoded string without null bytes, not strrw  z bN)rG   rH   rI   r  rt  gh_99240_double_free)r.   ru   s   & r1   test_gh_99240_double_free.ClinicFunctionalTest.test_gh_99240_double_free  sI    ii*
 ##Is33**36 4333s   AA(	c                (   \         P                  pV P                  V! R 4      R4       V P                  V! R ^^^RR7      R	4       V P                  V! R R7      R4       V P                  V! R RR7      R
4       V P                  V! RR R7      R
4       V P                  \        VRR7       \
        P                  ! R4      pV P                  \        W!^R R7       V P                  \        W!^^^R RR7       V P                  \        W!^^^RR R7       R# )rw  T)	covariantr  )r  r  )r  r  z'given by name ('name') and position (1)N)rw  r4   F)rw  rJ  T)rw  r4   T)rt  null_or_tuple_for_varargsrJ   r  r  rG   rH   rI   r  s   &  r1   test_null_or_tuple_for_varargs3ClinicFunctionalTest.test_null_or_tuple_for_varargs  s    00C"23CAqD9;QR'785Gd5G)R48DEy&acBy&aACSWXy&aATWXr7   c                L   RpV P                  \        R4      ;_uu_ 4        \        P                  ! V4       RRR4       V P                  \        R4      ;_uu_ 4        \        P                  ! V4       RRR4       R#   + '       g   i     LO; i  + '       g   i     R# ; i)rq  clone_f1Nclone_f2r   )rI   r  rt  r  r  )r.   incorrect_args   & r1   "test_cloned_func_exception_message7ClinicFunctionalTest.test_cloned_func_exception_message  si    ##Iz::}- ;##Iz::}- ;: ;::::s   A?B?B	B#	c                    R FM  pV P                  VR7      ;_uu_ 4        \        \        V4      pV P                  V! 4       V4       RRR4       KO  	  R#   + '       g   i     Kd  ; i)clone_with_conv_f1r  N)r  clone_with_conv_f2)r-   rs  rt  rJ   )r.   r  r  s   &  r1   1test_cloned_func_with_converter_exception_messageFClinicFunctionalTest.test_cloned_func_with_converter_exception_message  sM    >D4((y$/  . )( ?(((s   (AA'c                   \         P                  ! 4       pVP                  pV P                  VP                  4       \         P                  4       V P	                  \
        4      ;_uu_ 4        VP                  \         P                  R 7       RRR4       \        V P                  \
        R4      pV! V^4       V! V^R7       R#   + '       g   i     L@; i))r  Nno argumentsry  )	rt  	TestClassget_defining_classassertIsr  r  get_defining_class_argr   rI   )r.   objmethchecks   &   r1   test_get_defining_class,ClinicFunctionalTest.test_get_defining_class  s    !!#%%c,,.	0C0CD y))&&9+>+>&? * ..	>JdAda *)s   -!CC	c                R   ^ RI Hp \        P                  ! 4       pVP                  pV! VRR4       V! VRR4       V! VRR4       V! VRR4       V P                  V! VRR4      \        P                  4       \        V P                  \        R4      pV! WRR4       V! WRR4       R# )r   )pyobject_vectorcallNr  r4   r  ry  )	r  r  rt  r  r  r  r   rI   r  )r.   r  r  r  r   s   &    r1   test_get_defining_class_capi1ClinicFunctionalTest.test_get_defining_class_capi  s    1!!#%%D$-D"d+D"b)D$+)$B79L9LM..	>J!t4!v6r7   c                   \         P                  ! 4       pV P                  VP                  R 4      \         P                  R 34       V P                  VP                  ^{R7      \         P                  ^{34       V P	                  \
        4      ;_uu_ 4        VP                  \         P                  R R7       RRR4       V P	                  \
        4      ;_uu_ 4        VP                  4        RRR4       V P	                  \
        4      ;_uu_ 4        VP                  RR4       RRR4       R#   + '       g   i     L; i  + '       g   i     L]; i  + '       g   i     R# ; i)r  )r  )r  r  Narg1arg2)rt  r  rJ   r  r  r  )r.   r  s   & r1   test_get_defining_class_arg0ClinicFunctionalTest.test_get_defining_class_arg  s    !!#33E:#--u5	7333<#--s3	5 y))&&9+>+>E&J * y))&&( *y))&&vv6 *) *) *))))s$   "D0EE0E 	E	E'	c                d   \         P                  pV! 4       pVP                  pV P                  V! 4       VR34       V P                  V! ^^4      VR34       VP                  pV P	                  \
        V4       V P                  V! V4      VR34       V P                  V! V^^4      VR34       R# r  )rt  r  defclass_varposrJ   r  r  )r.   r  r  r,   s   &   r1   test_defclass_varpos)ClinicFunctionalTest.test_defclass_varpos  s    !!e  Ry)AqC=1  )R(C3),CAf6r7   c           	     @   \         P                  pV! 4       pVP                  pR pV P                  \        WC4       V P                  \        WC^4       V P                  V! ^^4      V^^R34       V P                  V! ^^^^4      V^^R34       VP                  pV P                  \        V4       V P                  \        WCV4       V P                  \        WCV^4       V P                  V! V^^4      V^^R34       V P                  V! V^^^^4      V^^R34       R# )z%takes at least 2 positional argumentsNr4   r  )rt  r  defclass_posonly_varposrI   r  rJ   r  )r.   r  r  r,   rO   s   &    r1   test_defclass_posonly_varpos1ClinicFunctionalTest.test_defclass_posonly_varpos  s   !!e((8y&5y&a8AqCAr?3Aq!Q#q!V)<=(()R(y&c:y&c1=CAaB8CAq!,sAq&.ABr7   c                l    \         P                  pV! 4        V! R R7       V P                  RVR 4       R # Nry  'a')rt  DeprStarNewr  r.   r  s   & r1   test_depr_star_new'ClinicFunctionalTest.test_depr_star_new,  s+    ##dUC.r7   c                    \         P                  ! 4       P                  pV! 4        V! R R7       V P                  RVR RR7       R # )Nry  r  z_testclinic.DeprStarNew.clonedr  )rt  r  clonedr  r  s   & r1   test_depr_star_new_cloned.ClinicFunctionalTest.test_depr_star_new_cloned2  s:    ""$++

T
UB3STr7   c                l    \         P                  pV! 4        V! R R7       V P                  RVR 4       R # r  )rt  DeprStarInitr  r  s   & r1   test_depr_star_init(ClinicFunctionalTest.test_depr_star_init8  s+    $$dUC.r7   c                    \         P                  ! 4       P                  pV! 4        V! R R7       V P                  RVR RR7       R # )Nry  r  z_testclinic.DeprStarInit.clonedr  )rt  r   r  r  r  s   & r1   test_depr_star_init_cloned/ClinicFunctionalTest.test_depr_star_init_cloned>  s:    ##%,,

T
UB3TUr7   c                F   \         P                  pV P                  \        VR 4       V! R RR7       V! R RRR7       V! R RR7       V! R RRR7       \	        V P
                  RV4      pV! R R4       V! R RR4       V! R RRR7       V P                  \        VR RRR	4       R
# rw  rx  rz  rA   r{  rP  rz  'b' and 'c'rY  rc  N)rt  DeprStarInitNoInliner  r  r   r  r.   r  r   s   &  r1   test_depr_star_init_noinline1ClinicFunctionalTest.test_depr_star_init_noinlineD  s    ,,)S#.cScSC C3C3#,,mSAc3c3c3#)S#sC=r7   c                l    \         P                  pV! 4        V! R 4       V P                  RVR R7       R # Nr  ry  )rt  
DeprKwdNewr  r  s   & r1   test_depr_kwd_new&ClinicFunctionalTest.test_depr_kwd_newQ  s.    ""D	E3$/r7   c                l    \         P                  pV! 4        V! R 4       V P                  RVR R7       R # r.  )rt  DeprKwdInitr  r  s   & r1   test_depr_kwd_init'ClinicFunctionalTest.test_depr_kwd_initW  s.    ##D	E3$/r7   c                f   \         P                  p\         P                  pV P                  \        VR 4       V! R RR7       V! R RRR7       V! R RR7       V! R RRR7       \        V P                  RV4      pV! R R4       V! R RR4       V! R RRR7       V P                  \        VR RRR	4       R
# r'  )rt  DeprKwdInitNoInlinedepr_star_noinliner  r  r   r  r*  s   &  r1   test_depr_kwd_init_noinline0ClinicFunctionalTest.test_depr_kwd_init_noinline]  s    ++**)S#.cScSC C3C3#,,mSAc3c3c3#)S#sC=r7   c                ^    \         P                  pV! R R7       V P                  RVR4       R # )Nry  r  rw  )rt  depr_star_pos0_len1r  r  s   & r1   test_depr_star_pos0_len1-ClinicFunctionalTest.test_depr_star_pos0_len1k  s&    **
T
UB,r7   c                    \         P                  pV! ^ ^ R7       \        V P                  RV4      pV! R^ R7       V! RR4       R# )r   rz  z'a' and 'b'rw  rP  rx  N)rt  depr_star_pos0_len2r   r  r.   r,   r   s   &  r1   test_depr_star_pos0_len2-ClinicFunctionalTest.test_depr_star_pos0_len2p  s<    **
Q!,,mR@cQc3r7   c                    \         P                  pV! ^ ^ ^ ^ R7       \        V P                  RV4      pV! R^ ^ ^ R7       V! RR^ ^ R7       V! RRR^ R7       R	# )
r   rb  'a', 'b' and 'c'rw  r  rx  r  rA   r  N)rt  depr_star_pos0_len3_with_kwdr   r  rA  s   &  r1   !test_depr_star_pos0_len3_with_kwd6ClinicFunctionalTest.test_depr_star_pos0_len3_with_kwdw  sZ    33
Q!qA,,.@"EcQ!q!c3!q!c3q!r7   c                    \         P                  pV! ^ ^ R7       V! R^ R7       V! ^ R7       \        V P                  RV4      pV! RR4       R# )r   rz  rw  rP  ry  'b'rx  N)rt  depr_star_pos1_len1_optr   r  rA  s   &  r1   test_depr_star_pos1_len1_opt1ClinicFunctionalTest.test_depr_star_pos1_len1_opt  sC    ..
Q!
3!
Q,,eR8c3r7   c                    \         P                  pV! ^ ^ R7       V! R^ R7       \        V P                  RV4      pV! RR4       R# )r   rz  rw  rP  rJ  rx  N)rt  depr_star_pos1_len1r   r  rA  s   &  r1   test_depr_star_pos1_len1-ClinicFunctionalTest.test_depr_star_pos1_len1  s<    **
Q!
3!,,eR8c3r7   c                    \         P                  pV! ^ ^ ^ ^ R7      3 V! R^ ^ ^ R7      3 \        V P                  RV4      pV! RR^ ^ R7      3 V! RRR^ R7      3 R	# )
r   rb  rw  r  r(  rx  r  rA   r  N)rt  depr_star_pos1_len2_with_kwdr   r  rA  s   &  r1   !test_depr_star_pos1_len2_with_kwd6ClinicFunctionalTest.test_depr_star_pos1_len2_with_kwd  se    33
Q!qA
3!qA,,mR@c3!q!"c3q!"r7   c                    \         P                  pV! ^ ^ ^ R7       V! R^ ^ R7       V! RR^ R7       \        V P                  RV4      pV! RRR4       R# )	r   r{  rw  rz  rx  rY  z'c'rA   N)rt  depr_star_pos2_len1r   r  rA  s   &  r1   test_depr_star_pos2_len1-ClinicFunctionalTest.test_depr_star_pos2_len1  sQ    **
Q!q
3!q
3q,,eR8c3r7   c                    \         P                  pV! ^ ^ ^ ^ R7       V! R^ ^ ^ R7       V! RR^ ^ R7       \        V P                  RV4      pV! RRR^ R7       V! RRRR	4       R
# )r   rb  rw  r  rx  r  'c' and 'd'rA   r  rc  N)rt  depr_star_pos2_len2r   r  rA  s   &  r1   test_depr_star_pos2_len2-ClinicFunctionalTest.test_depr_star_pos2_len2  sg    **
Q!qA
3!qA
3qA,,mR@c3q!c3S!r7   c                    \         P                  pV! ^ ^ ^ ^ ^ R7       V! R^ ^ ^ ^ R7       V! RR^ ^ ^ R7       \        V P                  RV4      pV! RRR^ ^ R7       V! RRRR	^ R
7       R# )r   rw  rx  rA   rc  r  rw  rx  rA   rc  r  rx  r  r[  rA   r  rc  )r  N)rt  depr_star_pos2_len2_with_kwdr   r  rA  s   &  r1   !test_depr_star_pos2_len2_with_kwd6ClinicFunctionalTest.test_depr_star_pos2_len2_with_kwd  sq    33
Q!qA#
3!qA#
3qA#,,mR@c3qA&c3SA&r7   c                F   \         P                  pV P                  \        VR 4       V! R RR7       V! R RRR7       V! R RR7       V! R RRR7       \	        V P
                  RV4      pV! R R4       V! R RR4       V! R RRR7       V P                  \        VR RRR	4       R
# r'  )rt  r8  r  r  r   r  rA  s   &  r1   test_depr_star_noinline,ClinicFunctionalTest.test_depr_star_noinline  s    )))R-
SC
SC3
3#
3#,,mR@c3c3c3#)Rc3<r7   c                   \         P                  pV P                  \        VR 4       V! R RRRRRRRR7       R	p\	        V P
                  \        P                  ! V4      V4      pV! R RRRRRRRR
7       V! R RRRRRRRR7       V! R RRRRRRRR7       V! R RRRRRRRR7       V! R RRRRRRRR7       V! R RRRRRRRR7       V P                  \        VR RRRRRRR4
       R# )rw  rx  rA   rc  r  r  ghrx  rA   rc  r  r  ri  rj  a)  Passing more than 1 positional argument to depr_star_multi() is deprecated. Parameter 'b' will become a keyword-only parameter in Python 3.16. Parameters 'c' and 'd' will become keyword-only parameters in Python 3.15. Parameters 'e', 'f' and 'g' will become keyword-only parameters in Python 3.14.rA   rc  r  r  ri  rj  rc  r  r  ri  rj  r  r  ri  rj  r  ri  rj  ri  rj  rj  N)rt  depr_star_multir  r  r   r  rG   rH   r.   r,   rO   r   s   &   r1   test_depr_star_multi)ClinicFunctionalTest.test_depr_star_multi  s   &&)R-
3#scSC@^ 	
 6):B?c3#scSAc3scSC3?c3SC3#=c3S#s;c3S#scS9c3S#sC37)Rc3S#sCPr7   c                   \         P                  pV! R R4       V P                  \        VR 4       V P                  \        VR RR4       \	        V P
                  RV4      pV! R RR7       V P                  \        VR RR7       R# rw  rx  rA   rJ  rP  rz  N)rt  depr_kwd_required_1r  r  r   r  rA  s   &  r1   test_depr_kwd_required_1-ClinicFunctionalTest.test_depr_kwd_required_1  ss    **
3)R-)Rc37++UB7cS)R3#6r7   c                ,   \         P                  pV! R RR4       V P                  \        VR R4       V P                  \        VR RRR4       \	        V P
                  RV4      pV! R RRR7       V! R RRR7       V P                  \        VR RRR7       R# )	rw  rx  rA   rc  r(  rY  rz  r{  N)rt  depr_kwd_required_2r  r  r   r  rA  s   &  r1   test_depr_kwd_required_2-ClinicFunctionalTest.test_depr_kwd_required_2  s    **
3S)Rc2)Rc3<++]B?c3#cSC )R3#=r7   c                   \         P                  pV! R 4       V! R R4       V P                  \        V4       V P                  \        VR RR4       \	        V P
                  RV4      pV! R RR7       V P                  \        VR RR7       R# rw  )rt  depr_kwd_optional_1r  r  r   r  rA  s   &  r1   test_depr_kwd_optional_1-ClinicFunctionalTest.test_depr_kwd_optional_1  sx    **
3
3)R()Rc37++UB7cS)R3#6r7   c                   \         P                  pV! R 4       V! R R4       V! R RR4       V P                  \        V4       V P                  \        VR RRR4       \	        V P
                  RV4      pV! R RR7       V! R RR7       V! R RRR7       V! R RRR7       V! R RRR7       V P                  \        VR RRR	7       R
# )rw  rx  rA   rc  r(  rP  rY  rz  rA   rx  r{  N)rt  depr_kwd_optional_2r  r  r   r  rA  s   &  r1   test_depr_kwd_optional_2-ClinicFunctionalTest.test_depr_kwd_optional_2  s    **
3
3
3S)R()Rc3<++]B?cScScSC cSC c3#)R3#=r7   c                   \         P                  pV! 4        V! R 4       V! R R4       V! R RR4       V P                  \        VR RRR4       \	        V P
                  RV4      pV! R RRR7       V! R RR7       V! R R7       R# )	rw  rx  rA   rc  rE  rY  rP  ry  N)rt  depr_kwd_optional_3r  r  r   r  rA  s   &  r1   test_depr_kwd_optional_3-ClinicFunctionalTest.test_depr_kwd_optional_3  sx    **

3
3
3S)Rc3<++-?Dc3#cSr7   c                   \         P                  pV! R R4       V! R RR4       V P                  \        V4       V P                  \        VR 4       V P                  \        VR RRR4       \	        V P
                  RV4      pV! R RR7       V! R RRR7       V! R RRR7       V! R RRR7       V P                  \        VR RR7       V P                  \        VR RRR	7       R
# )rw  rx  rA   rc  r(  rP  rz  r  rY  r{  N)rt  depr_kwd_required_optionalr  r  r   r  rA  s   &  r1   test_depr_kwd_required_optional4ClinicFunctionalTest.test_depr_kwd_required_optional  s    11
3
3S)R()R-)Rc3<++]B?cScSC cSC c3#)R4)R3#=r7   c                d   \         P                  pV! R R4       V! R RR4       V P                  \        VR 4       \	        V P
                  RV4      pV! R RR7       V! R RRR7       V! R RRR7       V! R RRR7       V P                  \        VR RR7       V P                  \        VR RRR7       R	# )
rw  rx  rA   r(  rP  rz  r  rY  r{  N)rt  depr_kwd_noinliner  r  r   r  rA  s   &  r1   test_depr_kwd_noinline+ClinicFunctionalTest.test_depr_kwd_noinline  s    ((
3
3S)R-++]B?cScSC cSC c3#)R4)R3#=r7   c                   \         P                  pV! R RRRRRRRR7       R	p\        V P                  \        P
                  ! V4      V4      pV! R RRRRRRRR
7       V! R RRRRRRRR7       V! R RRRRRRRR7       V! R RRRRRRRR7       V! R RRRRRRRR7       V! R RRRRRRRR7       V P                  \        VR RRRRRRRR7
       R# )rw  rx  rA   rc  r  r  ri  rj  rq  a!  Passing keyword arguments 'b', 'c', 'd', 'e', 'f' and 'g' to depr_kwd_multi() is deprecated. Parameter 'b' will become positional-only in Python 3.14. Parameters 'c' and 'd' will become positional-only in Python 3.15. Parameters 'e', 'f' and 'g' will become positional-only in Python 3.16.rp  ro  rn  rm  rl  rk  )rw  rx  rA   rc  r  r  ri  rj  N)rt  depr_kwd_multir   r  rG   rH   r  r  rs  s   &   r1   test_depr_kwd_multi(ClinicFunctionalTest.test_depr_kwd_multi#  s    %%
3S#sC4V 	
 6):B?c3S#scS9c3S#s;c3SC3#=c3scSC3?c3#scSAcSC3#sC)R3#scUX\_`r7   c                   \         P                  pV P                  \        VR RRRRRR4	       Rp\	        V P
                  \        P                  ! V4      V4      pV! R RRRRRRR7       V! R RRRRRRR	7       V! R RRRRRRR
7       V! R RRRRRRR7       Rp\	        V P
                  \        P                  ! V4      V4      pV! R RRRRRRR7       V! R RRRRRRR7       V P                  \        VR RRRRRRR7	       R# )rw  rx  rA   rc  r  r  ri  zPassing more than 4 positional arguments to depr_multi() is deprecated. Parameter 'e' will become a keyword-only parameter in Python 3.15. Parameter 'f' will become a keyword-only parameter in Python 3.14.)ri  )r  ri  )r  r  ri  )rc  r  r  ri  zPassing keyword arguments 'b' and 'c' to depr_multi() is deprecated. Parameter 'b' will become positional-only in Python 3.14. Parameter 'c' will become positional-only in Python 3.15.)rA   rc  r  r  ri  )rx  rA   rc  r  r  ri  )rw  rx  rA   rc  r  r  ri  N)rt  
depr_multir  r  r   r  rG   rH   rs  s   &   r1   test_depr_multi$ClinicFunctionalTest.test_depr_multi4  s   !!)Rc3S#sKQ 	 6):B?c3S#sc2c3S#4
3S#s3
3SC3#5H 	 6):B?c3#sc:cSC3#<)R3#scUXYr7   r4   )yr.  r/  r0  r1  localsrT   dirrt  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r"  r&  r*  r1  r6  r<  rB  rF  rM  rR  rV  r_  rj  rn  rs  rw  r|  r  r  r  r  r  r  r  r  r8   varposvarpos_arrayr  varpos_no_fastcallvarpos_array_no_fastcallr  posonly_varposposonly_varpos_arrayposonly_varpos_no_fastcall posonly_varpos_array_no_fastcallr  posonly_req_opt_varposposonly_req_opt_varpos_array"posonly_req_opt_varpos_no_fastcall(posonly_req_opt_varpos_array_no_fastcallr  posonly_poskw_varposposonly_poskw_varpos_array posonly_poskw_varpos_no_fastcall&posonly_poskw_varpos_array_no_fastcallr  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r
  r  r  r  r  r!  r$  r+  r0  r4  r9  r=  rB  rG  rL  rP  rT  rX  r]  rc  rf  rt  ry  r}  r  r  r  r  r  r  r  r3  r4  r5  s   @r1   rn  rn    sW    
HOO L #IL L,
2 
22T 2D^
WO
c'

Ej	CkOh	Dj	Ip	Q	K>CDD	Y	gp
?
FKZRECT
Y
C	=Yf j 
FF 	9##))&&99&&??
A	/	
A	/
 
9++11&&AA&&GG
I	=	
I	= 
93399&&II&&OO
Q	=	
Q	= 
91177&&GG&&MM
O	H	
O	H	9
6;A	@9,B7Y ./77"
7C"/U/V>00>-
"#"'=Q$7>7>
>>a"Z Zr7   rn  c                   B   a  ] tR tRt o R t]R 4       tR tR tRt	V t
R# )LimitedCAPIOutputTestsiJ  c                (    \        R R7      V n        R# )Tr<  N)rB   r   rg   s   &r1   rh   LimitedCAPIOutputTests.setUpL  s    "5r7   c                     \        R V  R24      # )zO
            /*[clinic input]
            output everything buffer
            z
            [clinic start generated code]*/
            /*[clinic input]
            dump buffer
            [clinic start generated code]*/
        r
   r  s   &r1   wrap_clinic_input(LimitedCAPIOutputTests.wrap_clinic_inputO  s%      G 	  	r7   c                    V P                  R 4      pV P                  P                  V4      pV P                  RV4       V P	                  RV4       V P	                  RV4       R# )zE
            func
                f: float
                /
        PyFloat_AS_DOUBLEzfloat f;zf = (float) PyFloat_AsDoubleNr  r   r`   r   r   r  s   &  r1   test_limited_capi_float.LimitedCAPIOutputTests.test_limited_capi_float[  s[    && ( 
 KK%%e,	,i8j),4i@r7   c                    V P                  R 4      pV P                  P                  V4      pV P                  RV4       V P	                  RV4       V P	                  RV4       R# )zF
            func
                f: double
                /
        r  z	double f;zf = PyFloat_AsDoubleNr  r  s   &  r1   test_limited_capi_double/LimitedCAPIOutputTests.test_limited_capi_doublef  s[    && ( 
 KK%%e,	,i8k9-,i8r7   r-  N)r.  r/  r0  r1  rh   staticmethodr  r  r  r3  r4  r5  s   @r1   r  r  J  s.     6 	 		A	9 	9r7   r  z_testclinic_limited is missingc                   ~   a  ] tR tRt o ]! 4       P                  R ]! ]4       4       4       R tR t	R t
R tRtV tR# )	LimitedCAPIFunctionalTestiw  c              #  v   "   T F/  qP                  R 4      '       g   K  V\        \        V4      3x  K1  	  R# 5irp  )rr  rs  _testclinic_limitedru  s   & r1   rw  #LimitedCAPIFunctionalTest.<genexpr>y  s0      V 8OOG<T ?T7#6=> 8ry  c                ,   V P                  \        4      ;_uu_ 4        \        P                  ! 4        R R R 4       V P	                  \        P                  ! ^4      ^4       V P                  \        4      ;_uu_ 4        \        P                  ! R4       R R R 4       V P                  \        4      ;_uu_ 4        \        P                  ! R4       R R R 4       R #   + '       g   i     L; i  + '       g   i     La; i  + '       g   i     R # ; i)N      ?xyz)r  r  r  my_int_funcrJ   rg   s   &r1   test_my_int_func*LimitedCAPIFunctionalTest.test_my_int_func|  s    y))++- *,88;Q?y))++C0 *y))++E2 *) *) *))))s#   C?C/;DC,	/C?	D	c                   V P                  \        4      ;_uu_ 4        \        P                  ! 4        R R R 4       V P                  \        4      ;_uu_ 4        \        P                  ! ^4       R R R 4       V P	                  \        P                  ! ^^4      ^4       V P                  \        4      ;_uu_ 4        \        P                  ! R^4       R R R 4       V P                  \        4      ;_uu_ 4        \        P                  ! ^R4       R R R 4       R #   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     Lu; i  + '       g   i     R # ; i)Nr  r  )r  r  r  
my_int_sumrJ   rg   s   &r1   test_my_int_sum)LimitedCAPIFunctionalTest.test_my_int_sum  s    y))**, *y))**1- *,771=qAy))**32 *y))**1e4 *) *))) *))))s/   DD.<E9ED+	.D>	E	E%	c           
        \         P                  \         P                  3 F  pV P                  VP                  R 7      ;_uu_ 4        V P                  V! RR4      R4       V P                  \        4      ;_uu_ 4        V! 4        RRR4       V P                  \        4      ;_uu_ 4        V! ^4       RRR4       V P                  \        4      ;_uu_ 4        V! RR4       RRR4       RRR4       K  	  R#   + '       g   i     L{; i  + '       g   i     L`; i  + '       g   i     LD; i  + '       g   i     EK$  ; i))r  r  g      @g      @N2)r  my_float_summy_double_sumr-   r.  rJ   r  r  )r.   r  s   & r1   test_my_double_sum,LimitedCAPIFunctionalTest.test_my_double_sum  s    ,,--
D 4==11  c35&&y11F 2&&y11G 2&&y11SM 2 21	
 211111 211sT   7D3?C:%D3,	D5%D3
D $D3:D
D3DD3 D0+D33Ec                   \         P                  p ! R  R\        4      p ! R R4      pR
 F[  pV P                  V! V4      V4       V! V4      pV P                  V! V4      V4       V! V4      pV P                  V! V4      V4       K]  	  V P	                  \
        4      ;_uu_ 4        V! ^R,          4       RRR4       V P                  \        R4      ;_uu_ 4        V! R4       RRR4       V P	                  \        4      ;_uu_ 4        V! R4       RRR4       V P	                  \        4      ;_uu_ 4        V! R	4       RRR4       V P	                  \        4      ;_uu_ 4        V! R4       RRR4       R#   + '       g   i     L; i  + '       g   i     L; i  + '       g   i     L; i  + '       g   i     Ly; i  + '       g   i     R# ; i)c                       ] tR tRtRtR# )ALimitedCAPIFunctionalTest.test_get_file_descriptor.<locals>.MyInti  r4   N)r.  r/  r0  r1  r3  r4   r7   r1   MyIntr    s    r7   r  c                   ,   a  ] tR tRt o R tR tRtV tR# )BLimitedCAPIFunctionalTest.test_get_file_descriptor.<locals>.MyFilei  c                    Wn         R # rF   _fd)r.   fds   &&r1   r  KLimitedCAPIFunctionalTest.test_get_file_descriptor.<locals>.MyFile.__init__  s    r7   c                    V P                   # rF   r  rg   s   &r1   filenoILimitedCAPIFunctionalTest.test_get_file_descriptor.<locals>.MyFile.fileno  s    xxr7   r  N)r.  r/  r0  r1  r  r  r3  r4  r5  s   @r1   MyFiler    s        r7   r     Nz!bool is used as a file descriptorTr  rI  )r   rq  rB  r  i@ )	r  get_file_descriptorr-  rJ   r  r  r{  RuntimeWarningr  )r.   get_fdr  r  r  myintmyfiles   &      r1   test_get_file_descriptor2LimitedCAPIFunctionalTest.test_get_file_descriptor  sS   $88	C 		  	  (BVBZ,"IEVE]B/BZFVF^R0 ( }--1c6N ."">#FH H4LH y))3K *y))5M *y))4L *) .-H H *))))))s<   (E;	F	F!:	F4(	G;F	F	!F1	4G	G	r4   N)r.  r/  r0  r1  r  rT   r  r  r  r  r  r  r3  r4  r5  s   @r1   r  r  w  sB     
HOO V #$7 8V V3	5"   r7   r  c                   2   a  ] tR tRt o R tR tR tRtV tR# )PermutationTestsi  c                    Rp\        \        . RO4      4      p\        \        V4      4      pV P	                  W14       R# )rK  NrJ  )r4   )rK  r  rJ  )r  rF  r  r   rJ   r.   r   rh  actuals   &   r1   test_permute_left_option_groups0PermutationTests.test_permute_left_option_groups  s7    
 C	N#1$78*r7   c                    Rp\        \        . RO4      4      p\        \        V4      4      pV P	                  W14       R# )rq  NrJ  )r4   r  r  rJ  )r  rF  r  r   rJ   r  s   &   r1    test_permute_right_option_groups1PermutationTests.test_permute_right_option_groups  s7    
 C	N#2489*r7   c           	        R RRRRRRR/pR RRRRRRR
/pR RRR	RRRR/pR RRR	RRRR/pR RRRRRRR/pR RRR	RRRR/pR RRRRRRR/pR RRRRRRR/pR RRRRRRR/p	VW#VWVVW3	p
V
 Fb  pV P                   ! R/ VB ;_uu_ 4        VP                  4       w  rr\        WV4      p\        V4      pV P	                  VV4       RRR4       Kd  	  R#   + '       g   i     Ky  ; i)leftrequiredrightr   Nr4   )r4   rP  rY  rz  )rP  rz  r  )rz  r  r  )rz  r  ra  ry  rz  )rP  rz  )rz  r{  )rY  rz  r{  )rP  rz  r{  r  )r  r  )r  r  rb  r`  )rw  rx  rA   rc  r  r  )r-   r  r   r  rJ   )r.   emptynoleft1noleft2noleft3noright1noright2noright3leftandright1leftandright2ru  r  r  r  r  r   permutationsr  s   &                 r1   test_permute_optional_groups-PermutationTests.test_permute_optional_groups  s   B
B

 B
FGV 
 B
K& 
 B
K* 
 FJ 
 FJ
GR 
 J
FGR 
 FJ 
 J
J 	
 g	
 F'''28--//6tuM|,  2	 (' '''s   =CCr4   N)	r.  r/  r0  r1  r  r  r  r3  r4  r5  s   @r1   r  r    s     	+	+N3 N3r7   r  c                   D   a  ] tR tRt o R tR tR tR tR tR t	Rt
V tR	# )
FormatHelperTestsi+  c                    RpV FO  w  r#V P                  W#R7      ;_uu_ 4        \        P                  ! V4      pV P                  WC4       RRR4       KQ  	  R#   + '       g   i     Kf  ; i)a
b)rJ  r   N)	)r  r  )za
b
r  )za
b r  )z
a
b

r  )z

a
b

r  )z

a

b

za

b) a
br  )z a
b r  )z 
 
 a
b 
 
 r  )r-   r  normalize_snippetrJ   )r.   ru  rJ  r   r   s   &    r1   +test_strip_leading_and_trailing_blank_lines=FormatHelperTests.test_strip_leading_and_trailing_blank_lines-  sX    
  'OEE==11%8  / >=  '===   (AA+c                   R pRpRpRp^ V^V^V/pVP                  4        FP  w  rgV P                  VR7      ;_uu_ 4        \        P                  ! WR7      pV P	                  W4       RRR4       KR  	  R#   + '       g   i     Kg  ; i)z;
            one
            two
            three
        zone
two
threez    one
    two
    threez%        one
        two
        three)indentN)rM  r-   r  r	  rJ   )	r.   snippetzero_indentfour_indenteight_indentexpected_outputsr  r   r  s	   &        r1   test_normalize_snippet(FormatHelperTests.test_normalize_snippet@  s     	 	 	
 {A{A|L 0 6 6 8FV,,"44WL  2 -, !9,,,s    )A77Bc                    RpV FO  w  r#V P                  W#R7      ;_uu_ 4        \        P                  ! V4      pV P                  WC4       RRR4       KQ  	  R#   + '       g   i     Kf  ; i)rI  )rK  r   N))rI  "abc")z\abcz"\\abc")z\a\bcz	"\\a\\bc")z\a\\bcz"\\a\\\\bc")r  z	"\"abc\"")r  z"\'a\'")r-   r  docstring_for_c_stringrJ   )r.   ru  rK  r   r   s   &    r1   test_escaped_docstring(FormatHelperTests.test_escaped_docstring]  sX    
 &ND4;;66t<  / <; &;;;r  c                \    R pRp\         P                  ! V4      pV P                  W24       R# )z{}, {a}z{{}}, {{a}}N)r  format_escaperJ   )r.   rK  r   r   s   &   r1   test_format_escape$FormatHelperTests.test_format_escapel  s*     %%d+'r7   c                
   V P                  \        P                  ! R RR7      R 4       RpRp\        P                  ! VRR7      pV P                  W24       RpRp\        P                  ! VRR7      pV P                  W24       R# )r>   bar)prefixone
twozbarone
bartwo	
one
two
zbar
barone
bartwo
N)rJ   r  indent_all_linesr.   rJ  r   r   s   &   r1   test_indent_all_lines'FormatHelperTests.test_indent_all_linesr      33BuErJ 	
 	 ((u=' 	 	 ((u='r7   c                
   V P                  \        P                  ! R RR7      R 4       RpRp\        P                  ! VRR7      pV P                  W24       RpRp\        P                  ! VRR7      pV P                  W24       R# )r>   r  )suffixr"  zonefoo
twofoor#  zfoo
onefoo
twofoo
N)rJ   r  suffix_all_linesr%  s   &   r1   test_suffix_all_lines'FormatHelperTests.test_suffix_all_lines  r(  r7   r4   N)r.  r/  r0  r1  r
  r  r  r  r&  r,  r3  r4  r5  s   @r1   r  r  +  s(     0&3:0((>( (r7   r  c                   J   a  ] tR tRt o R tR tR tR tR tR t	R t
R	tV tR
# )ClinicReprTestsi  c                   \        R 4      pRpV P                  \        V4      V4       \        RR. RR4      pRpV P                  \        V4      V4       \        RR. RRR	7      pR
pV P                  \        V4      V4       R# )r  z-<clinic.Block 'text' input='foo' output=None>r   bazeggsspamz.<clinic.Block 'baz' input='bar' output='eggs'>wow_so_longr>   )r  dsl_namer  r:  r  zg<clinic.Block 'wow_so_long' input='longboi_longboi_longboi_l...' output='very_long_very_long_very_...'>N   longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_longboi_  very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_very_long_)r"   rJ   r  )r.   r   expected_reprblock2expected_repr_2block3expected_repr_3s   &      r1   test_Block_reprClinicReprTests.test_Block_repr  s    eGem4ueR8Jf7""%
 v 	 	f7r7   c                    \        4       p\        R RVR	R7      pV P                  \        V4      R4       \        RRVR7      pV P                  \        V4      R4       R# )
r  r  )r  r   r0  z2<clinic.Destination 'foo' type='file' file='eggs'>r   buffer)r  r   z(<clinic.Destination 'bar' type='buffer'>N)r2  )rB   r%   rJ   r  )r.   rA   destinationdestination2s   &   r1   test_Destination_repr%ClinicReprTests.test_Destination_repr  s]    N!qy
 	S	
 #5xBl+-WXr7   c                d    \        R \        4       4      pV P                  \        V4      R4       R# )r  z<clinic.Module 'foo' at \d+>N)r   rB   assertRegexr  )r.   r  s   & r1   test_Module_repr ClinicReprTests.test_Module_repr  s%    |~.f'FGr7   c                j    \        R \        4       RRR4      pV P                  \        V4      R4       R# )r  Nsome_typedefsome_type_objectz<clinic.Class 'foo' at \d+>)r   rB   rF  r  r  s   & r1   test_Class_reprClinicReprTests.test_Class_repr  s,    E<>4ASTc$BCr7   c                X    V P                  \        \        P                  4      R 4       R# )z"<clinic.FunctionKind.CLASS_METHOD>N)rJ   r  r   rc  rg   s   &r1   test_FunctionKind_repr&ClinicReprTests.test_FunctionKind_repr  s!    **+-Q	
r7   c                <   \        R \        4       RRR\        4       \        P                  RR7      pV P                  \        V4      R4       \        RRV4      p\        R\        P                  P                  VVR7      pV P                  \        V4      R4       R# )	r  NfoofooF)r  r  r  r  	full_namerW  rf  coexistz<clinic.Function 'foo'>r   )rf  r  r  z<clinic.Parameter 'bar'>)r   rB   r!   r   METHOD_INITrJ   r  r   r   rd  POSITIONAL_OR_KEYWORD)r.   r  r  	parameters   &   r1   !test_Function_and_Parameter_reprs1ClinicReprTests.test_Function_and_Parameter_reprs  s    >13))	
 	h)BC"5%:	""88	
	 	i*DEr7   c                `   \         P                  P                  R 4      pV P                  \	        V4      R4       ^*Vn        VP                  P                  R4       V P                  \	        V4      R4       VP                  P                  R4       V P                  \	        V4      R4       R# )re   z(<clinic.Monitor \d+ line=0 condition=''>z3<clinic.Monitor \d+ line=42 condition='condition1'>zA<clinic.Monitor \d+ line=42 condition='condition1 && condition2'>N)token1
condition1)token2
condition2)r  cppMonitorrF  r  r  stackappend)r.   monitors   & r1   test_Monitor_repr!ClinicReprTests.test_Monitor_repr  s    --''1g(ST 56MQ	
 	56MP	
r7   r4   N)r.  r/  r0  r1  r=  rC  rG  rL  rO  rX  rd  r3  r4  r5  s   @r1   r/  r/    s1     8*YHD

F,
 
r7   r/  __main__)W	functoolsr   r0   r   r   test.supportr   test.support.os_helperr   r   r	   textwrapr   unittestr   rd  os.pathr  rG   r  skip_if_missingimports_under_toolr  r   r   r   r   libclinic.convertersr   r   r   libclinic.functionr   r   r   r   r   r   r   r   r   libclinic.clanguager   libclinic.converterr   r   libclinic.return_convertersr    r!   libclinic.block_parserr"   r#   libclinic.codegenr$   r%   libclinic.dsl_parserr&   libclinic.clir'   r(   r8   rB   rQ   rV   r[   r]   r8  rR  r  r  r  r  r  r  _testclinicrt  ImportErrorskipIfrn  r  r  r  r  r  r/  r.  r  r4   r7   r1   <module>r{     sa  
  $ " 9 9     	 
  
  8 $""8,,>>QQ$ $ $ -AS9;.0 -$^ % $ t 0&
2S
#( S
#lV V2-*h -*`>;X >;B # #:H :zm2x m2`3T8 T8l
# 
d"$<=uZ8,, uZ >uZp%9X.. %9P 
$,.NOF 1 1 F PFRg3x(( g3TC()) C(LT
h'' T
n zMMO mG -,,x[  IL  s1   +A'H,I   I ,H=	 	II	II