Current File : //usr/local/apps/python3/lib/python3.11/test/__pycache__/test_clinic.cpython-311.opt-2.pyc
�

�Ke����ddlmZmZddlmZmZddlmZddlZddl	Z	ddl
ZddlZddlZej
d��ejd��5ddlZddlmZddd��n#1swxYwYGd�d��ZGd	�d
��ZGd�d��Zejd
d���ZGd�d��ZGd�de��ZGd�de��ZGd�de��ZGd�d��ZGd�d��ZGd�de��ZGd�de��ZGd �d!e��Zejd"��Z Gd#�d$ej��Z!e"d%krej#��dSdS)&�)�support�
test_tools)�
import_helper�	os_helper)�TestCaseN�clinic)�	DSLParserc��eZdZd�ZdS)�
FakeConverterc�"�||_||_dS�N)�name�args��selfrrs   �:/usr/local/apps/python3/lib/python3.11/test/test_clinic.py�__init__zFakeConverter.__init__s����	���	�	�	�N)�__name__�
__module__�__qualname__r�rrrrs#����������rrc��eZdZd�Zd�ZdS)�FakeConverterFactoryc��||_dSr
�r�rrs  rrzFakeConverterFactory.__init__s
����	�	�	rc�,�t|j|��Sr
)rr)rr�default�kwargss    r�__call__zFakeConverterFactory.__call__s���T�Y��/�/�/rN)rrrrr!rrrrrs2���������0�0�0�0�0rrc��eZdZd�Zd�ZdS)�FakeConvertersDictc��i|_dSr
)�used_converters�rs rrzFakeConvertersDict.__init__#s��!����rc�R�|j�|t|����Sr
)r%�
setdefaultr)rrrs   r�getzFakeConvertersDict.get&s$���#�.�.�t�5I�$�5O�5O�P�P�PrN)rrrrr)rrrr#r#"s7������"�"�"�Q�Q�Q�Q�Qrr#�C�file)�language�filenamec�D�eZdZd�Zd�Zd�Zd�Zd�Zej	j
Z
dS)�
FakeClinicc��t��|_t��|_tjd��|_d|_i|_tjd|j��|_	tj��|_tj��|_
|t_d|_dx|_|_i|_|�dd��|�dd��|�dd��|jj}tjd|d��fd|d��fd	|d��fd
|d��fd|d��fd|d��fd
|d��ff��|_dS)N�r/�block�bufferr+�suppress�docstring_prototype�docstring_definition�methoddef_define�impl_prototype�parser_prototype�parser_definition�impl_definition)r#�
converters�legacy_convertersr�	CLanguager,r-�destination_buffers�BlockParser�block_parser�collections�OrderedDict�modules�classesr�line_prefix�line_suffix�destinations�add_destinationr)�field_destinations)r�ds  rrzFakeClinic.__init__,sx��,�.�.���!3�!5�!5����(��.�.��
���
�#%�� �"�.�r�4�=�A�A���"�.�0�0���"�.�0�0�����
� ��	�.0�0���4�+�������W�h�/�/�/����V�X�.�.�.����Z��4�4�4���!��"-�"9�
"�A�A�j�M�M�2�
#�Q�Q�w�Z�Z�0�
���7���,�
�q�q��z�z�*�
���:���/�
 �!�!�G�*�*�-�
���'�
�
�+�;
�#�#����rc��|j�|��}|s$tjdt	|��z��|S)NzDestination does not exist: )rHr)�sys�exit�repr)rrrKs   r�get_destinationzFakeClinic.get_destinationGsB����!�!�$�'�'���	B��H�3�d�4�j�j�@�A�A�A��rc��||jvr$tjdt|��z��t	j|||g|�R�|j|<dS)NzDestination already exists: )rHrMrNrOr�Destination)rr�typers    rrIzFakeClinic.add_destinationMsV���4�$�$�$��H�3�d�4�j�j�@�A�A�A�"(�"4�T�4��"M��"M�"M�"M���$���rc��|dkS)N�modulerrs  r�is_directivezFakeClinic.is_directiveRs
���x��rc��||j|<dSr
)�called_directivesrs   r�	directivezFakeClinic.directiveUs��'+���t�$�$�$rN)rrrrrPrIrVrYr�Clinic�_module_and_classrrrr/r/+sk���������6���N�N�N�
 � � �,�,�,��
�7���rr/c��eZdZd�ZdS)�ClinicWholeFileTestc�4�tjtjd��d���}d}|�|�����}|d���}|�|d��|�|d��dS)Nr+�r-z/*[clinic]
foo
[clinic]*/�z[clinic]*/[clinic]*/z
[clinic]*/)rrZr>�parse�
splitlines�rstrip�assertNotEqual�assertEqual)r�c�raw�cooked�end_lines     r�test_eolzClinicWholeFileTest.test_eol[s���
�M�&�*�4�0�0�6�B�B�B��+��������(�(�*�*���!�9�#�#�%�%��	
���H�&<�=�=�=�����<�0�0�0�0�0rN)rrrrjrrrr]r]Zs#������1�1�1�1�1rr]c�2�eZdZd�Zd�Zd�Zd�Zd�Zd�ZdS)�ClinicGroupPermuterTestc�^�tj|||��}|�||��dSr
)r�permute_optional_groupsre)r�l�m�r�output�computeds      r�_testzClinicGroupPermuterTest._testps2���1�!�Q��:�:�������*�*�*�*�*rc�@�|�dggdgdggd��dS)N�start�stop�step))rw)rvrw)rvrwrx�rtr&s r�
test_rangez"ClinicGroupPermuterTest.test_rangets7���
�
�W�I�;���F�8�*��	
�	
�	
�	
�	
rc�B�|�ddggdgdggd��dS)N�x�y�ch�attr))r~)r~r)r|r}r~)r|r}r~rryr&s r�test_add_windowz'ClinicGroupPermuterTest.test_add_window|s9���
�
�S�#�J�<�$��6�(���	
�	
�	
�	
�	
rc�P�|�gd�ddggdgddggd�gd��dS)	N)�a1�a2�a3�b1�b2�c1�d1�d2)�e1�e2�e3))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�ryr&s r�test_ludicrousz&ClinicGroupPermuterTest.test_ludicrous�sO���
�
�&�&�&��t��5��v��t��N`�N`�N`�?a��	
�	
�	
�	
�	
rc�B�|�ggdgdgdggd��dS)N�a�brf)r�r��r�r��r�r�rfryr&s r�test_right_onlyz'ClinicGroupPermuterTest.test_right_only�s:���
�
�2�r�S�E�3�%���.��	
�	
�	
�	
�	
rc�B�d�}|�t|��dS)Nc�4�tjdggg��dS)Nr�)rrnrrr�fnzPClinicGroupPermuterTest.test_have_left_options_but_required_is_empty.<locals>.fn�s���*�C�5�"�b�9�9�9�9�9r)�assertRaises�AssertionError)rr�s  r�,test_have_left_options_but_required_is_emptyzDClinicGroupPermuterTest.test_have_left_options_but_required_is_empty�s-��	:�	:�	:����.�"�-�-�-�-�-rN)	rrrrtrzr�r�r�r�rrrrlrlosn������+�+�+�
�
�
�
�
�
�	
�	
�	
�
�
�
�.�.�.�.�.rrlc�8�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	dS)	�ClinicLinearFormatTestc�V�tj|fi|��}|�||��dSr
)r�
linear_formatre)r�inputrrr rss     rrtzClinicLinearFormatTest._test�s6���'��8�8��8�8�������*�*�*�*�*rc�2�|�dd��dS)Nr1ryr&s r�test_empty_stringsz)ClinicLinearFormatTest.test_empty_strings�s���
�
�2�r�����rc�2�|�dd��dS)N�
ryr&s r�test_solo_newlinez(ClinicLinearFormatTest.test_solo_newline�s���
�
�4������rc�2�|�dd��dS)Nz
          abc
          ryr&s r�test_no_substitutionz+ClinicLinearFormatTest.test_no_substitution�s,���
�
���	�	�	�	�	rc�6�|�ddd���dS)N�8
          abc
          {name}
          def
          z'
          abc
          def
          r1rryr&s r�test_empty_substitutionz.ClinicLinearFormatTest.test_empty_substitution�s6���
�
����	�	�	�	�	�	rc�6�|�ddd���dS)Nr�z8
          abc
          GARGLE
          def
          �GARGLErryr&s r�test_single_line_substitutionz4ClinicLinearFormatTest.test_single_line_substitution�s6���
�
����	�	�	�	�	�	rc�6�|�ddd���dS)Nr�zJ
          abc
          bingle
          bungle

          def
          zbingle
bungle
rryr&s r�test_multiline_substitutionz2ClinicLinearFormatTest.test_multiline_substitution�s6���
�
���'�	�
	(�
	(�
	(�
	(�
	(rN)
rrrrtr�r�r�r�r�r�rrrr�r��s}������+�+�+�������������	�	�	�(�(�(�(�(rr�c��eZdZd�Zd�ZdS)�InertParserc��dSr
r�rrs  rrzInertParser.__init__�����rc��dSr
r�rr2s  rrazInertParser.parse�r�rN�rrrrrarrrr�r��s2������
�
�
�
�
�
�
�
rr�c��eZdZd�Zd�ZdS)�
CopyParserc��dSr
rr�s  rrzCopyParser.__init__�r�rc��|j|_dSr
)r�rrr�s  rrazCopyParser.parse�s���{����rNr�rrrr�r��s2������
�
�
�#�#�#�#�#rr�c�2�eZdZd�Zd�Zd�Zd�Zd�Zd�ZdS)�ClinicBlockParserTestc��tjd��}ttj||����}tj|��}|D]}|�|���|j���}dSr
)rr>�listr@�BlockPrinter�print_block�f�getvalue)rr�rrr,�blocks�writerr2s       rrtzClinicBlockParserTest._test�sy���#�D�)�)���f�(���9�9�:�:���$�X�.�.���	&�	&�E����u�%�%�%�%���"�"�$�$���rc�.�|�||��Sr
ry)rr�s  r�
round_tripz ClinicBlockParserTest.round_trip�s���z�z�%��'�'�'rc�0�|�d��dS)Nz(
    verbatim text here
    lah dee dah
�r�r&s r�test_round_trip_1z'ClinicBlockParserTest.test_round_trip_1�s'������	�	�	�	�	rc�0�|�d��dS)Nz�
    verbatim text here
    lah dee dah
/*[inert]
abc
[inert]*/
def
/*[inert checksum: 7b18d017f89f61cf17d47f92749ea6930a3f1deb]*/
xyz
r�r&s r�test_round_trip_2z'ClinicBlockParserTest.test_round_trip_2�s'�����	�		�		�		�		�		rc��tjd��}tj|d���}t|��|jd<t|��|jd<|�|��}|�||��dS)Nr+r_�inert�copy)rr>rZr��parsersr�rare)rr�rrr,rfrss      r�_test_clinicz"ClinicBlockParserTest._test_clinicsu���#�D�)�)���M�(�V�4�4�4��(��^�^��	�'��&�q�M�M��	�&���7�7�5�>�>�������*�*�*�*�*rc�2�|�dd��dS)Nz�
    verbatim text here
    lah dee dah
/*[copy input]
def
[copy start generated code]*/
abc
/*[copy end generated code: output=03cfd743661f0797 input=7b18d017f89f61cf]*/
xyz
z�
    verbatim text here
    lah dee dah
/*[copy input]
def
[copy start generated code]*/
def
/*[copy end generated code: output=7b18d017f89f61cf input=7b18d017f89f61cf]*/
xyz
)r�r&s r�
test_clinic_1z#ClinicBlockParserTest.test_clinic_1	s.�����	�	�	�	�	�	�	rN)	rrrrtr�r�r�r�r�rrrr�r��sq������k�k�k�(�(�(����

�
�
�+�+�+�����rr�c��eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d �Z"d!�Z#d"�Z$d#�Z%d$�Z&d%�Z'd&�Z(d'�Z)d(�Z*d)�Z+d*�Z,d0d-�Z-d.�Z.d/S)1�ClinicParserTestc��tt����}tjd��}|�|��|j\}}|�d|j��|�d|j��dS)Nzmodule os
os.access�access�os)r	r/r�Blockra�
signaturesrer)r�parserr2rU�functions     r�test_trivialzClinicParserTest.test_trivial sx���:�<�<�(�(����3�4�4�����U���� �+��������8�=�1�1�1�����v�{�+�+�+�+�+rc��|�d��}|j\}}|�d|j��|�d|j��dS)Nz#
module os
os.accessr�r�)rar�rer�rr2rUr�s    r�test_ignore_linez!ClinicParserTest.test_ignore_line(sW���
�
�4�5�5�� �+��������8�=�1�1�1�����v�{�+�+�+�+�+rc�P�|�d��}|�d|j��|�dt|j����|jd}|�d|j��|�|jtj��dS)Nz module os
os.access
   path: intr�r`�path)	�parse_functionrer�len�
