HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.7/test/__pycache__/test_clinic.cpython-37.opt-1.pyc
B

��g�T�@s�ddlmZddlmZddlZddlZddlZddlZddlZej	�
ej	�e�dddd�Z
ej	�e
�Z
ej	�e
�s�e�e
�d���ej	�e
�zddlZddlmZWdej	d	=XGd
d�d�ZGdd
�d
�ZGdd�d�Zejddd�ZGdd�d�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�d�ZGdd�d�ZGdd �d e�ZGd!d"�d"e�Z Gd#d$�d$e�Z!e"d%k�r�e�#�dS)&�)�support)�TestCaseNz..ZTools�clinicz path does not exist)�	DSLParser���c@seZdZdd�ZdS)�
FakeConvertercCs||_||_dS)N)�name�args)�selfrr	�r�,/usr/local/lib/python3.7/test/test_clinic.py�__init__szFakeConverter.__init__N)�__name__�
__module__�__qualname__r
rrrrrsrc@seZdZdd�Zdd�ZdS)�FakeConverterFactorycCs
||_dS)N)r)r
rrrrr
!szFakeConverterFactory.__init__cKst|j|�S)N)rr)r
r�default�kwargsrrr�__call__$szFakeConverterFactory.__call__N)rrrr
rrrrrr src@seZdZdd�Zdd�ZdS)�FakeConvertersDictcCs
i|_dS)N)�used_converters)r
rrrr
)szFakeConvertersDict.__init__cCs|j�|t|��S)N)r�
setdefaultr)r
rrrrr�get,szFakeConvertersDict.getN)rrrr
rrrrrr(sr�C�file)�language�filenamec@s<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zej	j
Z
dS)�
FakeCliniccCs�t�|_t�|_t�d�|_d|_i|_t�d|j�|_	t
��|_t
��|_
|t_d|_d|_|_i|_|�dd�|�dd�|�dd�|jj}t
�d|d�fd|d�fd	|d�fd
|d�fd|d�fd|d�fd
|d�ff�|_dS)N�r�block�bufferr�suppressZdocstring_prototypeZdocstring_definitionZmethoddef_defineZimpl_prototypeZparser_prototypeZparser_definitionZimpl_definition)rZ
convertersZlegacy_convertersr�	CLanguagerrZdestination_buffers�BlockParserZblock_parser�collections�OrderedDict�modules�classesrZline_prefixZline_suffix�destinations�add_destinationrZfield_destinations)r
�drrrr
2s0







zFakeClinic.__init__cCs&|j�|�}|s"t�dt|��|S)NzDestination does not exist: )r(r�sys�exit�repr)r
rr*rrr�get_destinationMszFakeClinic.get_destinationcGs:||jkrt�dt|��tj|||f|��|j|<dS)NzDestination already exists: )r(r+r,r-rZDestination)r
r�typer	rrrr)Ss
zFakeClinic.add_destinationcCs|dkS)N�moduler)r
rrrr�is_directiveXszFakeClinic.is_directivecCs||j|<dS)N)Zcalled_directives)r
rr	rrr�	directive[szFakeClinic.directiveN)rrrr
r.r)r1r2r�ClinicZ_module_and_classrrrrr1src@seZdZdd�ZdS)�ClinicWholeFileTestcCsNtjt�d�dd�}d}|�|���}|d��}|�|d�|�|d�dS)Nr)rz/*[clinic]
foo
[clinic]*/�z[clinic]*/[clinic]*/z
[clinic]*/)rr3r"�parse�
splitlines�rstripZassertNotEqual�assertEqual)r
�c�rawZcookedZend_linerrr�test_eolas	zClinicWholeFileTest.test_eolN)rrrr<rrrrr4`sr4c@s<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�ClinicGroupPermuterTestcCst�|||�}|�||�dS)N)r�permute_optional_groupsr9)r
�l�m�r�output�computedrrr�_testvszClinicGroupPermuterTest._testcCs|�dggdgdggd�dS)N�start�stop�step))rF)rErF)rErFrG)rD)r
rrr�
test_rangezsz"ClinicGroupPermuterTest.test_rangecCs |�ddggdgdggd�dS)N�x�y�ch�attr))rK)rKrL)rIrJrK)rIrJrKrL)rD)r
rrr�test_add_window�sz'ClinicGroupPermuterTest.test_add_windowcCs2|�dddgddggdgddgd	d
dggd�dS)
N�a1�a2�a3�b1�b2�c1�d1�d2�e1�e2�e3))rS)rQrRrS)rQrRrSrTrU)rNrOrPrQrRrS)rNrOrPrQrRrSrTrU)rNrOrPrQrRrSrTrUrVrWrX)rD)r
rrr�test_ludicrous�s(z&ClinicGroupPermuterTest.test_ludicrouscCs |�ggdgdgdggd�dS)N�a�br:)r)rZ)rZr[)rZr[r:)rD)r
rrr�test_right_only�sz'ClinicGroupPermuterTest.test_right_onlycCsdd�}|�t|�dS)NcSst�dggg�dS)NrZ)rr>rrrr�fn�szPClinicGroupPermuterTest.test_have_left_options_but_required_is_empty.<locals>.fn)�assertRaises�AssertionError)r
r]rrr�,test_have_left_options_but_required_is_empty�szDClinicGroupPermuterTest.test_have_left_options_but_required_is_emptyN)	rrrrDrHrMrYr\r`rrrrr=us		r=c@sDeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS)�ClinicLinearFormatTestcKstj|f|�}|�||�dS)N)rZ
linear_formatr9)r
�inputrBrrCrrrrD�szClinicLinearFormatTest._testcCs|�dd�dS)Nr)rD)r
rrr�test_empty_strings�sz)ClinicLinearFormatTest.test_empty_stringscCs|�dd�dS)N�
)rD)r
rrr�test_solo_newline�sz(ClinicLinearFormatTest.test_solo_newlinecCs|�dd�dS)Nz
          abc
          )rD)r
