Format: application/x-python-code
⬇ Download File (1.8 KB)
   1  o
   2  
   3  ��h~�@sTdZddlZddlZddlmZdd�Zdd�Zdd	�Zd
   4  d�Zdd
   5  �Z	dd�Z
   6  dS)z!Tests for the compilerop module.
   7  �N)�
   8  compileropcCs d}t�|�}|�d�sJ�dS)N�x=1z<ipython-input-0�rZ	code_name�
   9  startswith��code�name�r	�Xc:\Users\shubh\Videos\agent\nova\Lib\site-packages\IPython/core/tests/test_compilerop.py�test_code_names
  10  rcCs"d}t�|d�}|�d�sJ�dS)Nr�	z<ipython-input-9rrr	r	r
  11  �test_code_name2!sr
  12  cCs2t��}ttj�}|�d�ttj�|ksJ�dS)z;Test the compiler correctly compiles and caches inputs
  13      rN�r�CachingCompiler�len�	linecache�cache��cpZncacher	r	r
  14  �
  15  test_cache's
  16  
  17  rcCst��dksJ�dS)Nzutf-8)�sys�getdefaultencodingr	r	r	r
  18  �test_proper_default_encoding/srcCs2t��}ttj�}|�d�ttj�|ksJ�dS)Nut = 'žćčšđ'rrr	r	r
  19  �test_cache_unicode4s
  20  
  21  rcCs<t��}|�dd�t��tdd�tjD��sJd��dS)z2Test the compiler properly manages the cache.
  22      r�ccss�|]}|�d�VqdS)z<ipython-input-99N)r)�.0�kr	r	r
  23  �	<genexpr>Bs�
  24  
  25  �z,test_compiler_check_cache.<locals>.<genexpr>z)Entry for input-99 missing from linecacheN)rrrr�
  26  checkcache�any)rr	r	r
  27  �test_compiler_check_cache:s
  28  ��r )�__doc__rrZIPython.corerrr
  29  rrrr r	r	r	r
  30  �<module>s