##// END OF EJS Templates
unicode literals in notebook magic tests...
MinRK -
Show More
@@ -420,13 +420,13 b' def test_extension():'
420 def test_notebook_export_json():
420 def test_notebook_export_json():
421 with TemporaryDirectory() as td:
421 with TemporaryDirectory() as td:
422 outfile = os.path.join(td, "nb.ipynb")
422 outfile = os.path.join(td, "nb.ipynb")
423 _ip.ex(py3compat.u_format("u = {u}'héllo'"))
423 _ip.ex(py3compat.u_format(u"u = {u}'héllo'"))
424 _ip.magic("notebook -e %s" % outfile)
424 _ip.magic("notebook -e %s" % outfile)
425
425
426 def test_notebook_export_py():
426 def test_notebook_export_py():
427 with TemporaryDirectory() as td:
427 with TemporaryDirectory() as td:
428 outfile = os.path.join(td, "nb.py")
428 outfile = os.path.join(td, "nb.py")
429 _ip.ex(py3compat.u_format("u = {u}'héllo'"))
429 _ip.ex(py3compat.u_format(u"u = {u}'héllo'"))
430 _ip.magic("notebook -e %s" % outfile)
430 _ip.magic("notebook -e %s" % outfile)
431
431
432 def test_notebook_reformat_py():
432 def test_notebook_reformat_py():
@@ -435,7 +435,7 b' def test_notebook_reformat_py():'
435 with io.open(infile, 'w') as f:
435 with io.open(infile, 'w') as f:
436 current.write(nb0, f, 'json')
436 current.write(nb0, f, 'json')
437
437
438 _ip.ex(py3compat.u_format("u = {u}'héllo'"))
438 _ip.ex(py3compat.u_format(u"u = {u}'héllo'"))
439 _ip.magic("notebook -f py %s" % infile)
439 _ip.magic("notebook -f py %s" % infile)
440
440
441 def test_notebook_reformat_json():
441 def test_notebook_reformat_json():
@@ -444,7 +444,7 b' def test_notebook_reformat_json():'
444 with io.open(infile, 'w') as f:
444 with io.open(infile, 'w') as f:
445 current.write(nb0, f, 'py')
445 current.write(nb0, f, 'py')
446
446
447 _ip.ex(py3compat.u_format("u = {u}'héllo'"))
447 _ip.ex(py3compat.u_format(u"u = {u}'héllo'"))
448 _ip.magic("notebook -f ipynb %s" % infile)
448 _ip.magic("notebook -f ipynb %s" % infile)
449 _ip.magic("notebook -f json %s" % infile)
449 _ip.magic("notebook -f json %s" % infile)
450
450
General Comments 0
You need to be logged in to leave comments. Login now