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