##// END OF EJS Templates
Add test for writing non-ascii characters to file with %hist.
Thomas Kluyver -
Show More
@@ -7,6 +7,7 b''
7 7
8 8 # stdlib
9 9 import os
10 import shutil
10 11 import sys
11 12 import tempfile
12 13 import unittest
@@ -51,6 +52,14 b' def test_history():'
51 52 # Check whether specifying a range beyond the end of the current
52 53 # session results in an error (gh-804)
53 54 ip.magic('%hist 2-500')
55
56 # Check that we can write non-ascii characters to a file
57 tmpdir = tempfile.mkdtemp()
58 try:
59 ip.magic("%%hist -f %s" % os.path.join(tmpdir, "test1"))
60 ip.magic("%%save %s 1-10" % os.path.join(tmpdir, "test2"))
61 finally:
62 shutil.rmtree(tmpdir)
54 63
55 64 # New session
56 65 ip.history_manager.reset()
General Comments 0
You need to be logged in to leave comments. Login now