
    Ae                     2    d dl mZ d dlmZ  G d de      Zy)    )strip_string_literals)
CythonTestc                   `    e 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y)TestStripLiteralsc                     t        |d      \  }}| j                  ||       |j                         D ]  \  }}|j                  ||      } | j                  ||       y )N_L)prefix)r   assertEqualitemsreplace)selfbeforeexpectedactualliteralskeyvalues          Dlib/python3.12/site-packages/Cython/Build/Tests/TestStripLiterals.pytzTestStripLiterals.t   s]    0E6*"..* 	0JC^^C/F	0(    c                 (    | j                  dd       y )N r   r   s    r   
test_emptyzTestStripLiterals.test_empty   s    r2r   c                 (    | j                  dd       y )Nz'x''_L1_'r   r   s    r   test_single_quotez#TestStripLiterals.test_single_quote       uhr   c                 (    | j                  dd       y )Nz"x"z"_L1_"r   r   s    r   test_double_quotez#TestStripLiterals.test_double_quote   r   r   c                 (    | j                  dd       y )Nz	 '"' "'" z '_L1_' "_L2_" r   r   s    r   test_nested_quotesz$TestStripLiterals.test_nested_quotes   s     56r   c                 (    | j                  dd       y )Nz
 '''a
''' z '''_L1_''' r   r   s    r   test_triple_quotez#TestStripLiterals.test_triple_quote   s    }n-r   c                 p    | j                  dd       | j                  dd       | j                  dd       y )Nz'a\'b'r   z'a\\'z'a\\\'b'r   r   s    r   test_backslashz TestStripLiterals.test_backslash   s,    y(#x"{H%r   c                 (    | j                  dd       y )Nzu'abc'zu'_L1_'r   r   s    r   test_unicodezTestStripLiterals.test_unicode"   s    x#r   c                 (    | j                  dd       y )Nzr'abc\\'zr'_L1_'r   r   s    r   test_rawzTestStripLiterals.test_raw%   s    {I&r   c                 (    | j                  dd       y )Nz	ru'abc\\'zru'_L1_'r   r   s    r   test_raw_unicodez"TestStripLiterals.test_raw_unicode(   s    |Z(r   c                 (    | j                  dd       y )Nz	abc # foo	abc #_L1_r   r   s    r   test_commentzTestStripLiterals.test_comment+   s    {K(r   c                 L    | j                  dd       | j                  dd       y )Nz	abc # 'x'r/   z'abc#'r   r   r   s    r   test_comment_and_quotez(TestStripLiterals.test_comment_and_quote.   s    {K(x"r   c                 (    | j                  dd       y )Nz include 'a.pxi' # something herezinclude '_L1_' #_L2_r   r   s    r   test_includezTestStripLiterals.test_include2   s    1%	'r   c                 (    | j                  dd       y )Nz!cdef extern from 'a.h': # commentzcdef extern from '_L1_': #_L2_r   r   s    r   test_externzTestStripLiterals.test_extern6   s    2/	1r   N)__name__
__module____qualname__r   r   r   r!   r#   r%   r'   r)   r+   r-   r0   r2   r4   r6    r   r   r   r      sH    )  7.&
$'))#'1r   r   N)Cython.Build.Dependenciesr   Cython.TestUtilsr   r   r:   r   r   <module>r=      s    ; '31
 31r   