parameters�assertIsInstance�	converterr�
int_converter�rr��ps   r�
test_paramzClinicParserTest.test_param.s����&�&�'K�L�L������8�=�1�1�1�����C�� 3�4�4�5�5�5����'��������(�(�(����a�k�6�+?�@�@�@�@�@rc��|�d��}|jd}|�d|j��dS)Nz4module os
os.access
    follow_symlinks: bool = True�follow_symlinksT�r�r�rerr�s   r�test_param_defaultz#ClinicParserTest.test_param_default6sB���&�&�'_�`�`���� 1�2������q�y�)�)�)�)�)rc��|�d��}|jd}|�d|j��dS)NzCmodule os
os.access
    follow_symlinks: \
   bool \
   =\
    Truer�Tr�r�s   r�test_param_with_continuationsz.ClinicParserTest.test_param_with_continuations;sB���&�&�'t�u�u���� 1�2������q�y�)�)�)�)�)rc�*�|�d��}|jd}|�tj|j��|�d|jj��|�d��}|�|d��dS)NzOmodule os
os.access
    follow_symlinks: int(c_default='MAXSIZE') = sys.maxsizer��MAXSIZEz:module os
os.access
    follow_symlinks: int = sys.maxsizez~Error on line 0:
When you specify a named constant ('sys.maxsize') as your default value,
you MUST specify a valid c_default.
)	r�r�rerM�maxsizerr��	c_default�parse_function_should_fail)rr�r��ss    r�test_param_default_expressionz.ClinicParserTest.test_param_default_expression@s����&�&�'z�{�{���� 1�2�������a�i�0�0�0�����A�K�$9�:�:�:��+�+�,j�k�k������`�	a�	a�	a�	a�	arc��|�d��}|jd}|�dt|j����|�|jdjtj��dS)NzR
module os
os.access
    follow_symlinks: bool = True
    something_else: str = ''r���something_else)r�r�rer�r�r�r�
str_converterr�s   r�test_param_no_docstringz(ClinicParserTest.test_param_no_docstringIsx���&�&�( �!�!��

�� 1�2������C�� 3�4�4�5�5�5����h�1�2B�C�M�v�Oc�d�d�d�d�drc�\�|�d��}|�|d��dS)NzM
module os
os.access
    follow_symlinks: bool = True
    something_else: strzoError on line 0:
Can't have a parameter without a default ('something_else')
after a parameter with a default!
�r�re�rr�s  r�*test_param_default_parameters_out_of_orderz;ClinicParserTest.test_param_default_parameters_out_of_orderSsG���+�+�-�
�
��
	
�����	�	�	�	�	rc��|�d��}|jd}|�d|jjd��dS)Nz0module os
os.access
    path: path_t(allow_fd=1)r���allow_fd)r�r�rer�rr�s   r�!disabled_test_converter_argumentsz2ClinicParserTest.disabled_test_converter_arguments^sI���&�&�'[�\�\�����'������A�K�,�Z�8�9�9�9�9�9rc��|�d��}|�d���|j��dS)Nzx
module os
os.stat as os_stat_fn

   path: str
       Path to be examined

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

Perform a stat system call on the given path.

  path
    Path to be examined
�r�re�strip�	docstring�rr�s  r�test_function_docstringz(ClinicParserTest.test_function_docstringcsU���&�&�(1�2�2��	
����
�E�G�G�X�
�	!�	!�	!�	!�	!rc��|�d��}|�d���|j��dS)Nz|
module foo
foo.bar
  x: int
     Documentation for x.
  y: int

This is the documentation for foo.

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

This is the documentation for foo.

  x
    Documentation for x.

Okay, we're done here.
rr	s  r�%test_explicit_parameters_in_docstringz6ClinicParserTest.test_explicit_parameters_in_docstringvsU���&�&�
(�
�
��	
���
�
�E�G�G�X�
�
	!�
	!�
	!�
	!�
	!rc�f�|�d��}|�d|j��dS)Nz<
module os
os.stat
    path: str
This/used to break Clinic!
z5stat($module, /, path)
--

This/used to break Clinic!)r�rerr	s  r�Ttest_parser_regression_special_character_in_parameter_column_of_docstring_first_linezeClinicParserTest.test_parser_regression_special_character_in_parameter_column_of_docstring_first_line�s?���&�&�(����	
���S�U]�Ug�h�h�h�h�hrc�f�|�d��}|�d|j��dS)Nzmodule os
os.stat as os_stat_fn�
os_stat_fn)r�re�
c_basenamer	s  r�test_c_namezClinicParserTest.test_c_name�s5���&�&�'I�J�J������x�':�;�;�;�;�;rc�z�|�d��}|�|jtj��dS)Nzmodule os
os.stat -> int)r�r��return_converterr�int_return_converterr	s  r�test_return_converterz&ClinicParserTest.test_return_converter�s8���&�&�'B�C�C�����h�7��9T�U�U�U�U�Urc���|�d��}|jd}|�tjj|j��|�d|j��dS)Nz:module os
os.access
    *
    follow_symlinks: bool = Truer�r)r�r�re�inspect�	Parameter�KEYWORD_ONLY�kind�groupr�s   r�	test_starzClinicParserTest.test_star�s`���&�&�'f�g�g���� 1�2������*�7���@�@�@�����A�G�$�$�$�$�$rc��|�d��}|jd}|�d|j��dS)Nz/module window
window.border
 [
 ls : int
 ]
 /
�lsr)r�r�rerr�s   r�
test_groupzClinicParserTest.test_group�sA���&�&�'^�_�_�����%������A�G�$�$�$�$�$rc�b�|�d��}dD]W\}}|j|}|�|j|��|�|jt
jj���X|�|j�	��d�	����dS)Nz�
module curses
curses.addch
   [
   y: int
     Y-coordinate.
   x: int
     X-coordinate.
   ]
   ch: char
     Character to add.
   [
   attr: long
     Attributes for the character.
   ]
   /
))r}���)r|r"�r~r)rrz�
addch([y, x,] ch, [attr])


  y
    Y-coordinate.
  x
    X-coordinate.
  ch
    Character to add.
  attr
    Attributes for the character.
            �
r�r�rerrrr�POSITIONAL_ONLYrr�rr�rrr�s     r�test_left_groupz ClinicParserTest.test_left_group�s����&�&�(����"�	H�	H�K�D�%�
�#�D�)�A����Q�W�e�,�,�,����Q�V�W�%6�%F�G�G�G�G�����+�1�1�3�3�6�����	�	�	�	�	rc�b�|�d��}dD]W\}}|j|}|�|j|��|�|jt
jj���X|�|j�	��d�	����dS)Na
module curses
curses.imaginary
   [
   [
   y1: int
     Y-coordinate.
   y2: int
     Y-coordinate.
   ]
   x1: int
     X-coordinate.
   x2: int
     X-coordinate.
   ]
   ch: char
     Character to add.
   [
   attr1: long
     Attributes for the character.
   attr2: long
     Attributes for the character.
   attr3: long
     Attributes for the character.
   [
   attr4: long
     Attributes for the character.
   attr5: long
     Attributes for the character.
   attr6: long
     Attributes for the character.
   ]
   ]
   /
))�y1���)�y2r*)�x1r")�x2r"r#)�attr1r)�attr2r)�attr3r)�attr4r`)�attr5r`)�attr6r`a�
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.
                r$r&s     r�test_nested_groupsz#ClinicParserTest.test_nested_groups�s����&�&�"(�"�"��F�		H�		H�K�D�%��#�D�)�A����Q�W�e�,�,�,����Q�V�W�%6�%F�G�G�G�G�����+�1�1�3�3�6�6�E�G�G�7	�	�	�	�	rc��tj��5}|�t��5|�|��ddd��n#1swxYwYddd��n#1swxYwY|���Sr
)r�captured_stdoutr��
SystemExitr�r�)rr��stdouts   rr�z+ClinicParserTest.parse_function_should_fails���
�
$�
&�
&�	'�&��"�"�:�.�.�
'�
'��#�#�A�&�&�&�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'����
'�
'�
'�
'�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'����	'�	'�	'�	'���� � � s4�A(�A�A(�A	�A(�A	�A(�(A,�/A,c�\�|�d��}|�|d��dS)Nz|
module foo
foo.two_top_groups_on_left
    [
    group1 : int
    ]
    [
    group2 : int
    ]
    param: int
            zpError on line 0:
Function two_top_groups_on_left has an unsupported group configuration. (Unexpected state 2.b)
r�r�s  r�0test_disallowed_grouping__two_top_groups_on_leftzAClinicParserTest.test_disallowed_grouping__two_top_groups_on_left$sM���+�+�
-�

�

��	
����o�	q�	q�	q�	q�	qrc�0�|�d��dS)Nz}
module foo
foo.two_top_groups_on_right
    param: int
    [
    group1 : int
    ]
    [
    group2 : int
    ]
            �r�r&s r�1test_disallowed_grouping__two_top_groups_on_rightzBClinicParserTest.test_disallowed_grouping__two_top_groups_on_right4�)���'�'�
)�
	�
	�
	�
	�
	rc�0�|�d��dS)Nz�
