Show More
@@ -24,6 +24,7 b' from IPython.core.magic_arguments import (argument, magic_arguments,' | |||
|
24 | 24 | parse_argstring) |
|
25 | 25 | from IPython.testing.skipdoctest import skip_doctest |
|
26 | 26 | from IPython.utils import io |
|
27 | from IPython.utils.py3compat import cast_unicode_py2 | |
|
27 | 28 | |
|
28 | 29 | #----------------------------------------------------------------------------- |
|
29 | 30 | # Magics class implementation |
@@ -213,7 +214,7 b' class HistoryMagics(Magics):' | |||
|
213 | 214 | inline = "\n... ".join(inline.splitlines()) + "\n..." |
|
214 | 215 | print(inline, file=outfile) |
|
215 | 216 | if get_output and output: |
|
216 | print(output, file=outfile) | |
|
217 | print(cast_unicode_py2(output), file=outfile) | |
|
217 | 218 | |
|
218 | 219 | if close_at_end: |
|
219 | 220 | outfile.close() |
@@ -236,6 +236,16 b' def doctest_hist_op():' | |||
|
236 | 236 | >>> |
|
237 | 237 | """ |
|
238 | 238 | |
|
239 | def test_hist_pof(): | |
|
240 | ip = get_ipython() | |
|
241 | ip.run_cell(u"1+2", store_history=True) | |
|
242 | #raise Exception(ip.history_manager.session_number) | |
|
243 | #raise Exception(list(ip.history_manager._get_range_session())) | |
|
244 | with TemporaryDirectory() as td: | |
|
245 | tf = os.path.join(td, 'hist.py') | |
|
246 | ip.run_line_magic('history', '-pof %s' % tf) | |
|
247 | assert os.path.isfile(tf) | |
|
248 | ||
|
239 | 249 | |
|
240 | 250 | @dec.skip_without('sqlite3') |
|
241 | 251 | def test_macro(): |
General Comments 0
You need to be logged in to leave comments.
Login now