Show More
@@ -1060,11 +1060,11 b' def test_save():' | |||||
1060 | ip.run_line_magic("save", "%s 1-10" % file) |
|
1060 | ip.run_line_magic("save", "%s 1-10" % file) | |
1061 | content = Path(file).read_text() |
|
1061 | content = Path(file).read_text() | |
1062 | nt.assert_equal(content.count(cmds[0]), 1) |
|
1062 | nt.assert_equal(content.count(cmds[0]), 1) | |
1063 |
nt.assert_in( |
|
1063 | nt.assert_in("coding: utf-8", content) | |
1064 | ip.run_line_magic("save", "-a %s 1-10" % file) |
|
1064 | ip.run_line_magic("save", "-a %s 1-10" % file) | |
1065 | content = Path(file).read_text() |
|
1065 | content = Path(file).read_text() | |
1066 | nt.assert_equal(content.count(cmds[0]), 2) |
|
1066 | nt.assert_equal(content.count(cmds[0]), 2) | |
1067 |
nt.assert_in( |
|
1067 | nt.assert_in("coding: utf-8", content) | |
1068 |
|
1068 | |||
1069 |
|
1069 | |||
1070 | def test_store(): |
|
1070 | def test_store(): | |
@@ -1240,7 +1240,7 b' def test_run_module_from_import_hook():' | |||||
1240 | return imp.load_source('my_tmp', fullpath) |
|
1240 | return imp.load_source('my_tmp', fullpath) | |
1241 |
|
1241 | |||
1242 | def get_code(self, fullname): |
|
1242 | def get_code(self, fullname): | |
1243 |
return compile(Path(fullpath).read_text(), |
|
1243 | return compile(Path(fullpath).read_text(), "foo", "exec") | |
1244 |
|
1244 | |||
1245 | def is_package(self, __): |
|
1245 | def is_package(self, __): | |
1246 | return False |
|
1246 | return False |
@@ -118,7 +118,7 b' def write_doc(name, title, app, preamble=None):' | |||||
118 |
|
118 | |||
119 | if __name__ == '__main__': |
|
119 | if __name__ == '__main__': | |
120 | # Touch this file for the make target |
|
120 | # Touch this file for the make target | |
121 |
Path(generated).write_text( |
|
121 | Path(generated).write_text("") | |
122 |
|
122 | |||
123 | write_doc('terminal', 'Terminal IPython options', TerminalIPythonApp()) |
|
123 | write_doc('terminal', 'Terminal IPython options', TerminalIPythonApp()) | |
124 | write_doc('kernel', 'IPython kernel options', IPKernelApp(), |
|
124 | write_doc('kernel', 'IPython kernel options', IPKernelApp(), |
@@ -63,5 +63,5 b" for name, func in sorted(magics['cell'].items(), key=sortkey):" | |||||
63 | ""]) |
|
63 | ""]) | |
64 |
|
64 | |||
65 | here = os.path.dirname(__file__) |
|
65 | here = os.path.dirname(__file__) | |
66 |
dest = Path(os.path.join(here, |
|
66 | dest = Path(os.path.join(here, "source", "interactive", "magics-generated.txt")) | |
67 | dest.write_text("\n".join(output)) |
|
67 | dest.write_text("\n".join(output)) |
General Comments 0
You need to be logged in to leave comments.
Login now