module foo
foo.parameter_after_group_on_right
    param: int
    [
    [
    group1 : int
    ]
    group2 : int
    ]
            r<r&s r�8test_disallowed_grouping__parameter_after_group_on_rightzIClinicParserTest.test_disallowed_grouping__parameter_after_group_on_rightAr>rc�0�|�d��dS)Nz�
module foo
foo.group_after_parameter_on_left
    [
    group2 : int
    [
    group1 : int
    ]
    ]
    param: int
            r<r&s r�7test_disallowed_grouping__group_after_parameter_on_leftzHClinicParserTest.test_disallowed_grouping__group_after_parameter_on_leftNr>rc�0�|�d��dS)Nz`
module foo
foo.empty_group
    [
    [
    ]
    group2 : int
    ]
    param: int
            r<r&s r�-test_disallowed_grouping__empty_group_on_leftz>ClinicParserTest.test_disallowed_grouping__empty_group_on_left[�)���'�'�	)�		�		�		�		�		rc�0�|�d��dS)Nz`
module foo
foo.empty_group
    param: int
    [
    [
    ]
    group2 : int
    ]
            r<r&s r�.test_disallowed_grouping__empty_group_on_rightz?ClinicParserTest.test_disallowed_grouping__empty_group_on_rightgrErc��|�d��}|�d|j��|�dt|j����dS)Nz 
module foo
foo.bar

Docstring

zbar($module, /)
--

Docstringr�r�rerr�r�r	s  r�test_no_parametersz#ClinicParserTest.test_no_parametersss_���&�&�(����	
���;�X�=O�P�P�P�����C�� 3�4�4�5�5�5�5�5rc��|�ddd���}|�d|j��|�dt|j����dS)NzL
module foo
class foo.Bar "unused" "notneeded"
foo.Bar.__init__

Docstring

r�r`)�signatures_in_block�function_indexzBar()
--

DocstringrrIr	s  r�test_init_with_no_parametersz-ClinicParserTest.test_init_with_no_parameters~sk���&�&�(��1�'�.�.��	
���1�8�3E�F�F�F�����C�� 3�4�4�5�5�5�5�5rc�0�|�d��dS)Nz!
module foo
foo.bar => int
    /
r<r&s r�test_illegal_module_linez)ClinicParserTest.test_illegal_module_line��)���'�'�)�	�	�	�	�	rc�0�|�d��dS)Nz!
module foo
foo.bar as 935
    /
r<r&s r�test_illegal_c_basenamez(ClinicParserTest.test_illegal_c_basename�rQrc�0�|�d��dS)Nz 
module foo
foo.bar
    *
    *
r<r&s r�test_single_starz!ClinicParserTest.test_single_star��)���'�'�)�	�	�	�	�	rc�0�|�d��dS)Nz
module foo
foo.bar
    *
r<r&s r�Ktest_parameters_required_after_star_without_initial_parameters_or_docstringz\ClinicParserTest.test_parameters_required_after_star_without_initial_parameters_or_docstring�rQrc�0�|�d��dS)Nz*
module foo
foo.bar
    *
Docstring here.
r<r&s r�Mtest_parameters_required_after_star_without_initial_parameters_with_docstringz^ClinicParserTest.test_parameters_required_after_star_without_initial_parameters_with_docstring�rVrc�0�|�d��dS)Nz(
module foo
foo.bar
    this: int
    *
r<r&s r�Mtest_parameters_required_after_star_with_initial_parameters_without_docstringz^ClinicParserTest.test_parameters_required_after_star_with_initial_parameters_without_docstring�rVrc�0�|�d��dS)Nz3
module foo
foo.bar
    this: int
    *
Docstring.
r<r&s r�Itest_parameters_required_after_star_with_initial_parameters_and_docstringzZClinicParserTest.test_parameters_required_after_star_with_initial_parameters_and_docstring�s)���'�'�)�	�	�	�	�	rc�0�|�d��dS)Nz 
module foo
foo.bar
    /
    /
r<r&s r�test_single_slashz"ClinicParserTest.test_single_slash�rVrc�0�|�d��dS)Nz<
module foo
foo.bar
   x: int
   y: int
   *
   z: int
   /
r<r&s r�test_mix_star_and_slashz(ClinicParserTest.test_mix_star_and_slash�s)���'�'�)�	�	�	�	�	rc�0�|�d��dS)Nz%
module foo
foo.bar
    /
    x: int
r<r&s r�1test_parameters_not_permitted_after_slash_for_nowzBClinicParserTest.test_parameters_not_permitted_after_slash_for_now�rVrc�\�|�d��}|�|d��dS)Nz<
module foo
foo.bar
   *vararg1: object
   *vararg2: object
z#Error on line 0:
Too many var args
r�r�s  r�'test_parameters_no_more_than_one_varargz8ClinicParserTest.test_parameters_no_more_than_one_vararg�s;���+�+�-�
�
��	
����C�D�D�D�D�Drc��|�d��}|�d���|j��dS)Nzk
  module foo
  foo.bar
    x: int
      Nested docstring here, goeth.
    *
    y: str
  Not at column 0!
zV
bar($module, /, x, *, y)
--

Not at column 0!

  x
    Nested docstring here, goeth.
rr	s  r�test_function_not_at_column_0z.ClinicParserTest.test_function_not_at_column_0�sU���&�&�(����	
����
�E�G�G�X�
�	!�	!�	!�	!�	!rc����t��}t|���d�_�fd��jd<t	jd��}��|��|��j��dS)NFc�&��t�dd��S)N�flagT)�setattr)r�s�r�<lambda>z1ClinicParserTest.test_directive.<locals>.<lambda>�s�������0M�0M�r�setflag)r/r	rk�
directivesrr�ra�
assertTrue)rrfr2r�s   @r�test_directivezClinicParserTest.test_directive�so����L�L���1�������'M�'M�'M�'M���)�$���Y�'�'�����U���������$�$�$�$�$rc��|�d��}|j\}}|�|jdjt
j��dS)Nz module os
os.access
   path: "s"r�)rar�r�r�r�rr�r�s    r�test_legacy_convertersz'ClinicParserTest.test_legacy_converterssK���
�
�?�@�@�� �+�������x�2�6�:�E�v�G[�\�\�\�\�\rc��t��}t|��}tj|��}|�|��|Sr
)r/r	rr�ra)r�textrfr�r2s     rrazClinicParserTest.parses<���L�L���1������T�"�"�����U�����rr`rc��|�|��}|j}|�t|��|��||Sr
)rar�rer�)rrurLrMr2r�s      rr�zClinicParserTest.parse_functionsE���
�
�4� � ���������Q���!4�5�5�5��� � rc���|�ttj��d��|�ttj��d��tj��5}|�t��5tj	ddd���ddd��n#1swxYwYddd��n#1swxYwY|�|�
��d��dS)Nz
<Unspecified>z<Null>zThe igloos are melting!z	clown.txt�E)r-�line_numberz>Error in file "clown.txt" on line 69:
The igloos are melting!
)rerOr�unspecified�NULLrr6r�r7�failr�)rr8s  r�test_scaffoldingz!ClinicParserTest.test_scaffoldingsr������f�0�1�1�?�C�C�C�����f�k�*�*�H�5�5�5��
$�
&�
&�	]�&��"�"�:�.�.�
]�
]���5��Y[�\�\�\�\�
]�
]�
]�
]�
]�
]�
]�
]�
]�
]�
]����
]�
]�
]�
]�	]�	]�	]�	]�	]�	]�	]�	]�	]�	]�	]����	]�	]�	]�	]�	
������*�*�,n�o�o�o�o�os6�.C�	B-�!C�-B1	�1C�4B1	�5C�C�CN)r`r)/rrrr�r�r�r�r�r�r�rrr
rrrrrr r'r4r�r:r=r@rBrDrGrJrNrPrSrUrXrZr\r^r`rbrdrfrhrqrsrar�r}rrrr�r�s�������,�,�,�,�,�,�A�A�A�*�*�*�
*�*�*�
a�a�a�e�e�e�	�	�	�:�:�:�
!�!�!�&!�!�!�0i�i�i�<�<�<�V�V�V�%�%�%�%�%�%�
&�&�&�PJ�J�J�X!�!�!�q�q�q� ���������
�
�
�
�
�
�	6�	6�	6�6�6�6�������������������������	�	�	����E�E�E�!�!�!�(%�%�%�]�]�]�
���!�!�!�!�	p�	p�	p�	p�	prr�c��eZdZdZd�ZdS)�ClinicExternalTestNc��tjd��}t|dd���5}|���}ddd��n#1swxYwYt	j��5}tj�|d��}t|dd���5}|�	|��ddd��n#1swxYwYt
j
|��j}tj
|��t|dd���5}|���}ddd��n#1swxYwYt
j
|��j}ddd��n#1swxYwY|�||��|�||��dS)Nzclinic.testrqzutf-8)�encodingz
clinic.test.c�w)r�findfile�open�readr�temp_dirr�r��join�write�stat�st_mtime_nsr�
parse_filere)	r�sourcer��
orig_contents�tmp_dir�testfile�old_mtime_ns�new_contents�new_mtime_nss	         r�
test_externalz ClinicExternalTest.test_external&sX���!�-�0�0��
�&�#��
0�
0�
0�	%�A��F�F�H�H�M�	%�	%�	%�	%�	%�	%�	%�	%�	%�	%�	%����	%�	%�	%�	%��
�
!�
!�
	9�W��w�|�|�G�_�=�=�H��h��g�6�6�6�
