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

Function test_file_spaces

IPython/core/tests/test_magic.py:939–951  ·  view source on GitHub ↗

%%file with spaces in filename

()

Source from the content-addressed store, hash-verified

937 nt.assert_in('line3\n', s)
938
939def test_file_spaces():
940 """%%file with spaces in filename"""
941 ip = get_ipython()
942 with TemporaryWorkingDirectory() as td:
943 fname = "file name"
944 ip.run_cell_magic("file", '"%s"'%fname, u'\n'.join([
945 'line1',
946 'line2',
947 ]))
948 with open(fname) as f:
949 s = f.read()
950 nt.assert_in('line1\n', s)
951 nt.assert_in('line2', s)
952
953def test_script_config():
954 ip = get_ipython()

Callers

nothing calls this directly

Calls 4

get_ipythonFunction · 0.90
run_cell_magicMethod · 0.80
readMethod · 0.80

Tested by

no test coverage detected