%%file with spaces in filename
()
| 1402 | |
| 1403 | |
| 1404 | def 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 | |
| 1424 | def test_script_config(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…