o
    Zh                     @   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   V/var/www/html/lang_env/lib/python3.10/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    