Basic %%writefile with embedded single quotes
()
| 861 | |
| 862 | @dec.skip_win32 |
| 863 | def test_file_single_quote(): |
| 864 | """Basic %%writefile with embedded single quotes""" |
| 865 | ip = get_ipython() |
| 866 | with TemporaryDirectory() as td: |
| 867 | fname = os.path.join(td, '\'file1\'') |
| 868 | ip.run_cell_magic("writefile", fname, u'\n'.join([ |
| 869 | 'line1', |
| 870 | 'line2', |
| 871 | ])) |
| 872 | with open(fname) as f: |
| 873 | s = f.read() |
| 874 | nt.assert_in('line1\n', s) |
| 875 | nt.assert_in('line2', s) |
| 876 | |
| 877 | @dec.skip_win32 |
| 878 | def test_file_double_quote(): |
nothing calls this directly
no test coverage detected