rrr�test_no_substitution�sz+ClinicLinearFormatTest.test_no_substitutioncCs|jdddd�dS)Nz8
          abc
          {name}
          def
          z'
          abc
          def
          r)r)rD)r
rrr�test_empty_substitution�sz.ClinicLinearFormatTest.test_empty_substitutioncCs|jdddd�dS)Nz8
          abc
          {name}
          def
          z8
          abc
          GARGLE
          def
          ZGARGLE)r)rD)r
rrr�test_single_line_substitution�sz4ClinicLinearFormatTest.test_single_line_substitutioncCs|jdddd�dS)Nz8
          abc
          {name}
          def
          zJ
          abc
          bingle
          bungle

          def
          zbingle
bungle
)r)rD)r
rrr�test_multiline_substitution�sz2ClinicLinearFormatTest.test_multiline_substitutionN)
rrrrDrcrerfrgrhrirrrrra�s
rac@seZdZdd�Zdd�ZdS)�InertParsercCsdS)Nr)r
rrrrr
�szInertParser.__init__cCsdS)Nr)r
rrrrr6�szInertParser.parseN)rrrr
r6rrrrrj�srjc@seZdZdd�Zdd�ZdS)�
CopyParsercCsdS)Nr)r
rrrrr
�szCopyParser.__init__cCs|j|_dS)N)rbrB)r
rrrrr6�szCopyParser.parseN)rrrr
r6rrrrrk�srkc@s<eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�ClinicBlockParserTestcCsJt�d�}tt�||��}t�|�}x|D]}|�|�q*W|j��}dS)N)rr"�listr#ZBlockPrinterZprint_block�f�getvalue)r
rbrBrZblocks�writerrrrrrD�s



zClinicBlockParserTest._testcCs|�||�S)N)rD)r
rbrrr�
round_trip�sz ClinicBlockParserTest.round_tripcCs|�d�dS)Nz(
    verbatim text here
    lah dee dah
)rq)r
rrr�test_round_trip_1�sz'ClinicBlockParserTest.test_round_trip_1cCs|�d�dS)Nz�
    verbatim text here
    lah dee dah
/*[inert]
abc
[inert]*/
def
/*[inert checksum: 7b18d017f89f61cf17d47f92749ea6930a3f1deb]*/
xyz
)rq)r
rrr�test_round_trip_2�s	z'ClinicBlockParserTest.test_round_trip_2cCsNt�d�}tj|dd�}t|�|jd<t|�|jd<|�|�}|�||�dS)Nr)rZinert�copy)rr"r3rj�parsersrkr6r9)r
rbrBrr:rCrrr�_test_clinics

