a
    ûb  ã                   @   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   út/Users/vegardjervell/Documents/master/model/venv/lib/python3.9/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   s    zTestStripLiterals.test_emptyc                 C   s   |   dd¡ d S )Nz'x'ú'_L1_'r   r   r   r   r   Útest_single_quote   s    z#TestStripLiterals.test_single_quotec                 C   s   |   dd¡ d S )Nz"x"z"_L1_"r   r   r   r   r   Útest_double_quote   s    z#TestStripLiterals.test_double_quotec                 C   s   |   dd¡ d S )Nz	 '"' "'" z '_L1_' "_L2_" r   r   r   r   r   Útest_nested_quotes   s    z$TestStripLiterals.test_nested_quotesc                 C   s   |   dd¡ d S )Nz
 '''a
''' z '''_L1_''' r   r   r   r   r   Útest_triple_quote   s    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   s   |   dd¡ d S )Nzu'abc'zu'_L1_'r   r   r   r   r   Útest_unicode"   s    zTestStripLiterals.test_unicodec                 C   s   |   dd¡ d S )Nzr'abc\\'zr'_L1_'r   r   r   r   r   Útest_raw%   s    zTestStripLiterals.test_rawc                 C   s   |   dd¡ d S )Nz	ru'abc\\'zru'_L1_'r   r   r   r   r   Útest_raw_unicode(   s    z"TestStripLiterals.test_raw_unicodec                 C   s   |   dd¡ d S )Nz	abc # fooú	abc #_L1_r   r   r   r   r   Útest_comment+   s    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   s   |   dd¡ d S )Nz include 'a.pxi' # something herezinclude '_L1_' #_L2_r   r   r   r   r   Útest_include2   s    ÿzTestStripLiterals.test_includec                 C   s   |   dd¡ d S )Nz!cdef extern from 'a.h': # commentzcdef extern from '_L1_': #_L2_r   r   r   r   r   Útest_extern6   s    ÿ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)ZCython.Build.Dependenciesr   ZCython.TestUtilsr   r   r   r   r   r   Ú<module>   s   