o
    DDi$                     @   s|   d dl mZmZ d dlZd dlmZ d dlmZ	 d dl
mZ d dlmZmZmZ d dlmZmZ edZG d	d
 d
eZdS )    )CallableTypeVarN)deep_equals)MockWhitespaceParserConfig)WhitespaceState)parse_empty_linesparse_simple_whitespaceparse_trailing_whitespace)data_providerUnitTest_Tc                   @   s:  e Zd Zeeeddgddeddddd	eddddd	edd
eedgddeddddd	eddddd	edd
eedgddeddddd	eddddd	edd
eeg dddeddddd	eddddd	edd
e	edgddeddddd	eddddd	g d
e	eddgddeddddd	eddddd	ej
dedede dgd
e	eg dddeddddd	eddddd	ej
dedd e dej
dedd e dej
ded!ed"e dej
deded#e dej
ded$ed%e dgd
e	eg d&ddeddddd	eddddd	ej
dedd ed dej
dedd ed'dej
dedd ed(dgd
eed)gddeddddd	edd*ddd	ejed$ede d+d
d,	d-eeegef d.ed/ed0ed1ed2d fd3d4Zd S )5WhitespaceParserTestznot whitespace
z another line

)linesdefault_newline   r    F)linecolumnabsolute_indentis_parenthesized)parserconfigstart_state	end_stateexpected_nodez%	  <-- There's some whitespace there
   z	  z	prefix      	   z   )z	prefix \
z    \
z    # suffix
   z \
    \
    zthis is not an empty linez    # comment
zthis is not an empty line
z       Tz	# comment)indent
whitespacecommentnewline)r   z    
z*     # comment with indent and whitespace
z# comment without indent
z/  # comment with no indent but some whitespace
   /   N z$# comment with indent and whitespacez# comment without indentz  z,# comment with no indent but some whitespace)r   
r(   r)   zsome code  # comment
   )r"   r#   r$   )	simple_whitespace_emptysimple_whitespace_start_of_linesimple_whitespace_end_of_line#simple_whitespace_line_continuationempty_lines_empty_listempty_lines_single_lineempty_lines_multipleempty_lines_non_default_newlinetrailing_whitespacer   r   r   r   r   returnc                 C   s:   |||}| j t||d|d|d | || d S )Nr   z
is not deeply equal to 
)msg)
assertTruer   assertEqual)selfr   r   r   r   r   parsed_node r:   d/var/www/Datamplify/venv/lib/python3.10/site-packages/libcst/_parser/tests/test_whitespace_parser.pytest_parsers   s    
Iz!WhitespaceParserTest.test_parsers)__name__
__module____qualname__r
   r   ConfigStatecstSimpleWhitespacer   	EmptyLineCommentNewliner	   TrailingWhitespacer   r   r<   r:   r:   r:   r;   r      sv   
6  ?r   )typingr   r   libcstrB   libcst._nodes.deep_equalsr   libcst._parser.types.configr   r@   %libcst._parser.types.whitespace_stater   rA    libcst._parser.whitespace_parserr   r   r	   libcst.testing.utilsr
   r   r   r   r:   r:   r:   r;   <module>   s   