z"ClinicBlockParserTest._test_cliniccCs|�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
)rv)r
rrr�
test_clinic_1s		z#ClinicBlockParserTest.test_clinic_1N)	rrrrDrqrrrsrvrwrrrrrl�s
rlc@sfeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zd1d2�Zd3d4�Zd5d6�Zd7d8�Zd9d:�Zd;d<�Z d=d>�Z!d?d@�Z"dAdB�Z#dCdD�Z$dEdF�Z%dGdH�Z&dIdJ�Z'dKdL�Z(dMdN�Z)dOdP�Z*dQdR�Z+dZdUdV�Z,dWdX�Z-dYS)[�ClinicParserTestcCsHtt��}t�d�}|�|�|j\}}|�d|j�|�d|j�dS)Nzmodule os
os.access�access�os)rrr�Blockr6�
signaturesr9r)r
�parserrr0�functionrrr�test_trivial&s



zClinicParserTest.test_trivialcCs4|�d�}|j\}}|�d|j�|�d|j�dS)Nz#
module os
os.accessryrz)r6r|r9r)r
rr0r~rrr�test_ignore_line.s

z!ClinicParserTest.test_ignore_linecCsV|�d�}|�d|j�|�dt|j��|jd}|�d|j�|�|jtj�dS)Nz module os
os.access
   path: intryr5�path)	�parse_functionr9r�len�
parameters�assertIsInstance�	converterrZ
int_converter)r
r~�prrr�
test_param4s

zClinicParserTest.test_paramcCs&|�d�}|jd}|�d|j�dS)Nz4module os
os.access
    follow_symlinks: bool = True�follow_symlinksT)r�r�r9r)r
r~r�rrr�test_param_default<s

z#ClinicParserTest.test_param_defaultcCs&|�d�}|jd}|�d|j�dS)NzCmodule os
os.access
    follow_symlinks: \
   bool \
   =\
    Truer�T)r�r�r9r)r
r~r�rrr�test_param_with_continuationsAs

z.ClinicParserTest.test_param_with_continuationscCsN|�d�}|jd}|�tj|j�|�d|jj�|�d�}|�|d�dS)NzOmodule os
os.access
    follow_symlinks: int(c_default='MAXSIZE') = sys.maxsizer�ZMAXSIZEz: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�r9r+�maxsizerr�Z	c_default�parse_function_should_fail)r
r~r��srrr�test_param_default_expressionFs


z.ClinicParserTest.test_param_default_expressioncCs@|�d�}|jd}|�dt|j��|�|jdjtj�dS)NzR
module os
os.access
    follow_symlinks: bool = True
    something_else: str = ''r��Zsomething_else)r�r�r9r�r�r�r�
str_converter)r
r~r�rrr�test_param_no_docstringOs

z(ClinicParserTest.test_param_no_docstringcCs|�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�r9)r
r�rrr�*test_param_default_parameters_out_of_orderYsz;ClinicParserTest.test_param_default_parameters_out_of_ordercCs,|�d�}|jd}|�d|jjd�dS)Nz0module os
os.access
    path: path_t(allow_fd=1)r��Zallow_fd)r�r�r9r�r	)r
r~r�rrr�!disabled_test_converter_argumentsds

z2ClinicParserTest.disabled_test_converter_argumentscCs |�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�r9�strip�	docstring)r
r~rrr�test_function_docstringisz(ClinicParserTest.test_function_docstringcCs |�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.
)r�r9r�r�)r
r~rrr�%test_explicit_parameters_in_docstring|s

z6ClinicParserTest.test_explicit_parameters_in_docstringcCs|�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�r9r�)r
r~rrr�Ttest_parser_regression_special_character_in_parameter_column_of_docstring_first_line�szeClinicParserTest.test_parser_regression_special_character_in_parameter_column_of_docstring_first_linecCs|�d�}|�d|j�dS)Nzmodule os
os.stat as os_stat_fnZ
os_stat_fn)r�r9Z
c_basename)r
r~rrr�test_c_name�s
zClinicParserTest.test_c_namecCs|�d�}|�|jtj�dS)Nzmodule os
os.stat -> int)r�r�Zreturn_converterrZint_return_converter)r
r~rrr�test_return_converter�s
z&ClinicParserTest.test_return_convertercCs8|�d�}|jd}|�tjj|j�|�d|j�dS)Nz:module os
os.access
    *
    follow_symlinks: bool = Truer�r)r�r�r9�inspect�	ParameterZKEYWORD_ONLY�kind�group)r
r~r�rrr�	test_star�s

