##// END OF EJS Templates
Specify encoding for io.open in notebook_reformat tests.
Thomas Kluyver -
Show More
@@ -451,7 +451,7 b' def test_notebook_export_py():'
451 def test_notebook_reformat_py():
451 def test_notebook_reformat_py():
452 with TemporaryDirectory() as td:
452 with TemporaryDirectory() as td:
453 infile = os.path.join(td, "nb.ipynb")
453 infile = os.path.join(td, "nb.ipynb")
454 with io.open(infile, 'w') as f:
454 with io.open(infile, 'w', encoding='utf-8') as f:
455 current.write(nb0, f, 'json')
455 current.write(nb0, f, 'json')
456
456
457 _ip.ex(py3compat.u_format(u"u = {u}'héllo'"))
457 _ip.ex(py3compat.u_format(u"u = {u}'héllo'"))
@@ -460,7 +460,7 b' def test_notebook_reformat_py():'
460 def test_notebook_reformat_json():
460 def test_notebook_reformat_json():
461 with TemporaryDirectory() as td:
461 with TemporaryDirectory() as td:
462 infile = os.path.join(td, "nb.py")
462 infile = os.path.join(td, "nb.py")
463 with io.open(infile, 'w') as f:
463 with io.open(infile, 'w', encoding='utf-8') as f:
464 current.write(nb0, f, 'py')
464 current.write(nb0, f, 'py')
465
465
466 _ip.ex(py3compat.u_format(u"u = {u}'héllo'"))
466 _ip.ex(py3compat.u_format(u"u = {u}'héllo'"))
General Comments 0
You need to be logged in to leave comments. Login now