Format: application/x-python-code
⬇ Download File (1.7 KB)
   1  o
   2  
   3  ��hd�@s>dZddlZddlmZddlmZGdd�dejej�Z	dS)z>Tests for shellapp module.
   4  
   5  Authors
   6  -------
   7  * Bradley Froehle
   8  �N)�
   9  decorators)�toolsc@s.eZdZdZdd�Zdd�Zejdd��ZdS)	�
  10  TestFileToRunz/Test the behavior of the file_to_run parameter.cCs(d}|�|�d}t�|j|j|�dS)z:Test that `__file__` is set when running `ipython file.py`�print(__file__)
  11  N��mktmp�ttZipexec_validate�fname��self�src�err�r�Vc:\Users\shubh\Videos\agent\nova\Lib\site-packages\IPython/core/tests/test_shellapp.py�test_py_script_file_attributes
  12  z+TestFileToRun.test_py_script_file_attributecCs,d}|j|dd�d}t�|j|j|�dS)z;Test that `__file__` is set when running `ipython file.ipy`rz.ipy)�extNrr
  13  rrr�test_ipy_script_file_attribute#sz,TestFileToRun.test_ipy_script_file_attributecCsFd}|�|�tj|jdggd�d�\}}d|vs!Jd|�d���dS)	z:Test that `__file__` is not set after `ipython -i file.py`zTrue
  14  z-i)z"__file__" in globals()z
  15  print(123)zexit())�options�commands�FalsezSubprocess stderr:
  16  z
  17  -----N)rrZipexecr	)rr�outr
  18  rrr�+test_py_script_file_attribute_interactively-s
  19  
  20  �z9TestFileToRun.test_py_script_file_attribute_interactivelyN)	�__name__�
  21  __module__�__qualname__�__doc__rr�decZ
  22  skip_win32rrrrrrs
  23  r)
  24  rZunittestZIPython.testingrrrrZ
  25  TempFileMixinZTestCaserrrrr�<module>s
  26