o
    û›h~  ã                   @   sT   d Z ddlZddlZddlmZ dd„ Zdd„ Zdd	„ Zd
d„ Zdd„ Z	dd„ Z
dS )z!Tests for the compilerop module.
é    N)Ú
compileropc                  C   s    d} t  | ¡}| d¡sJ ‚d S )Núx=1z<ipython-input-0©r   Z	code_nameÚ
startswith©ÚcodeÚname© r	   úXc:\Users\shubh\Videos\agent\nova\Lib\site-packages\IPython/core/tests/test_compilerop.pyÚtest_code_name   s   
r   c                  C   s"   d} t  | d¡}| d¡sJ ‚d S )Nr   é	   z<ipython-input-9r   r   r	   r	   r
   Útest_code_name2!   s   r   c                  C   s2   t  ¡ } ttjƒ}|  d¡ ttjƒ|ksJ ‚dS )z;Test the compiler correctly compiles and caches inputs
    r   N©r   ÚCachingCompilerÚlenÚ	linecacheÚcache©ÚcpZncacher	   r	   r
   Ú
test_cache'   s   

r   c                   C   s   t  ¡ dksJ ‚d S )Nzutf-8)ÚsysÚgetdefaultencodingr	   r	   r	   r
   Útest_proper_default_encoding/   s   r   c                  C   s2   t  ¡ } ttjƒ}|  d¡ ttjƒ|ksJ ‚d S )Nu   t = 'Å¾Ä‡Ä�Å¡Ä‘'r   r   r	   r	   r
   Útest_cache_unicode4   s   

r   c                  C   s<   t  ¡ } |  dd¡ t ¡  tdd„ tjD ƒƒsJ dƒ‚dS )z2Test the compiler properly manages the cache.
    r   éc   c                 s   s   � | ]}|  d ¡V  qdS )z<ipython-input-99N)r   )Ú.0Úkr	   r	   r
   Ú	<genexpr>B   s   € 

ÿz,test_compiler_check_cache.<locals>.<genexpr>z)Entry for input-99 missing from linecacheN)r   r   r   r   Ú
checkcacheÚany)r   r	   r	   r
   Útest_compiler_check_cache:   s   
ÿþr    )Ú__doc__r   r   ZIPython.corer   r   r   r   r   r   r    r	   r	   r	   r
   Ú<module>   s   