MCPcopy Create free account
hub / github.com/ipython/ipython / test_file_double_quote

Function test_file_double_quote

IPython/core/tests/test_magic.py:878–890  ·  view source on GitHub ↗

Basic %%writefile with embedded double quotes

()

Source from the content-addressed store, hash-verified

876
877@dec.skip_win32
878def 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
892def test_file_var_expand():
893 """%%writefile $filename"""

Callers

nothing calls this directly

Calls 3

get_ipythonFunction · 0.90
run_cell_magicMethod · 0.80
readMethod · 0.80

Tested by

no test coverage detected