o
    û›hÃ  ã                   @   sR   d dl Z d dlZd dlmZ ej e¡Zej 	ed¡Z
dd„ Zdd„ Zdd	„ ZdS )
é    N)Úopenpyz../../core/tests/nonascii.pyc                  C   sJ   t tdƒ�} t | j¡\}}W d   ƒ n1 sw   Y  |dks#J ‚d S )NÚrbú
iso-8859-5)ÚopenÚnonascii_pathr   Údetect_encodingÚreadline)ÚfÚencÚlines© r   úUc:\Users\shubh\Videos\agent\nova\Lib\site-packages\IPython/utils/tests/test_openpy.pyÚtest_detect_encoding
   s   ÿr   c                  C   sz   t jtdd��} |  ¡ }W d   ƒ n1 sw   Y  tjtdd�}||ks(J ‚d|v s.J ‚tjtdd�}d|vs;J ‚d S )Nr   )ÚencodingF©Zskip_encoding_cookieúcoding: iso-8859-5T)Úior   r   Úreadr   Zread_py_file)r	   Zread_specified_encZread_detected_encZread_strip_enc_cookier   r   r   Útest_read_file   s   
ÿÿr   c                  C   sv   t  td¡�} |  ¡ }W d   ƒ n1 sw   Y  tj|dd� ¡ | d¡ ¡ ks,J ‚tj|dd�}d|vs9J ‚d S )Nr   Fr   r   Tr   )r   r   r   r   r   Zsource_to_unicodeÚ
splitlinesÚdecode)r	   Úsource_bytesZsource_no_cookier   r   r   Útest_source_to_unicode   s   
ÿÿr   )r   Zos.pathÚosZIPython.utilsr   ÚpathÚdirnameÚ__file__ZmydirÚjoinr   r   r   r   r   r   r   r   Ú<module>   s    