Skip to content
Browse files

Specify encoding for io.open in notebook_reformat tests.

  • Loading branch information...
1 parent 47367a0 commit fe9de671d2bbf5aa28fcca4239289818640b4a21 @takluyver committed Apr 15, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 IPython/core/tests/test_magic.py
View
4 IPython/core/tests/test_magic.py
@@ -451,7 +451,7 @@ def test_notebook_export_py():
def test_notebook_reformat_py():
with TemporaryDirectory() as td:
infile = os.path.join(td, "nb.ipynb")
- with io.open(infile, 'w') as f:
+ with io.open(infile, 'w', encoding='utf-8') as f:
current.write(nb0, f, 'json')
_ip.ex(py3compat.u_format(u"u = {u}'héllo'"))
@@ -460,7 +460,7 @@ def test_notebook_reformat_py():
def test_notebook_reformat_json():
with TemporaryDirectory() as td:
infile = os.path.join(td, "nb.py")
- with io.open(infile, 'w') as f:
+ with io.open(infile, 'w', encoding='utf-8') as f:
current.write(nb0, f, 'py')
_ip.ex(py3compat.u_format(u"u = {u}'héllo'"))

0 comments on commit fe9de67

Please sign in to comment.
Something went wrong with that request. Please try again.