Format: application/x-python-code
⬇ Download File (1.4 KB)
   1  o
   2  
   3  ��h��@sRddlZddlZddlmZej�e�Zej�	ed�Z
   4  dd�Zdd�Zdd	�Z
   5  dS)
   6  �N)�openpyz../../core/tests/nonascii.pycCsJttd��}t�|j�\}}Wd�n1swY|dks#J�dS)N�rb�
   7  iso-8859-5)�open�
   8  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
   9  s�rcCsztjtdd��}|��}Wd�n1swYtjtdd�}||ks(J�d|vs.J�tjtdd�}d|vs;J�dS)Nr)�encodingF�Zskip_encoding_cookie�coding: iso-8859-5T)�iorr�readrZread_py_file)r	Zread_specified_encZread_detected_encZread_strip_enc_cookierrr
  10  �test_read_files
  11  ��rcCsvt�td��}|��}Wd�n1swYtj|dd���|�d���ks,J�tj|dd�}d|vs9J�dS)NrFrrTr)rrrrrZsource_to_unicode�
  12  splitlines�decode)r	�source_bytesZsource_no_cookierrr
  13  �test_source_to_unicodes
  14  ��r)rZos.path�osZ
  15  IPython.utilsr�path�dirname�__file__Zmydir�joinrrrrrrrr
  16  �<module>s
  17