Basic %%writefile with embedded double quotes
()
| 876 | |
| 877 | @dec.skip_win32 |
| 878 | def test_file_double_quote(): |
| 879 | """Basic %%writefile with embedded double quotes""" |
| 880 | ip = get_ipython() |
| 881 | with TemporaryDirectory() as td: |
| 882 | fname = os.path.join(td, '"file1"') |
| 883 | ip.run_cell_magic("writefile", fname, u'\n'.join([ |
| 884 | 'line1', |
| 885 | 'line2', |
| 886 | ])) |
| 887 | with open(fname) as f: |
| 888 | s = f.read() |
| 889 | nt.assert_in('line1\n', s) |
| 890 | nt.assert_in('line2', s) |
| 891 | |
| 892 | def test_file_var_expand(): |
| 893 | """%%writefile $filename""" |
nothing calls this directly
no test coverage detected