Show More
@@ -27,7 +27,8 b' from IPython.core.magics import execution, script, code, logging' | |||||
27 | from IPython.testing import decorators as dec |
|
27 | from IPython.testing import decorators as dec | |
28 | from IPython.testing import tools as tt |
|
28 | from IPython.testing import tools as tt | |
29 | from IPython.utils.io import capture_output |
|
29 | from IPython.utils.io import capture_output | |
30 | from IPython.utils.tempdir import TemporaryDirectory |
|
30 | from IPython.utils.tempdir import (TemporaryDirectory, | |
|
31 | TemporaryWorkingDirectory) | |||
31 | from IPython.utils.process import find_cmd |
|
32 | from IPython.utils.process import find_cmd | |
32 |
|
33 | |||
33 |
|
34 | |||
@@ -797,7 +798,20 b' def test_file_amend():' | |||||
797 | s = f.read() |
|
798 | s = f.read() | |
798 | nt.assert_in('line1\n', s) |
|
799 | nt.assert_in('line1\n', s) | |
799 | nt.assert_in('line3\n', s) |
|
800 | nt.assert_in('line3\n', s) | |
800 |
|
801 | |||
|
802 | def test_file_spaces(): | |||
|
803 | """%%file with spaces in filename""" | |||
|
804 | ip = get_ipython() | |||
|
805 | with TemporaryWorkingDirectory() as td: | |||
|
806 | fname = 'file name' | |||
|
807 | ip.run_cell_magic("file", "'%s'"%fname, u'\n'.join([ | |||
|
808 | 'line1', | |||
|
809 | 'line2', | |||
|
810 | ])) | |||
|
811 | with open(fname) as f: | |||
|
812 | s = f.read() | |||
|
813 | nt.assert_in('line1\n', s) | |||
|
814 | nt.assert_in('line2', s) | |||
801 |
|
815 | |||
802 | def test_script_config(): |
|
816 | def test_script_config(): | |
803 | ip = get_ipython() |
|
817 | ip = get_ipython() |
General Comments 0
You need to be logged in to leave comments.
Login now