'�!����
�&�&�&�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'�
'����
'�
'�
'�
'��7�8�,�,�8�L���h�'�'�'��h��g�6�6�6�
(�!� �v�v�x�x��
(�
(�
(�
(�
(�
(�
(�
(�
(�
(�
(����
(�
(�
(�
(��7�8�,�,�8�L�
	9�
	9�
	9�
	9�
	9�
	9�
	9�
	9�
	9�
	9�
	9����
	9�
	9�
	9�
	9�	
����}�5�5�5�	
����|�4�4�4�4�4sl�A�A�A�&3E�B;�/E�;B?	�?E�B?	�AE�D&�E�&D*	�*E�-D*	�.E�E�E)rrr�maxDiffr�rrrrr#s(�������G�5�5�5�5�5rr�_testclinicc��eZdZe���d�ee��D����d�Zd�Zd�Z	d�Z
d�Zd�Zd�Z
d	�Zd
�Zd�Zd�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z!d�Z"d�Z#d�Z$d �Z%d!�Z&d"�Z'd#�Z(d$�Z)d%�Z*d&�Z+d'�Z,d(�Z-d)�Z.d*�Z/d+�Z0d,�Z1d-�Z2d.�Z3d/�Z4d0�Z5d1�Z6d2�Z7d3S)4�ClinicFunctionalTestc#�nK�|]0}|�d���|tt|��fV��1dS)�test_N)�
startswith�getattr�	ac_tester)�.0rs  r�	<genexpr>zClinicFunctionalTest.<genexpr>Ds^����L�L��$�/�/�'�2J�2J�L�T�7�9�d�3�3�4�L�L�L�L�L�Lrc��|�t��5t���ddd��n#1swxYwY|�t�dd��d��|�t�gd��gdf��|�t�d��d��dS)Nrr`�rr`zwhatever class)rN)r��	TypeErrorr��objects_converterrer&s r�test_objects_converterz+ClinicFunctionalTest.test_objects_converterGs���
�
�
�y�
)�
)�	*�	*��'�'�)�)�)�	*�	*�	*�	*�	*�	*�	*�	*�	*�	*�	*����	*�	*�	*�	*�����4�4�Q��:�:�F�C�C�C�����4�4�R�9I�J�J�R�Qa�Lb�c�c�c�����4�4�Q�7�7��C�C�C�C�C��A�A�Ac��|�t��5t�d��ddd��n#1swxYwY|�t�d��d��dS)Nr�BytesObject)r�)r�r�r��bytes_object_converterrer&s r�test_bytes_object_converterz0ClinicFunctionalTest.test_bytes_object_converterNs���
�
�
�y�
)�
)�	0�	0��,�,�Q�/�/�/�	0�	0�	0�	0�	0�	0�	0�	0�	0�	0�	0����	0�	0�	0�	0�����9�9�.�I�I�K\�]�]�]�]�]��A�A�	Ac��|�t��5t�d��ddd��n#1swxYwYt	d��}|�t�|��|f��dS)NrsByteArrayObject)r�r�r��byte_array_object_converter�	bytearrayre)r�byte_arrs  r� test_byte_array_object_converterz5ClinicFunctionalTest.test_byte_array_object_converterSs���
�
�
�y�
)�
)�	5�	5��1�1�!�4�4�4�	5�	5�	5�	5�	5�	5�	5�	5�	5�	5�	5����	5�	5�	5�	5��/�0�0������>�>�x�H�H�8�+�V�V�V�V�Vr�c��|�t��5t�d��ddd��n#1swxYwY|�t�d��d��dS)Nr�unicode)r�)r�r�r��unicode_converterrer&s r�test_unicode_converterz+ClinicFunctionalTest.test_unicode_converterYs���
�
�
�y�
)�
)�	+�	+��'�'��*�*�*�	+�	+�	+�	+�	+�	+�	+�	+�	+�	+�	+����	+�	+�	+�	+�����4�4�Y�?�?��N�N�N�N�Nr�c��|�t��5t�ddd��ddd��n#1swxYwY|�t���d��|�t�dgd��d��|�t�ddd	id
��d��dS)NFz	not a int)TTTr1�)FFT)z	not emptyrr`r)TTF)r�r�r��bool_converterrer&s r�test_bool_converterz(ClinicFunctionalTest.test_bool_converter^s��
�
�
�y�
)�
)�	@�	@��$�$�U�E�;�?�?�?�	@�	@�	@�	@�	@�	@�	@�	@�	@�	@�	@����	@�	@�	@�	@�����1�1�3�3�5G�H�H�H�����1�1�"�b�!�<�<�>R�S�S�S�����1�1�.�1�a�&�!�L�L�Na�b�b�b�b�bs�A�A�Ac�H�|�t��5t�d��ddd��n#1swxYwY|�t��5t�d��ddd��n#1swxYwYgd�}t	d�|D����}|�t���|��gd�}t	d�|D����}|�tj|�|��dS)Nrsab)�A���	�
���
�"�'�?�\���c3�4K�|]}t|��V��dSr
��ord�r�rfs  rr�z;ClinicFunctionalTest.test_char_converter.<locals>.<genexpr>k�(����/�/�A��Q���/�/�/�/�/�/r)�1�2�3�4�5�6�7�8�9�0�a�b�c�dc3�4K�|]}t|��V��dSr
r�r�s  rr�z;ClinicFunctionalTest.test_char_converter.<locals>.<genexpr>nr�r)r�r�r��char_converter�tuplere)r�chars�expecteds   r�test_char_converterz(ClinicFunctionalTest.test_char_converteres���
�
�
�y�
)�
)�	(�	(��$�$�Q�'�'�'�	(�	(�	(�	(�	(�	(�	(�	(�	(�	(�	(����	(�	(�	(�	(�
�
�
�y�
)�
)�	,�	,��$�$�U�+�+�+�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,����	,�	,�	,�	,�r�r�r���/�/��/�/�/�/�/������1�1�3�3�X�>�>�>�d�d�d���/�/��/�/�/�/�/������1�5�9�8�D�D�D�D�D�#�A�A�	A�'B�B�Bc��ddlm}|�t��5t�d��ddd��n#1swxYwY|�t��5t�|dz��ddd��n#1swxYwY|�t��5t�d|dz��ddd��n#1swxYwY|�t��5t�g��ddd��n#1swxYwY|�t���d��|�t�dd|dz��d��|�t�dd|dzdzdz��d	��dS)
Nr)�	UCHAR_MAXr"r���"�8�rrrr��{�rrr�)�	_testcapir�r��
OverflowErrorr��unsigned_char_converterr�re)rr�s  r�test_unsigned_char_converterz1ClinicFunctionalTest.test_unsigned_char_converterqs���'�'�'�'�'�'�
�
�
�}�
-�
-�	2�	2��-�-�b�1�1�1�	2�	2�	2�	2�	2�	2�	2�	2�	2�	2�	2����	2�	2�	2�	2�
�
�
�}�
-�
-�	=�	=��-�-�i�!�m�<�<�<�	=�	=�	=�	=�	=�	=�	=�	=�	=�	=�	=����	=�	=�	=�	=�
�
�
�}�
-�
-�	@�	@��-�-�a��Q��?�?�?�	@�	@�	@�	@�	@�	@�	@�	@�	@�	@�	@����	@�	@�	@�	@�
�
�
�y�
)�
)�	2�	2��-�-�b�1�1�1�	2�	2�	2�	2�	2�	2�	2�	2�	2�	2�	2����	2�	2�	2�	2�����:�:�<�<�l�K�K�K�����:�:�1�a��Q��O�O�QZ�[�[�[�����:�:�1�a�)�a�-�ST�AT�WZ�AZ�[�[�]h�i�i�i�i�i�G�A�A�A�-B�B�B�<C'�'C+�.C+�D3�3D7�:D7c��ddlm}m}|�t��5t
�|dz
��ddd��n#1swxYwY|�t��5t
�|dz��ddd��n#1swxYwY|�t��5t
�g��ddd��n#1swxYwY|�t
�d��d��|�t
�d��d��dS)Nr)�SHRT_MIN�SHRT_MAXr�.����r���)r�)	r�r�r�r�r�r��short_converterr�re)rr�r�s   r�test_short_converterz)ClinicFunctionalTest.test_short_converters���0�0�0�0�0�0�0�0�
�
�
�}�
-�
-�	4�	4��%�%�h��l�3�3�3�	4�	4�	4�	4�	4�	4�	4�	4�	4�	4�	4����	4�	4�	4�	4�
�
�
�}�
-�
-�	4�	4��%�%�h��l�3�3�3�	4�	4�	4�	4�	4�	4�	4�	4�	4�	4�	4����	4�	4�	4�	4�
�
�
�y�
)�
)�	*�	*��%�%�b�)�)�)�	*�	*�	*�	*�	*�	*�	*�	*�	*�	*�	*����	*�	*�	*�	*�����2�2�5�9�9�8�D�D�D�����2�2�4�8�8�'�B�B�B�B�B�5�A
�
A�A�2B�B �#B �C(�(C,�/C,c��ddlm}|�t��5t�d��ddd��n#1swxYwY|�t��5t�|dz��ddd��n#1swxYwY|�t��5t�d|dz��ddd��n#1swxYwY|�t��5t�g��ddd��n#1swxYwY|�t���d��|�t�dd|dz��d��|�t�dd|dzdzdz��d	��dS)
Nr)�	USHRT_MAXr"rr�r�r�r�r�)	r�r�r��
ValueErrorr��unsigned_short_converterr�r�re)rr�s  r�test_unsigned_short_converterz2ClinicFunctionalTest.test_unsigned_short_converter�s���'�'�'�'�'�'�
�
�
�z�
*�
*�	3�	3��.�.�r�2�2�2�	3�	3�	3�	3�	3�	3�	3�	3�	3�	3�	3����	3�	3�	3�	3�
�
�
�}�
-�
-�	>�	>��.�.�y�1�}�=�=�=�	>�	>�	>�	>�	>�	>�	>�	>�	>�	>�	>����	>�	>�	>�	>�
�
�
�}�
-�
-�	A�	A��.�.�q�)�a�-�@�@�@�	A�	A�	A�	A�	A�	A�	A�	A�	A�	A�	A����	A�	A�	A�	A�
�
�
�y�
)�
)�	3�	3��.�.�r�2�2�2�	3�	3�	3�	3�	3�	3�	3�	3�	3�	3�	3����	3�	3�	3�	3�����;�;�=�=�|�L�L�L�����;�;�A�q�)�a�-�P�P�R[�\�\�\�����;�;�A�q�9�q�=�TU�BU�X[�B[�\�\�^i�j�j�j�j�jr�c�`�ddlm}m}|�t��5t
�|dz
��ddd��n#1swxYwY|�t��5t
�|dz��ddd��n#1swxYwY|�t��5t
�ddd��ddd��n#1swxYwY|�t��5t
�g��ddd��n#1swxYwY|�t
���d��|�t
�ddd��ddtd��f��dS)Nr)�INT_MIN�INT_MAXrr`r�)r�r��-�3)
r�r�r�r�r�r�r�r�rer�)rr�r�s   r�test_int_converterz'ClinicFunctionalTest.test_int_converter�sw��.�.�.�.�.�.�.�.�
�
�
�}�
-�
-�	1�	1��#�#�G�a�K�0�0�0�	1�	1�	1�	1�	1�	1�	1�	1�	1�	1�	1����	1�	1�	1�	1�
�
�
�}�
-�
-�	1�	1��#�#�G�a�K�0�0�0�	1�	1�	1�	1�	1�	1�	1�	1�	1�	1�	1����	1�	1�	1�	1�
�
�
�y�
)�
)�	-�	-��#�#�A�q�!�,�,�,�	-�	-�	-�	-�	-�	-�	-�	-�	-�	-�	-����	-�	-�	-�	-�
�
�
�y�
)�
)�	(�	(��#�#�B�'�'�'�	(�	(�	(�	(�	(�	(�	(�	(�	(�	(�	(����	(�	(�	(�	(�����0�0�2�2�L�A�A�A�����0�0��A�s�;�;�a��C��H�H�=M�N�N�N�N�NsG�A
�
A�A�2B�B �#B �C*�*C.�1C.�D6�6D:�=D:c��ddlm}|�t��5t�d��ddd��n#1swxYwY|�t��5t�|dz��ddd��n#1swxYwY|�t��5t�d|dz��ddd��n#1swxYwY|�t��5t�g��ddd��n#1swxYwY|�t���d��|�t�dd|dz��d��|�t�dd|dzdzdz��d	��dS)
Nr)�UINT_MAXr"rr�r�r�r�r�)	r�rr�r�r��unsigned_int_converterr�r�re)rrs  r�test_unsigned_int_converterz0ClinicFunctionalTest.test_unsigned_int_converter�s���&�&�&�&�&�&�
�
�
�z�
*�
*�	1�	1��,�,�R�0�0�0�	1�	1�	1�	1�	1�	1�	1�	1�	1�	1�	1����	1�	1�	1�	1�
�
�
�}�
-�
-�	;�	;��,�,�X��\�:�:�:�	;�	;�	;�	;�	;�	;�	;�	;�	;�	;�	;����	;�	;�	;�	;�
�
�
�}�
-�
-�	>�	>��,�,�Q��1��=�=�=�	>�	>�	>�	>�	>�	>�	>�	>�	>�	>�	>����	>�	>�	>�	>�
�
�
�y�
)�
)�	1�	1��,�,�R�0�0�0�	1�	1�	1�	1�	1�	1�	1�	1�	1�	1�	1����	1�	1�	1�	1�����9�9�;�;�\�J�J�J�����9�9�!�Q��1��M�M�y�Y�Y�Y�����9�9�!�Q��A��QR�@R�UX�@X�Y�Y�[f�g�g�g�g�gr�c��ddlm}m}|�t��5t
�|dz
��ddd��n#1swxYwY|�t��5t
�|dz��ddd��n#1swxYwY|�t��5t
�g��ddd��n#1swxYwY|�t
���d��|�t
�d��d��dS)Nr)�LONG_MIN�LONG_MAXr�r�r�r�)	r�rrr�r�r��long_converterr�re)rrrs   r�test_long_converterz(ClinicFunctionalTest.test_long_converter�s���0�0�0�0�0�0�0�0�
�
�
�}�
-�
-�	3�	3��$�$�X��\�2�2�2�	3�	3�	3�	3�	3�	3�	3�	3�	3�	3�	3����	3�	3�	3�	3�
�
�
�}�
-�
-�	3�	3��$�$�X��\�2�2�2�	3�	3�	3�	3�	3�	3�	3�	3�	3�	3�	3����	3�	3�	3�	3�
�
�
�y�
)�
)�	)�	)��$�$�R�(�(�(�	)�	)�	)�	)�	)�	)�	)�	)�	)�	)�	)����	)�	)�	)�	)�����1�1�3�3�U�;�;�;�����1�1�%�8�8�(�C�C�C�C�Cr�c��ddlm}|�t��5t�d��ddd��n#1swxYwY|�t��5t�|dz��ddd��n#1swxYwY|�t��5t�d|dz��ddd��n#1swxYwY|�t��5t�g��ddd��n#1swxYwY|�t���d��|�t�dd|dz��d��|�t�dd|dzdzdz��d	��dS)
Nr)�	ULONG_MAXr"rr�r�r�r�r�)	r�r
r�r�r��unsigned_long_converterr�r�re)rr
s  r�test_unsigned_long_converterz1ClinicFunctionalTest.test_unsigned_long_converter�s���'�'�'�'�'�'�
�
�
�z�
*�
*�	2�	2��-�-�b�1�1�1�	2�	2�	2�	2�	2�	2�	2�	2�	2�	2�	2����	2�	2�	2�	2�
�
�
�}�
-�
-�	=�	=��-�-�i�!�m�<�<�<�	=�	=�	=�	=�	=�	=�	=�	=�	=�	=�	=����	=�	=�	=�	=�
�
�
�}�
-�
-�	@�	@��-�-�a��Q��?�?�?�	@�	@�	@�	@�	@�	@�	@�	@�	@�	@�	@����	@�	@�	@�	@�
�
�
�y�
)�
)�	2�	2��-�-�b�1�1�1�	2�	2�	2�	2�	2�	2�	2�	2�	2�	2�	2����	2�	2�	2�	2�����:�:�<�<�l�K�K�K�����:�:�1�a��Q��O�O�QZ�[�[�[�����:�:�1�a�)�a�-�ST�AT�WZ�AZ�[�[�]h�i�i�i�i�ir�c��ddlm}m}|�t��5t
�|dz
��ddd��n#1swxYwY|�t��5t
�|dz��ddd��n#1swxYwY|�t��5t
�g��ddd��n#1swxYwY|�t
���d��|�t
�d��d��dS)Nr)�	LLONG_MIN�	LLONG_MAXrr	r�r�)	r�rrr�r�r��long_long_converterr�re)rrrs   r�test_long_long_converterz-ClinicFunctionalTest.test_long_long_converter�s���2�2�2�2�2�2�2�2�
�
�
�}�
-�
-�	9�	9��)�)�)�a�-�8�8�8�	9�	9�	9�	9�	9�	9�	9�	9�	9�	9�	9����	9�	9�	9�	9�
�
�
�}�
-�
-�	9�	9��)�)�)�a�-�8�8�8�	9�	9�	9�	9�	9�	9�	9�	9�	9�	9�	9����	9�	9�	9�	9�
�
�
�y�
)�
)�	.�	.��)�)�"�-�-�-�	.�	.�	.�	.�	.�	.�	.�	.�	.�	.�	.����	.�	.�	.�	.�����6�6�8�8�%�@�@�@�����6�6�u�=�=�x�H�H�H�H�Hr�c��ddlm}|�t��5t�d��ddd��n#1swxYwY|�t��5t�|dz��ddd��n#1swxYwY|�t��5t�d|dz��ddd��n#1swxYwY|�t��5t�g��ddd��n#1swxYwY|�t���d��|�t�dd|dz��d��|�t�dd|dzdzdz��d	��dS)
Nr)�
ULLONG_MAXr"rr�r�r�r�r�)	r�rr�r�r��unsigned_long_long_converterr�r�re)rrs  r�!test_unsigned_long_long_converterz6ClinicFunctionalTest.test_unsigned_long_long_converter�s���(�(�(�(�(�(�
�
�
�z�
*�
*�	7�	7��2�2�2�6�6�6�	7�	7�	7�	7�	7�	7�	7�	7�	7�	7�	7����	7�	7�	7�	7�
�
�
�}�
-�
-�	C�	C��2�2�:��>�B�B�B�	C�	C�	C�	C�	C�	C�	C�	C�	C�	C�	C����	C�	C�	C�	C�
�
�
�}�
-�
-�	F�	F��2�2�1�j�1�n�E�E�E�	F�	F�	F�	F�	F�	F�	F�	F�	F�	F�	F����	F�	F�	F�	F�
�
�
�y�
)�
)�	7�	7��2�2�2�6�6�6�	7�	7�	7�	7�	7�	7�	7�	7�	7�	7�	7����	7�	7�	7�	7�����?�?�A�A�<�P�P�P�����?�?��1�j�ST�n�U�U�W`�a�a�a�����?�?��1�z�TU�~�YZ�FZ�]`�F`�a�a�cn�o�o�o�o�or�c��ddlm}m}|�t��5t
�|dz
��ddd��n#1swxYwY|�t��5t
�|dz��ddd��n#1swxYwY|�t��5t
�g��ddd��n#1swxYwY|�t
���d��|�t
�ddd��d��dS)Nr��PY_SSIZE_T_MIN�PY_SSIZE_T_MAXrr�r`�rr`r�)	r�rrr�r�r��py_ssize_t_converterr�re�rrrs   r�test_py_ssize_t_converterz.ClinicFunctionalTest.test_py_ssize_t_converter�s���<�<�<�<�<�<�<�<�
�
�
�}�
-�
-�	?�	?��*�*�>�A�+=�>�>�>�	?�	?�	?�	?�	?�	?�	?�	?�	?�	?�	?����	?�	?�	?�	?�
�
�
�}�
-�
-�	?�	?��*�*�>�A�+=�>�>�>�	?�	?�	?�	?�	?�	?�	?�	?�	?�	?�	?����	?�	?�	?�	?�
�
�
�y�
)�
)�	/�	/��*�*�2�.�.�.�	/�	/�	/�	/�	/�	/�	/�	/�	/�	/�	/����	/�	/�	/�	/�����7�7�9�9�<�H�H�H�����7�7��1�d�C�C�Z�P�P�P�P�Pr�c�L�ddlm}m}|�t��5t
�g��ddd��n#1swxYwY|�t
���d��|�t
�ddd��d��|�t
�||dz|dz��|||f��|�t
�||dz
|dz
��|||f��dS)Nrrr�rr`ri�)r�rrr�r�r��slice_index_converterrers   r�test_slice_index_converterz/ClinicFunctionalTest.test_slice_index_converter�sy��<�<�<�<�<�<�<�<�
�
�
�y�
)�
)�	0�	0��+�+�B�/�/�/�	0�	0�	0�	0�	0�	0�	0�	0�	0�	0�	0����	0�	0�	0�	0�����8�8�:�:�L�I�I�I�����8�8��A�t�D�D�j�Q�Q�Q�����8�8���Z[�I[�]k�nr�]r�s�s�(�.�.�I�	K�	K�	K�����8�8���Z[�I[�]k�nr�]r�s�s�(�.�.�I�	K�	K�	K�	K�	Ks�A
�
A�Ac��|�t��5t�d��ddd��n#1swxYwY|�t��5t�g��ddd��n#1swxYwY|�t���d��dS)Nr"r	)r�r�r��size_t_converterr�rer&s r�test_size_t_converterz*ClinicFunctionalTest.test_size_t_converter�s$��
�
�
�z�
*�
*�	+�	+��&�&�r�*�*�*�	+�	+�	+�	+�	+�	+�	+�	+�	+�	+�	+����	+�	+�	+�	+�
�
�
�y�
)�
)�	+�	+��&�&�r�*�*�*�	+�	+�	+�	+�	+�	+�	+�	+�	+�	+�	+����	+�	+�	+�	+�����3�3�5�5�u�=�=�=�=�=r�c�T�|�t��5t�g��ddd��n#1swxYwY|�t���d��|�t�d��d��dS�N)g)@�࿩r))r�r�r��float_converterrer&s r�test_float_converterz)ClinicFunctionalTest.test_float_converters���
�
�
�y�
)�
)�	*�	*��%�%�b�)�)�)�	*�	*�	*�	*�	*�	*�	*�	*�	*�	*�	*����	*�	*�	*�	*�����2�2�4�4�g�>�>�>�����2�2�4�8�8�'�B�B�B�B�Br�c�T�|�t��5t�g��ddd��n#1swxYwY|�t���d��|�t�d��d��dSr()r�r�r��double_converterrer&s r�test_double_converterz*ClinicFunctionalTest.test_double_converters���
�
�
�y�
)�
)�	+�	+��&�&�r�*�*�*�	+�	+�	+�	+�	+�	+�	+�	+�	+�	+�	+����	+�	+�	+�	+�����3�3�5�5�w�?�?�?�����3�3�D�9�9�7�C�C�C�C�Cr�c�~�|�t��5t�g��ddd��n#1swxYwY|�t�tdd����tdd��f��|�t�td����td��f��|�t�d��d��|�t�d��d��dS)Nrr`z-1-2jr)r*�
)r1)r�r�r��py_complex_converterre�complexr&s r�test_py_complex_converterz.ClinicFunctionalTest.test_py_complex_converters>��
�
�
�y�
)�
)�	/�	/��*�*�2�.�.�.�	/�	/�	/�	/�	/�	/�	/�	/�	/�	/�	/����	/�	/�	/�	/�����7�7���1�
�
�F�F��QR�TU���HX�Y�Y�Y�����7�7���8H�8H�I�I�G�T[�L\�L\�K^�_�_�_�����7�7��=�=�w�G�G�G�����7�7��;�;�U�C�C�C�C�Cr�c��|�t��5t�d��ddd��n#1swxYwY|�t��5t�ddd��ddd��n#1swxYwY|�t��5t�ddd��ddd��n#1swxYwY|�t�ddd��d��|�t�ddd��d��|�t�ddd	��d
��dS)Nrr�r�rf�bbr�r�r��cc�r�r�r7)r�r�r�r�r�rer&s r�test_str_converterz'ClinicFunctionalTest.test_str_converters��
�
�
�y�
)�
)�	'�	'��#�#�A�&�&�&�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'����	'�	'�	'�	'�
�
�
�y�
)�
)�	3�	3��#�#�C��c�2�2�2�	3�	3�	3�	3�	3�	3�	3�	3�	3�	3�	3����	3�	3�	3�	3�
�
�
�z�
*�
*�	7�	7��#�#�C��#�6�6�6�	7�	7�	7�	7�	7�	7�	7�	7�	7�	7�	7����	7�	7�	7�	7�����0�0��d�C�@�@�/�R�R�R�����0�0��d�D�A�A�?�S�S�S�����0�0��d�F�C�C�EW�X�X�X�X�Xs5�A�A�	A�'B�B�B�5C�C"�%C"c
�D�|�t��5t�d��ddd��n#1swxYwY|�t�ddd��d��|�t��5t�ddd��ddd��n#1swxYwY|�t�ddtt
d��g����d��|�t�ddtt
d��dt
d��g����d	��|�t�ddd
��d	��dS)Nrr�r�rfr�r6r�rr8scc)r�r�r��str_converter_encodingrer�r�r&s r�test_str_converter_encodingz0ClinicFunctionalTest.test_str_converter_encoding!s���
�
�
�y�
)�
)�	0�	0��,�,�Q�/�/�/�	0�	0�	0�	0�	0�	0�	0�	0�	0�	0�	0����	0�	0�	0�	0�����9�9�#�s�C�H�H�/�Z�Z�Z�
�
�
�y�
)�
)�	@�	@��,�,�S�'�3�?�?�?�	@�	@�	@�	@�	@�	@�	@�	@�	@�	@�	@����	@�	@�	@�	@�����9�9�#�t�Y�PS�TW�PX�PX�z�EZ�EZ�[�[�]l�m�m�m�����9�9�#�t�Y�PS�TW�PX�PX�Z[�]`�ad�]e�]e�Of�Eg�Eg�h�h�-�	/�	/�	/�����9�9�#�t�Y�O�O�Qe�f�f�f�f�fs#�A�A�	A�C�C�Cc	��|�t��5t�dd��ddd��n#1swxYwY|�t�dtgd�����d��dS)Nr�r��abc�rr`r�)sabcs)r�r�r��py_buffer_converterrer�r&s r�test_py_buffer_converterz-ClinicFunctionalTest.test_py_buffer_converter,s���
�
�
�y�
)�
)�	4�	4��)�)�#�s�3�3�3�	4�	4�	4�	4�	4�	4�	4�	4�	4�	4�	4����	4�	4�	4�	4�����6�6�u�i�	�	�	�>R�>R�S�S�Un�o�o�o�o�o��A�A�
Ac�$�|�t�dd��d��|�t�dd���d��|�t�dd���d��dS)Nrr`r��r�r�)rer��keywordsr&s r�
test_keywordsz"ClinicFunctionalTest.test_keywords1s�������+�+�A�q�1�1�6�:�:�:�����+�+�A��+�3�3�V�<�<�<�����+�+�a�1�+�5�5�v�>�>�>�>�>rc�`�|�t��5t�dd��ddd��n#1swxYwY|�t�dd���d��|�t�dd���d��dS)Nrr`rDr�r�)r�r�r��keywords_kwonlyrer&s r�test_keywords_kwonlyz)ClinicFunctionalTest.test_keywords_kwonly6s���
�
�
�y�
)�
)�	,�	,��%�%�a��+�+�+�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,����	,�	,�	,�	,�����2�2�1��2�:�:�F�C�C�C�����2�2�Q�!�2�<�<�f�E�E�E�E�ErBc��|�t�d��d��|�t�dd��d��|�t�ddd��d��|�t�dd���d��|�t�ddd���d��|�t�dd�	��d
��|�t�ddd���d��dS)Nr�rNNr`�rr`Nr�r?rD�rf�r�rf�rNr�r�)rer��keywords_optr&s r�test_keywords_optz&ClinicFunctionalTest.test_keywords_opt<s"������/�/��2�2�O�D�D�D�����/�/��1�5�5�|�D�D�D�����/�/��1�a�8�8�)�D�D�D�����/�/��Q�/�7�7��F�F�F�����/�/��1��/�:�:�I�F�F�F�����/�/�!�q�/�9�9�<�H�H�H�����/�/�!�q�A�/�>�>�	�J�J�J�J�Jrc���|�t�d��d��|�t�dd��d��|�t��5t�ddd��ddd��n#1swxYwY|�t�dd���d��|�t�ddd���d��|�t�dd�	��d
��|�t�dddd���d
��dS)Nr�rNNNr`�rr`NNr�rDrM�rr`r�NrN)rNr�N��r�r�rfrK�rr`r�rV)rer��keywords_opt_kwonlyr�r�r&s r�test_keywords_opt_kwonlyz-ClinicFunctionalTest.test_keywords_opt_kwonlyEs�������6�6�q�9�9�;P�Q�Q�Q�����6�6�q�!�<�<�>P�Q�Q�Q�
�
�
�y�
)�
)�	3�	3��)�)�!�Q��2�2�2�	3�	3�	3�	3�	3�	3�	3�	3�	3�	3�	3����	3�	3�	3�	3�����6�6�q�A�6�>�>�@R�S�S�S�����6�6�q�!�q�6�A�A�?�S�S�S�����6�6��a�6�@�@�BT�U�U�U�����6�6��a�1��6�J�J�L�Y�Y�Y�Y�Ys�8B!�!B%�(B%c��|�t�d��d��|�t��5t�dd��ddd��n#1swxYwY|�t�dd���d��|�t�dd���d��|�t�ddd�	��d
��dS)NrrKr`rDrLr�rNrOr�r?)rer��keywords_kwonly_optr�r�r&s r�test_keywords_kwonly_optz-ClinicFunctionalTest.test_keywords_kwonly_optOs(������6�6�q�9�9�?�K�K�K�
�
�
�y�
)�
)�	0�	0��)�)�!�Q�/�/�/�	0�	0�	0�	0�	0�	0�	0�	0�	0�	0�	0����	0�	0�	0�	0�����6�6�q�A�6�>�>��M�M�M�����6�6��a�6�@�@�,�O�O�O�����6�6��a�1�6�E�E�y�Q�Q�Q�Q�Qs�	A1�1A5�8A5c��|�t��5t�d��ddd��n#1swxYwY|�t��5t�dd���ddd��n#1swxYwY|�t�dd��d��|�t�dd���d��dS)Nrr`r�r�rD)r�r�r��posonly_keywordsrer&s r�test_posonly_keywordsz*ClinicFunctionalTest.test_posonly_keywordsWsV��
�
�
�y�
)�
)�	*�	*��&�&�q�)�)�)�	*�	*�	*�	*�	*�	*�	*�	*�	*�	*�	*����	*�	*�	*�	*�
�
�
�y�
)�
)�	1�	1��&�&��a�&�0�0�0�	1�	1�	1�	1�	1�	1�	1�	1�	1�	1�	1����	1�	1�	1�	1�����3�3�A�q�9�9�6�B�B�B�����3�3�A��3�;�;�V�D�D�D�D�Ds#�A�A�	A�'B�B�Bc�4�|�t��5t�d��ddd��n#1swxYwY|�t��5t�dd��ddd��n#1swxYwY|�t��5t�dd���ddd��n#1swxYwY|�t�dd���d��dS)Nrr`r�rDr�)r�r�r��posonly_kwonlyrer&s r�test_posonly_kwonlyz(ClinicFunctionalTest.test_posonly_kwonly_s���
�
�
�y�
)�
)�	(�	(��$�$�Q�'�'�'�	(�	(�	(�	(�	(�	(�	(�	(�	(�	(�	(����	(�	(�	(�	(�
�
�
�y�
)�
)�	+�	+��$�$�Q��*�*�*�	+�	+�	+�	+�	+�	+�	+�	+�	+�	+�	+����	+�	+�	+�	+�
�
�
�y�
)�
)�	/�	/��$�$�q�A�$�.�.�.�	/�	/�	/�	/�	/�	/�	/�	/�	/�	/�	/����	/�	/�	/�	/�����1�1�!�q�1�9�9�6�B�B�B�B�Bs5�A�A�	A�'B�B�B�4C�C!�$C!c��|�t��5t�d��ddd��n#1swxYwY|�t��5t�ddd��ddd��n#1swxYwY|�t��5t�ddd���ddd��n#1swxYwY|�t�ddd���d��|�t�ddd���d��dS)Nrr`r�r�rMr?�r�rf)r�r�r��posonly_keywords_kwonlyrer&s r�test_posonly_keywords_kwonlyz1ClinicFunctionalTest.test_posonly_keywords_kwonlyhs���
�
�
�y�
)�
)�	1�	1��-�-�a�0�0�0�	1�	1�	1�	1�	1�	1�	1�	1�	1�	1�	1����	1�	1�	1�	1�
�
�
�y�
)�
)�	7�	7��-�-�a��A�6�6�6�	7�	7�	7�	7�	7�	7�	7�	7�	7�	7�	7����	7�	7�	7�	7�
�
�
�y�
)�
)�	=�	=��-�-��Q�!�-�<�<�<�	=�	=�	=�	=�	=�	=�	=�	=�	=�	=�	=����	=�	=�	=�	=�����:�:�1�a�1�:�E�E�y�Q�Q�Q�����:�:�1��Q�:�G�G��S�S�S�S�Ss5�A�A�	A�'B�B�B�5C�C#�&C#c��|�t��5t�d��ddd��n#1swxYwY|�t�dd��d��|�t�ddd��d��|�t�dddd��d��|�t�dd���d��|�t�ddd�	��d��|�t��5t�dddd�
��ddd��n#1swxYwY|�t�dddd���d��dS)Nrr`rTr�rUrVrXrDrMrW�r�rfrK)r�r�r��posonly_keywords_optrer&s r�test_posonly_keywords_optz.ClinicFunctionalTest.test_posonly_keywords_optrs��
�
�
�y�
)�
)�	.�	.��*�*�1�-�-�-�	.�	.�	.�	.�	.�	.�	.�	.�	.�	.�	.����	.�	.�	.�	.�����7�7��1�=�=�?Q�R�R�R�����7�7��1�a�@�@�/�R�R�R�����7�7��1�a��C�C�\�R�R�R�����7�7��Q�7�?�?�AS�T�T�T�����7�7��1��7�B�B�O�T�T�T�
�
�
�y�
)�
)�	?�	?��*�*�Q�!�q�A�*�>�>�>�	?�	?�	?�	?�	?�	?�	?�	?�	?�	?�	?����	?�	?�	?�	?�����7�7��Q�!�q�7�I�I�<�X�X�X�X�Xs#�A�A�	A�F�F�
Fc��|�t�d��d��|�t�dd��d��|�t�ddd��d��|�t�dddd��d��|�t��5t�dd�	��ddd��n#1swxYwY|�t�ddd�
��d��|�t�dddd���d��|�t��5t�dddd���ddd��dS#1swxYwYdS)
NrrSr`rTr�rUrVrXrDrM�rfrKrW)rer��posonly_opt_keywords_optr�r�r&s r�test_posonly_opt_keywords_optz2ClinicFunctionalTest.test_posonly_opt_keywords_opt~s#������;�;�A�>�>�@U�V�V�V�����;�;�A�q�A�A�CU�V�V�V�����;�;�A�q�!�D�D�o�V�V�V�����;�;�A�q�!�Q�G�G��V�V�V�
�
�
�y�
)�
)�	7�	7��.�.�q�A�.�6�6�6�	7�	7�	7�	7�	7�	7�	7�	7�	7�	7�	7����	7�	7�	7�	7�����;�;�A�q�A�;�F�F��X�X�X�����;�;�A�q�A��;�K�K�\�Z�Z�Z�
�
�
�y�
)�
)�	C�	C��.�.��a�1��.�B�B�B�	C�	C�	C�	C�	C�	C�	C�	C�	C�	C�	C�	C����	C�	C�	C�	C�	C�	Cs$�D�D�	D�
F6�6F:�=F:c��|�t��5t�d��ddd��n#1swxYwY|�t��5t�dd��ddd��n#1swxYwY|�t�dd���d��|�t�ddd���d��|�t�dddd�	��d
��|�t��5t�dddd���ddd��dS#1swxYwYdS)Nrr`rDrTr�rerUrVrirXrW)r�r�r��posonly_kwonly_optrer&s r�test_posonly_kwonly_optz,ClinicFunctionalTest.test_posonly_kwonly_opt�s��
�
�
�y�
)�
)�	,�	,��(�(��+�+�+�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,����	,�	,�	,�	,�
�
�
�y�
)�
)�	/�	/��(�(��A�.�.�.�	/�	/�	/�	/�	/�	/�	/�	/�	/�	/�	/����	/�	/�	/�	/�����5�5�a�1�5�=�=�?Q�R�R�R�����5�5�a�1��5�B�B�O�T�T�T�����5�5�a�1��Q�5�G�G��V�V�V�
�
�
�y�
)�
)�	=�	=��(�(�1��Q�!�(�<�<�<�	=�	=�	=�	=�	=�	=�	=�	=�	=�	=�	=�	=����	=�	=�	=�	=�	=�	=s5�A�A�	A�'B�B�B�E3�3E7�:E7c��|�t�d��d��|�t�dd��d��|�t��5t�ddd��ddd��n#1swxYwY|�t��5t�dd���ddd��n#1swxYwY|�t�ddd���d��|�t�dddd	�
��d��dS)NrrSr`rTr�rDrMrUrVrmrX)rer��posonly_opt_kwonly_optr�r�r&s r�test_posonly_opt_kwonly_optz0ClinicFunctionalTest.test_posonly_opt_kwonly_opt�s�������9�9�!�<�<�>S�T�T�T�����9�9�!�Q�?�?�AS�T�T�T�
�
�
�y�
)�
)�	6�	6��,�,�Q��1�5�5�5�	6�	6�	6�	6�	6�	6�	6�	6�	6�	6�	6����	6�	6�	6�	6�
�
�
�y�
)�
)�	5�	5��,�,�Q�!�,�4�4�4�	5�	5�	5�	5�	5�	5�	5�	5�	5�	5�	5����	5�	5�	5�	5�����9�9�!�Q�!�9�D�D�o�V�V�V�����9�9�!�Q�!�q�9�I�I�<�X�X�X�X�Xs$�8B!�!B%�(B%�C/�/C3�6C3c	��|�t��5t�d��ddd��n#1swxYwY|�t��5t�dd��ddd��n#1swxYwY|�t��5t�dd���ddd��n#1swxYwY|�t��5t�ddd��ddd��n#1swxYwY|�t��5t�ddd���ddd��n#1swxYwY|�t�ddd���d��|�t�ddd���d��|�t�dddd	�
��d��|�t�dddd	d�
��d��dS)Nrr`rDr�r�rM�rr`r�NNrerVrm�rr`r�rVNr��rfrK�e�rr`r�rVr�)r�r�r��posonly_keywords_kwonly_optrer&s r� test_posonly_keywords_kwonly_optz5ClinicFunctionalTest.test_posonly_keywords_kwonly_opt�sS��
�
�
�y�
)�
)�	5�	5��1�1�!�4�4�4�	5�	5�	5�	5�	5�	5�	5�	5�	5�	5�	5����	5�	5�	5�	5�
�
�
�y�
)�
)�	8�	8��1�1�!�Q�7�7�7�	8�	8�	8�	8�	8�	8�	8�	8�	8�	8�	8����	8�	8�	8�	8�
�
�
�y�
)�
)�	:�	:��1�1�!�q�1�9�9�9�	:�	:�	:�	:�	:�	:�	:�	:�	:�	:�	:����	:�	:�	:�	:�
�
�
�y�
)�
)�	;�	;��1�1�!�Q��:�:�:�	;�	;�	;�	;�	;�	;�	;�	;�	;�	;�	;����	;�	;�	;�	;�
�
�
�y�
)�
)�	A�	A��1�1�A��a�1�@�@�@�	A�	A�	A�	A�	A�	A�	A�	A�	A�	A�	A����	A�	A�	A�	A�����>�>�q�!�q�>�I�I�K`�a�a�a�����>�>�q�A��>�K�K�Mb�c�c�c�����>�>�q�!�q�A�>�N�N�Pb�c�c�c�����>�>�q�!�q�A�QR�>�S�S�Ud�e�e�e�e�esY�A�A�	A�'B�B�B�4C�C!�$C!�D+�+D/�2D/�E:�:E>�E>c	���|�t��5t�d��ddd��n#1swxYwY|�t�dd��d��|�t�dd���d��|�t��5t�dddd��ddd��n#1swxYwY|�t��5t�dd���ddd��n#1swxYwY|�t�ddd���d	��|�t�ddd�
��d	��|�t�dddd���d��|�t�dddd�
��d��|�t�ddddd���d��|�t�ddddd���d��dS)Nrr`)rr`NNNrDr�rVr�rMrwre�rKrxrmr�)rKrzr{ry)r�r�r��posonly_keywords_opt_kwonly_optrer&s r�$test_posonly_keywords_opt_kwonly_optz9ClinicFunctionalTest.test_posonly_keywords_opt_kwonly_opt�s��
�
�
�y�
)�
)�	9�	9��5�5�a�8�8�8�	9�	9�	9�	9�	9�	9�	9�	9�	9�	9�	9����	9�	9�	9�	9�����B�B�1�a�H�H�Jb�c�c�c�����B�B�1��B�J�J�Ld�e�e�e�
�
�
�y�
)�
)�	B�	B��5�5�a��A�q�A�A�A�	B�	B�	B�	B�	B�	B�	B�	B�	B�	B�	B����	B�	B�	B�	B�
�
�
�y�
)�
)�	@�	@��5�5��Q�5�?�?�?�	@�	@�	@�	@�	@�	@�	@�	@�	@�	@�	@����	@�	@�	@�	@�����B�B�1�a�1�B�M�M�Od�e�e�e�����B�B�1��Q�B�O�O�Qf�g�g�g�����B�B�1�a��a�B�P�P�Rd�e�e�e�����B�B�1�a�1�PQ�B�R�R�Tf�g�g�g�����B�B�1�a��a�ST�B�U�U�Wf�g�g�g�����B�B�1�a�1�PQ�UV�B�W�W�Yh�i�i�i�i�is5�A�A�	A�C0�0C4�7C4�D>�>E�Ec��|�t�d��d��|�t�dd��d��|�t��5t�dd���ddd��n#1swxYwY|�t�ddd��d��|�t�ddd���d��|�t�dddd	�
��d��|�t�dddd	���d��|�t��5t�dddd	��ddd��dS#1swxYwYdS)
NrrSr`rTrDr�rUrMrVrrXrm)rer��#posonly_opt_keywords_opt_kwonly_optr�r�r&s r�(test_posonly_opt_keywords_opt_kwonly_optz=ClinicFunctionalTest.test_posonly_opt_keywords_opt_kwonly_opt�s:������F�F�q�I�I�K`�a�a�a�����F�F�q�!�L�L�N`�a�a�a�
�
�
�y�
)�
)�	B�	B��9�9�!�q�9�A�A�A�	B�	B�	B�	B�	B�	B�	B�	B�	B�	B�	B����	B�	B�	B�	B�����F�F�q�!�Q�O�O�Q`�a�a�a�����F�F�q�!�q�F�Q�Q�Sb�c�c�c�����F�F�q�!�Q�RS�F�T�T�Vb�c�c�c�����F�F�q�!�q�TU�F�V�V�Xd�e�e�e�
�
�
�y�
)�
)�	F�	F��9�9�!�Q��1�E�E�E�	F�	F�	F�	F�	F�	F�	F�	F�	F�	F�	F�	F����	F�	F�	F�	F�	F�	Fs$�8B!�!B%�(B%�F6�6F:�=F:c��|�t��5t���ddd��n#1swxYwY|�t��5t�d��ddd��n#1swxYwY|�t�d���d��dS)Nrr��r)r�r�r��keyword_only_parameterrer&s r�test_keyword_only_parameterz0ClinicFunctionalTest.test_keyword_only_parameter�s'��
�
�
�y�
)�
)�	/�	/��,�,�.�.�.�	/�	/�	/�	/�	/�	/�	/�	/�	/�	/�	/����	/�	/�	/�	/�
�
�
�y�
)�
)�	0�	0��,�,�Q�/�/�/�	0�	0�	0�	0�	0�	0�	0�	0�	0�	0�	0����	0�	0�	0�	0�����9�9�A�9�>�>��E�E�E�E�Es#�A�A�A�&B
�
B�Bc��|�t��5t���ddd��n#1swxYwY|�t�dd��d��|�t�dd���d��|�t�dddd��d��dS)Nrr`)rr`rrDr�rV)rr`)r�rV)r�r�r��posonly_varargrer&s r�test_posonly_varargz(ClinicFunctionalTest.test_posonly_vararg�s���
�
�
�y�
)�
)�	'�	'��$�$�&�&�&�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'�	'����	'�	'�	'�	'�����1�1�!�Q�7�7��D�D�D�����1�1�!�q�1�9�9�:�F�F�F�����1�1�!�Q��1�=�=�~�N�N�N�N�Nr�c��|�t��5t���ddd��n#1swxYwY|�t��5t�dd���ddd��n#1swxYwY|�t�dddd��d��dS�Nrr`rDr�rV)r�r`r�rV)r�r�r��vararg_and_posonlyrer&s r�test_vararg_and_posonlyz,ClinicFunctionalTest.test_vararg_and_posonly�s/��
�
�
�y�
)�
)�	+�	+��(�(�*�*�*�	+�	+�	+�	+�	+�	+�	+�	+�	+�	+�	+����	+�	+�	+�	+�
�
�
�y�
)�
)�	1�	1��(�(��a�(�0�0�0�	1�	1�	1�	1�	1�	1�	1�	1�	1�	1�	1����	1�	1�	1�	1�����5�5�a��A�q�A�A�>�R�R�R�R�R�#�A�A�A�&B�B�Bc��|�t��5t���ddd��n#1swxYwY|�t��5t�dd���ddd��n#1swxYwY|�t�dddd��d��dSr�)r�r�r��varargrer&s r�test_varargz ClinicFunctionalTest.test_vararg�s/��
�
�
�y�
)�
)�	�	�������	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�
�
�
�y�
)�
)�	%�	%����Q�!��$�$�$�	%�	%�	%�	%�	%�	%�	%�	%�	%�	%�	%����	%�	%�	%�	%�����)�)�!�Q��1�5�5�~�F�F�F�F�Fr�c	���|�t��5t���ddd��n#1swxYwY|�t�dd���d��|�t�dddd��d��|�t�ddddd	���d
��dS)NrFrD)rrFr`r�rV)rr�FT)rr�T)r�r�r��vararg_with_defaultrer&s r�test_vararg_with_defaultz-ClinicFunctionalTest.test_vararg_with_default�s��
�
�
�y�
)�
)�	,�	,��)�)�+�+�+�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,�	,����	,�	,�	,�	,�����6�6�q�E�6�B�B�N�S�S�S�����6�6�q�!�Q��B�B�DY�Z�Z�Z�����6�6�q�!�Q��T�6�J�J�L`�a�a�a�a�ar�c	���|�t���d��|�t�d���d��|�t�dd���d��|�t�dddd��d	��|�t�ddddd
���d��dS)N)rNr`rD)rr`r)r�r`r�rV)rXNr�)rXr�)rer��vararg_with_only_defaultsr&s r�test_vararg_with_only_defaultsz3ClinicFunctionalTest.test_vararg_with_only_defaults�s�������<�<�>�>�
�K�K�K�����<�<�q�<�A�A�7�K�K�K�����<�<�Q�!�<�D�D�j�Q�Q�Q�����<�<�Q��1�a�H�H�J^�_�_�_�����<�<�Q��1�a�1�<�M�M�O`�a�a�a�a�arc�F�t�dddddd���dS)Nrr`r�rVr��)�kw1�kw2)r��gh_32092_oobr&s r�test_gh_32092_oobz&ClinicFunctionalTest.test_gh_32092_oob�s)�����q�!�Q��q�a��8�8�8�8�8rc�>�t�ddd��dS)Nrr`r�)r��gh_32092_kw_passr&s r�test_gh_32092_kw_passz*ClinicFunctionalTest.test_gh_32092_kw_pass�s ���"�"�1�a��+�+�+�+�+rc��d}tj|��}t�|��tj|��}|�||��dS)Nz5*A unique string is not referenced by anywhere else.*)rM�getrefcountr��gh_99233_refcountre)r�arg�arg_refcount_origin�arg_refcount_afters    r�test_gh_99233_refcountz+ClinicFunctionalTest.test_gh_99233_refcount�sY��E��!�o�c�2�2���#�#�C�(�(�(� �_�S�1�1�����,�.@�A�A�A�A�Arc��d}|�t|��5t�dd��ddd��dS#1swxYwYdS)NzVgh_99240_double_free\(\) argument 2 must be encoded string without null bytes, not strr�zb)�assertRaisesRegexr�r��gh_99240_double_free)r�expected_errors  r�test_gh_99240_double_freez.ClinicFunctionalTest.test_gh_99240_double_frees���r��
�
#�
#�I�~�
>�
>�	7�	7��*�*�3��6�6�6�	7�	7�	7�	7�	7�	7�	7�	7�	7�	7�	7�	7����	7�	7�	7�	7�	7�	7s�A�A�AN)8rrr�locals�update�dirr�r�r�r�r�r�r�r�r�r�rrrrrrr r#r&r,r/r4r9r<rArFrIrQrZr]r`rcrgrkrorrrur}r�r�r�r�r�r�r�r�r�r�r�r�rrrr�r�Cs�������
�F�H�H�O�O�L�L� #��I���L�L�L�L�L�L�D�D�D�^�^�^�
W�W�W�O�O�O�
c�c�c�
E�
E�
E�j�j�j�	C�	C�	C�k�k�k�O�O�O�h�h�h�	D�	D�	D�j�j�j�	I�	I�	I�p�p�p�	Q�	Q�	Q�	K�	K�	K�>�>�>�C�C�C�D�D�D�D�D�D�	Y�	Y�	Y�	g�	g�	g�p�p�p�
?�?�?�
F�F�F�K�K�K�Z�Z�Z�R�R�R�E�E�E�C�C�C�T�T�T�
Y�
Y�
Y�
C�
C�
C�	=�	=�	=�Y�Y�Y�f�f�f� j�j�j� 
F�
F�
F�F�F�F�O�O�O�S�S�S�G�G�G�b�b�b�b�b�b�9�9�9�,�,�,�B�B�B�7�7�7�7�7rr��__main__)$�testrr�test.supportrr�unittestrrBr�os.pathr�rM�skip_if_missing�imports_under_toolrr	rrr#rZrfr/r]rlr�r�r�r�r�r�
import_moduler�r�r�mainrrr�<module>r�s���
%�$�$�$�$�$�$�$�1�1�1�1�1�1�1�1�������������������
�
�
�
������
��8�$�$�$�"�Z�"�8�,�,�!�!��M�M�M� � � � � � �!�!�!�!�!�!�!�!�!�!�!����!�!�!�!�
��������0�0�0�0�0�0�0�0�Q�Q�Q�Q�Q�Q�Q�Q��F�M�3�6�2�2�2��-8�-8�-8�-8�-8�-8�-8�-8�^1�1�1�1�1�(�1�1�1�*-.�-.�-.�-.�-.�h�-.�-.�-.�`2(�2(�2(�2(�2(�X�2(�2(�2(�h
�
�
�
�
�
�
�
�#�#�#�#�#�#�#�#�:�:�:�:�:�H�:�:�:�zAp�Ap�Ap�Ap�Ap�x�Ap�Ap�Ap�H5�5�5�5�5��5�5�5�:
(�M�'�
�6�6�	�B7�B7�B7�B7�B7�8�,�B7�B7�B7�J�z����H�M�O�O�O�O�O��s�A"�"A&�)A&