Format: application/x-python-code
⬇ Download File (1.2 KB)
   1  o
   2  
   3  ��ht�@s<dZddlZddlmZddlmZddlmZdd�ZdS)zTest installing editor hooks�N)�mock)�get_ipython)�editorhookscs�g��fdd�}tjddd�t�d|��t�j�dd�Wd�n1s(wYt��d	ks5J��d
   4  d}�d
   5  d}|d
   6  diksIJ�tj	�
   7  d�rTgd�}nd}|d
   8  }||ks`J�dS)Ncs$��||d��tjdiddi��S)N��args�kwargszwait.return_valuer�)�appendrZ	MagicMockr��calledr�Xc:\Users\shubh\Videos\agent\nova\Lib\site-packages\IPython/lib/tests/test_editorhooks.py�
   9  fake_popen
  10  s
  11  �z'test_install_editor.<locals>.fake_popenzfoo -l {line} -f {filename}F)�waitzsubprocess.Popen�the file�@�rrr�shellT�win)Zfooz-l�64z-frzfoo -l 64 -f 'the file')rZinstall_editorr�patchr�hooksZeditor�len�sys�platform�
  12  startswith)r
  13  rr�expected�cmdrr
  14  r�test_install_editors�
  15  r)	�__doc__rZunittestrZIPythonrZIPython.librrrrrr�<module>s