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

Function test_file_double_quote

tests/test_magic.py:1312–1329  ·  view source on GitHub ↗

Basic %%writefile with embedded double quotes

()

Source from the content-addressed store, hash-verified

1310
1311@dec.skip_win32
1312def test_file_double_quote():
1313 """Basic %%writefile with embedded double quotes"""
1314 ip = get_ipython()
1315 with TemporaryDirectory() as td:
1316 fname = os.path.join(td, '"file1"')
1317 ip.run_cell_magic(
1318 "writefile",
1319 fname,
1320 "\n".join(
1321 [
1322 "line1",
1323 "line2",
1324 ]
1325 ),
1326 )
1327 s = Path(fname).read_text(encoding="utf-8")
1328 assert "line1\n" in s
1329 assert "line2" in s
1330
1331
1332def test_file_var_expand():

Callers

nothing calls this directly

Calls 2

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…