From 2dce7a8ac50fc065a53a22d707701cfd59cafa9f 2014-01-24 02:24:01 From: Paul Ivanov Date: 2014-01-24 02:24:01 Subject: [PATCH] cleaner string/bytes solution, closes #4759 Thanks @takluyver for the suggestion. I'll eventually learn this strings/bytes/unicode stuff properly for Python3. --- diff --git a/IPython/terminal/tests/test_embed.py b/IPython/terminal/tests/test_embed.py index bbe007d..146b9e4 100644 --- a/IPython/terminal/tests/test_embed.py +++ b/IPython/terminal/tests/test_embed.py @@ -20,7 +20,7 @@ from IPython.utils.tempdir import NamedFileInTemporaryDirectory # Tests #----------------------------------------------------------------------------- -_sample_embed = """ +_sample_embed = b""" from __future__ import print_function import IPython @@ -33,12 +33,12 @@ IPython.embed() print('bye!') """ -_exit = "exit\r".encode('UTF-8') +_exit = b"exit\r" def test_ipython_embed(): """test that `IPython.embed()` works""" with NamedFileInTemporaryDirectory('file_with_embed.py') as f: - f.write(_sample_embed.encode('UTF-8')) + f.write(_sample_embed) f.flush() # run `python file_with_embed.py`