##// END OF EJS Templates
specify encoding when opening file in test_history...
MinRK -
Show More
@@ -93,7 +93,7 b' def test_history():'
93 # Cross testing: check that magic %save can get previous session.
93 # Cross testing: check that magic %save can get previous session.
94 testfilename = os.path.realpath(os.path.join(tmpdir, "test.py"))
94 testfilename = os.path.realpath(os.path.join(tmpdir, "test.py"))
95 ip.magic("save " + testfilename + " ~1/1-3")
95 ip.magic("save " + testfilename + " ~1/1-3")
96 with py3compat.open(testfilename) as testfile:
96 with py3compat.open(testfilename, encoding='utf-8') as testfile:
97 nt.assert_equal(testfile.read(),
97 nt.assert_equal(testfile.read(),
98 u"# coding: utf-8\n" + u"\n".join(hist))
98 u"# coding: utf-8\n" + u"\n".join(hist))
99
99
General Comments 0
You need to be logged in to leave comments. Login now