Test that `__file__` is set when running `ipython file.ipy`
(self)
| 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`""" |
| 37 | src = "print(__file__)\n" |
| 38 | self.mktmp(src, ext=".ipy") |
| 39 | |
| 40 | err = None |
| 41 | tt.ipexec_validate(self.fname, self.fname, err) |
| 42 | |
| 43 | # The commands option to ipexec_validate doesn't work on Windows, and it |
| 44 | # doesn't seem worth fixing |