zClinicParserTest.test_starcCs&|�d�}|jd}|�d|j�dS)Nz/module window
window.border
 [
 ls : int
 ]
 /
Zlsr�)r�r�r9r�)r
r~r�rrr�
test_group�s

zClinicParserTest.test_groupcCs`|�d�}x:dD]2\}}|j|}|�|j|�|�|jtjj�qW|�|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.
   ]
   /
))rJr)rIr)rKr)rLr�z�
addch([y, x,] ch, [attr])


  y
    Y-coordinate.
  x
    X-coordinate.
  ch
    Character to add.
  attr
    Attributes for the character.
            )
r�r�r9r�r�r�r��POSITIONAL_ONLYr�r�)r
r~rr�r�rrr�test_left_group�s
z ClinicParserTest.test_left_groupcCs`|�d�}x:dD]2\}}|j|}|�|j|�|�|jtjj�qW|�|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.
   ]
   ]
   /
))Zy1���)Zy2r�)Zx1r)Zx2r)rKr)Zattr1r�)Zattr2r�)Zattr3r�)Zattr4r5)Zattr5r5)Zattr6r5a�
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�r9r�r�r�r�r�r�r�)r
r~rr�r�rrr�test_nested_groups�s"
z#ClinicParserTest.test_nested_groupsc
Cs<t���&}|�t��|�|�WdQRXWdQRX|��S)N)r�captured_stdoutr^�
SystemExitr�ro)r
r��stdoutrrrr�$s
z+ClinicParserTest.parse_function_should_failcCs|�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�r9)r
r�rrr�0test_disallowed_grouping__two_top_groups_on_left*s
zAClinicParserTest.test_disallowed_grouping__two_top_groups_on_leftcCs|�d�dS)Nz}
module foo
foo.two_top_groups_on_right
    param: int
    [
    group1 : int
    ]
    [
    group2 : int
    ]
            )r�)r
rrr�1test_disallowed_grouping__two_top_groups_on_right:s
zBClinicParserTest.test_disallowed_grouping__two_top_groups_on_rightcCs|�d�dS)Nz�
module foo
foo.parameter_after_group_on_right
    param: int
    [
    [
    group1 : int
    ]
    group2 : int
    ]
            )r�)r
rrr�8test_disallowed_grouping__parameter_after_group_on_rightGs
zIClinicParserTest.test_disallowed_grouping__parameter_after_group_on_rightcCs|�d�dS)Nz�
module foo
foo.group_after_parameter_on_left
    [
    group2 : int
    [
    group1 : int
    ]
    ]
    param: int
            )r�)r
rrr�7test_disallowed_grouping__group_after_parameter_on_leftTs
zHClinicParserTest.test_disallowed_grouping__group_after_parameter_on_leftcCs|�d�dS)Nz`
module foo
foo.empty_group
    [
    [
    ]
    group2 : int
    ]
    param: int
            )r�)r
rrr�-test_disallowed_grouping__empty_group_on_leftas	z>ClinicParserTest.test_disallowed_grouping__empty_group_on_leftcCs|�d�dS)Nz`
module foo
foo.empty_group
    param: int
    [
    [
    ]
    group2 : int
    ]
            )r�)r
rrr�.test_disallowed_grouping__empty_group_on_rightms	z?ClinicParserTest.test_disallowed_grouping__empty_group_on_rightcCs.|�d�}|�d|j�|�dt|j��dS)Nz 
module foo
foo.bar

Docstring

zbar($module, /)
--

Docstringr�)r�r9r�r�r�)r
r~rrr�test_no_parametersysz#ClinicParserTest.test_no_parameterscCs4|jdddd�}|�d|j�|�dt|j��dS)NzL
module foo
class foo.Bar "unused" "notneeded"
foo.Bar.__init__

Docstring

r�r5)�signatures_in_block�function_indexzBar()
--

Docstringr�)r�r9r�r�r�)r
r~rrr�test_init_with_no_parameters�sz-ClinicParserTest.test_init_with_no_parameterscCs|�d�dS)Nz!
module foo
foo.bar => int
    /
)r�)r
rrr�test_illegal_module_line�sz)ClinicParserTest.test_illegal_module_linecCs|�d�dS)Nz!
module foo
foo.bar as 935
    /
)r�)r
rrr�test_illegal_c_basename�sz(ClinicParserTest.test_illegal_c_basenamecCs|�d�dS)Nz 
module foo
foo.bar
    *
    *
)r�)r
rrr�test_single_star�sz!ClinicParserTest.test_single_starcCs|�d�dS)Nz
module foo
foo.bar
    *
)r�)r
rrr�Ktest_parameters_required_after_star_without_initial_parameters_or_docstring�sz\ClinicParserTest.test_parameters_required_after_star_without_initial_parameters_or_docstringcCs|�d�dS)Nz*
module foo
foo.bar
    *
