##// END OF EJS Templates
Specify encoding in remainining instances of io.open
Thomas Kluyver -
Show More
@@ -911,7 +911,7 b' def _run_edit_test(arg_s, exp_filename=None,'
911 911 if exp_filename is not None:
912 912 nt.assert_equal(exp_filename, filename)
913 913 if exp_contents is not None:
914 with io.open(filename, 'r') as f:
914 with io.open(filename, 'r', encoding='utf-8') as f:
915 915 contents = f.read()
916 916 nt.assert_equal(exp_contents, contents)
917 917 if exp_lineno != -1:
@@ -108,7 +108,8 b' class APITest(NotebookTestBase):'
108 108
109 109 for d, name in self.dirs_nbs:
110 110 d = d.replace('/', os.sep)
111 with io.open(pjoin(nbdir, d, '%s.ipynb' % name), 'w') as f:
111 with io.open(pjoin(nbdir, d, '%s.ipynb' % name), 'w',
112 encoding='utf-8') as f:
112 113 nb = new_notebook(name=name)
113 114 write(nb, f, format='ipynb')
114 115
@@ -59,7 +59,8 b' class SessionAPITest(NotebookTestBase):'
59 59 if e.errno != errno.EEXIST:
60 60 raise
61 61
62 with io.open(pjoin(nbdir, 'foo', 'nb1.ipynb'), 'w') as f:
62 with io.open(pjoin(nbdir, 'foo', 'nb1.ipynb'), 'w',
63 encoding='utf-8') as f:
63 64 nb = new_notebook(name='nb1')
64 65 write(nb, f, format='ipynb')
65 66
General Comments 0
You need to be logged in to leave comments. Login now