##// 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
@@ -52,6 +53,14 b' def test_history():'
52 53 # session results in an error (gh-804)
53 54 ip.magic('%hist 2-500')
54 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)
63
55 64 # New session
56 65 ip.history_manager.reset()
57 66 newcmds = ["z=5","class X(object):\n pass", "k='p'"]
General Comments 0
You need to be logged in to leave comments. Login now