o
    f                     @   s,   d dl mZ d dlmZ G dd deZdS )    )strip_string_literals)
CythonTestc                   @   s|   e Zd Zdd Zdd Zdd Zdd Zd	d
 Zdd Zdd Z	dd Z
dd Zdd Zdd Zdd Zdd Zdd ZdS )TestStripLiteralsc                 C   sJ   t |dd\}}| || | D ]
\}}|||}q| || d S )N_L)prefix)r   assertEqualitemsreplace)selfbeforeexpectedactualliteralskeyvalue r   `/var/www/html/mig_web/myenv/lib/python3.10/site-packages/Cython/Build/Tests/TestStripLiterals.pyt   s
   zTestStripLiterals.tc                 C   s   |  dd d S )N r   r
   r   r   r   
test_empty      zTestStripLiterals.test_emptyc                 C      |  dd d S )Nz'x''_L1_'r   r   r   r   r   test_single_quote   r   z#TestStripLiterals.test_single_quotec                 C   r   )Nz"x"z"_L1_"r   r   r   r   r   test_double_quote   r   z#TestStripLiterals.test_double_quotec                 C   r   )Nz	 '"' "'" z '_L1_' "_L2_" r   r   r   r   r   test_nested_quotes   r   z$TestStripLiterals.test_nested_quotesc                 C   r   )Nz
 '''a
''' z '''_L1_''' r   r   r   r   r   test_triple_quote   r   z#TestStripLiterals.test_triple_quotec                 C   s(   |  dd |  dd |  dd d S )Nz'a\'b'r   z'a\\'z'a\\\'b'r   r   r   r   r   test_backslash   s   z TestStripLiterals.test_backslashc                 C   r   )Nzu'abc'zu'_L1_'r   r   r   r   r   test_unicode"   r   zTestStripLiterals.test_unicodec                 C   r   )Nzr'abc\\'zr'_L1_'r   r   r   r   r   test_raw%   r   zTestStripLiterals.test_rawc                 C   r   )Nz	ru'abc\\'zru'_L1_'r   r   r   r   r   test_raw_unicode(   r   z"TestStripLiterals.test_raw_unicodec                 C   r   )Nz	abc # foo	abc #_L1_r   r   r   r   r   test_comment+   r   zTestStripLiterals.test_commentc                 C   s   |  dd |  dd d S )Nz	abc # 'x'r#   z'abc#'r   r   r   r   r   r   test_comment_and_quote.   s   z(TestStripLiterals.test_comment_and_quotec                 C   r   )Nz include 'a.pxi' # something herezinclude '_L1_' #_L2_r   r   r   r   r   test_include2      zTestStripLiterals.test_includec                 C   r   )Nz!cdef extern from 'a.h': # commentzcdef extern from '_L1_': #_L2_r   r   r   r   r   test_extern6   r'   zTestStripLiterals.test_externN)__name__
__module____qualname__r   r   r   r   r   r   r   r    r!   r"   r$   r%   r&   r(   r   r   r   r   r      s    r   N)Cython.Build.Dependenciesr   Cython.TestUtilsr   r   r   r   r   r   <module>   s    