Docstring here.
)r�)r
rrr�Mtest_parameters_required_after_star_without_initial_parameters_with_docstring�sz^ClinicParserTest.test_parameters_required_after_star_without_initial_parameters_with_docstringcCs|�d�dS)Nz(
module foo
foo.bar
    this: int
    *
)r�)r
rrr�Mtest_parameters_required_after_star_with_initial_parameters_without_docstring�sz^ClinicParserTest.test_parameters_required_after_star_with_initial_parameters_without_docstringcCs|�d�dS)Nz3
module foo
foo.bar
    this: int
    *
Docstring.
)r�)r
rrr�Itest_parameters_required_after_star_with_initial_parameters_and_docstring�szZClinicParserTest.test_parameters_required_after_star_with_initial_parameters_and_docstringcCs|�d�dS)Nz 
module foo
foo.bar
    /
    /
)r�)r
rrr�test_single_slash�sz"ClinicParserTest.test_single_slashcCs|�d�dS)Nz<
module foo
foo.bar
   x: int
   y: int
   *
   z: int
   /
)r�)r
rrr�test_mix_star_and_slash�sz(ClinicParserTest.test_mix_star_and_slashcCs|�d�dS)Nz%
module foo
foo.bar
    /
    x: int
)r�)r
rrr�1test_parameters_not_permitted_after_slash_for_now�szBClinicParserTest.test_parameters_not_permitted_after_slash_for_nowcCs |�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.
)r�r9r�r�)r
r~rrr�test_function_not_at_column_0�sz.ClinicParserTest.test_function_not_at_column_0csJt�}t|��d�_�fdd��jd<t�d�}��|�|��j�dS)NFcst�dd�S)N�flagT)�setattrr)r}rr�<lambda>��z1ClinicParserTest.test_directive.<locals>.<lambda>Zsetflag)rrr�Z
directivesrr{r6Z
assertTrue)r
r:rr)r}r�test_directive�s

zClinicParserTest.test_directivecCs.|�d�}|j\}}|�|jdjtj�dS)Nz module os
os.access
   path: "s"r�)r6r|r�r�r�rr�)r
rr0r~rrr�test_legacy_converterss

z'ClinicParserTest.test_legacy_converterscCs&t�}t|�}t�|�}|�|�|S)N)rrrr{r6)r
�textr:r}rrrrr6s


zClinicParserTest.parser5r�cCs(|�|�}|j}|�t|�|�||S)N)r6r|r9r�)r
r�r�r�rr�rrrr�s
zClinicParserTest.parse_functionc
Csr|�ttj�d�|�ttj�d�t���,}|�t��tj	dddd�WdQRXWdQRX|�|�
�d�dS)Nz
<Unspecified>z<Null>zThe igloos are melting!z	clown.txt�E)rZline_numberz>Error in file "clown.txt" on line 69:
The igloos are melting!
)r9r-rZunspecifiedZNULLrr�r^r�Zfailro)r
r�rrr�test_scaffoldings
$z!ClinicParserTest.test_scaffoldingN)r5r�).rrrrr�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�r6r�r�rrrrrx%sV	
	(L


		
rxc@seZdZdZdd�ZdS)�ClinicExternalTestNc
Cs�t�d�}t|ddd��}|��}WdQRXt���t}tj�|d�}t|ddd��}|�|�WdQRXt	j
|dd�t|ddd��}|��}WdQRX|�||�WdQRXdS)	Nzclinic.testrAzutf-8)�encodingz
clinic.test.c�wT)�force)rZfindfile�open�readZtemp_dirrzr��join�writerZ
parse_filer9)r
�sourcernZoriginalZtestdirZtestfile�resultrrr�
test_external#s

z ClinicExternalTest.test_external)rrrZmaxDiffr�rrrrr� sr��__main__)$ZtestrZunittestrr$r�Zos.pathrzr+r�r��dirname�__file__Zclinic_path�normpath�existsZSkipTest�appendrrrrrr3r:rr4r=rarjrkrlrxr�r�mainrrrr�<module>sB
/04=~