Test that `__file__` is set when running `ipython file.py`
(self)
| 25 | """Test the behavior of the file_to_run parameter.""" |
| 26 | |
| 27 | def test_py_script_file_attribute(self): |
| 28 | """Test that `__file__` is set when running `ipython file.py`""" |
| 29 | src = "print(__file__)\n" |
| 30 | self.mktmp(src) |
| 31 | |
| 32 | err = None |
| 33 | tt.ipexec_validate(self.fname, self.fname, err) |
| 34 | |
| 35 | def test_ipy_script_file_attribute(self): |
| 36 | """Test that `__file__` is set when running `ipython file.ipy`""" |