
    }e~                     H    d Z ddlZddlZddlmZ d Zd Zd Zd Zd Z	d	 Z
y)
z!Tests for the compilerop module.
    N)
compileropc                  X    d} t        j                  |       }|j                  d      sJ y )Nx=1z<ipython-input-0r   	code_name
startswithcodenames     D/usr/lib/python3/dist-packages/IPython/core/tests/test_compilerop.pytest_code_namer      s*    D%D??-...    c                  Z    d} t        j                  | d      }|j                  d      sJ y )Nr   	   z<ipython-input-9r   r	   s     r   test_code_name2r   !   s,    Da(D??-...r   c                      t        j                         } t        t        j                        }| j	                  d       t        t        j                        |kD  sJ y)z;Test the compiler correctly compiles and caches inputs
    r   Nr   CachingCompilerlen	linecachecachecpncaches     r   
test_cacher   '   sB     
	#	#	%B!FHHUOy&(((r   c                  6    t        j                         dk(  sJ y )Nzutf-8)sysgetdefaultencoding r   r   test_proper_default_encodingr    /   s     !!#w...r   c                      t        j                         } t        t        j                        }| j	                  d       t        t        j                        |kD  sJ y )Nu   t = 'žćčšđ'r   r   s     r   test_cache_unicoder"   4   sB    		#	#	%B!FHH !y&(((r   c                      t        j                         } | j                  dd       t        j                          t        d t        j                  D              sJ d       y)z2Test the compiler properly manages the cache.
    r   c   c              3   >   K   | ]  }|j                  d         yw)z<ipython-input-99N)r   ).0ks     r   	<genexpr>z,test_compiler_check_cache.<locals>.<genexpr>B   s      ./()s   z)Entry for input-99 missing from linecacheN)r   r   r   r   
checkcacheany)r   s    r   test_compiler_check_cacher+   :   sW     
	#	#	%BHHUB 3<??  323 r   )__doc__r   r   IPython.corer   r   r   r   r    r"   r+   r   r   r   <module>r.      s5     
 $//)/
)
3r   