From c749e44efc37c2792b0d1257930a24c74b4a7251 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Wed, 29 Apr 2020 16:37:38 +0300 Subject: [PATCH] terminalwriter: remove custom win32 screen width code Python 3 does this on its own so we can use the shared code: https://github.com/python/cpython/commit/bcf2b59fb5f18c09a26da3e9b60a37367f2a28ba --- src/_pytest/_io/terminalwriter.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/_pytest/_io/terminalwriter.py b/src/_pytest/_io/terminalwriter.py index 17740e83e..6ff39111a 100644 --- a/src/_pytest/_io/terminalwriter.py +++ b/src/_pytest/_io/terminalwriter.py @@ -415,13 +415,6 @@ if win32_and_ctypes: _GetConsoleScreenBufferInfo(handle, ctypes.byref(info)) return info - def _getdimensions(): # noqa: F811 - handle = GetStdHandle(STD_OUTPUT_HANDLE) - info = GetConsoleInfo(handle) - # Substract one from the width, otherwise the cursor wraps - # and the ending \n causes an empty line to display. - return info.dwSize.Y, info.dwSize.X - 1 - def write_out(fil, msg): # XXX sometimes "msg" is of type bytes, sometimes text which