MCPcopy Index your code
hub / github.com/ipython/ipython / test_file_spaces

Function test_file_spaces

tests/test_magic.py:1404–1421  ·  view source on GitHub ↗

%%file with spaces in filename

()

Source from the content-addressed store, hash-verified

1402
1403
1404def test_file_spaces():
1405 """%%file with spaces in filename"""
1406 ip = get_ipython()
1407 with TemporaryWorkingDirectory() as td:
1408 fname = "file name"
1409 ip.run_cell_magic(
1410 "file",
1411 '"%s"' % fname,
1412 "\n".join(
1413 [
1414 "line1",
1415 "line2",
1416 ]
1417 ),
1418 )
1419 s = Path(fname).read_text(encoding="utf-8")
1420 assert "line1\n" in s
1421 assert "line2" in s
1422
1423
1424def test_script_config():

Callers

nothing calls this directly

Calls 3

get_ipythonFunction · 0.90
run_cell_magicMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…