From a34866d3ac30887fe8bd27151630b2b275099ff7 Mon Sep 17 00:00:00 2001 From: gfyoung Date: Tue, 10 Apr 2018 00:37:13 -0400 Subject: [PATCH] MAINT: Remove console_encode comments Closes gh-20616 --- pandas/io/formats/printing.py | 7 +------ pandas/tests/io/formats/test_printing.py | 16 ---------------- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/pandas/io/formats/printing.py b/pandas/io/formats/printing.py index e0f53f671017a..a101113da23ba 100644 --- a/pandas/io/formats/printing.py +++ b/pandas/io/formats/printing.py @@ -81,12 +81,7 @@ def _join_unicode(lines, sep=''): # It will always return unicode text which can handled by other # parts of the package without breakage. # -# 2) If you need to send something to the console, use console_encode(). -# -# console_encode() should (hopefully) choose the right encoding for you -# based on the encoding set in option "display.encoding" -# -# 3) if you need to write something out to file, use +# 2) if you need to write something out to file, use # pprint_thing_encoded(encoding). # # If no encoding is specified, it defaults to utf-8. Since encoding pure diff --git a/pandas/tests/io/formats/test_printing.py b/pandas/tests/io/formats/test_printing.py index ec34e7656e01f..c9c46d4a991ec 100644 --- a/pandas/tests/io/formats/test_printing.py +++ b/pandas/tests/io/formats/test_printing.py @@ -202,19 +202,3 @@ def test_enable_data_resource_formatter(self): assert formatters[mimetype].enabled # smoke test that it works self.display_formatter.format(cf) - - -# TODO: fix this broken test - -# def test_console_encode(): -# """ -# On Python 2, if sys.stdin.encoding is None (IPython with zmq frontend) -# common.console_encode should encode things as utf-8. -# """ -# if compat.PY3: -# pytest.skip - -# with tm.stdin_encoding(encoding=None): -# result = printing.console_encode(u"\u05d0") -# expected = u"\u05d0".encode('utf-8') -# assert (result == expected)