##// END OF EJS Templates
Merge pull request #5841 from takluyver/i2412...
Min RK -
r16724:6fa735fb merge
parent child Browse files
Show More
@@ -24,6 +24,7 b' from IPython.core.magic_arguments import (argument, magic_arguments,'
24 parse_argstring)
24 parse_argstring)
25 from IPython.testing.skipdoctest import skip_doctest
25 from IPython.testing.skipdoctest import skip_doctest
26 from IPython.utils import io
26 from IPython.utils import io
27 from IPython.utils.py3compat import cast_unicode_py2
27
28
28 #-----------------------------------------------------------------------------
29 #-----------------------------------------------------------------------------
29 # Magics class implementation
30 # Magics class implementation
@@ -213,7 +214,7 b' class HistoryMagics(Magics):'
213 inline = "\n... ".join(inline.splitlines()) + "\n..."
214 inline = "\n... ".join(inline.splitlines()) + "\n..."
214 print(inline, file=outfile)
215 print(inline, file=outfile)
215 if get_output and output:
216 if get_output and output:
216 print(output, file=outfile)
217 print(cast_unicode_py2(output), file=outfile)
217
218
218 if close_at_end:
219 if close_at_end:
219 outfile.close()
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 @dec.skip_without('sqlite3')
250 @dec.skip_without('sqlite3')
241 def test_macro():
251 def test_macro():
General Comments 0
You need to be logged in to leave comments. Login now