summaryrefslogtreecommitdiff
path: root/src/_pytest/_io
diff options
context:
space:
mode:
authorRan Benita <ran@unusedvar.com>2020-04-29 16:15:23 +0300
committerRan Benita <ran@unusedvar.com>2020-04-30 16:44:02 +0300
commit0528307ebfc08aa8b826d2905c827fcdd6a86419 (patch)
treef6d97c9219deed0e48bd3960a996f939bdfccbf2 /src/_pytest/_io
parenta6819726cdaf05a479fcc5f74d2f091f85b672c7 (diff)
downloadpytest-0528307ebfc08aa8b826d2905c827fcdd6a86419.tar.gz
terminalwriter: remove unused function TerminalWriter.reline
Diffstat (limited to 'src/_pytest/_io')
-rw-r--r--src/_pytest/_io/terminalwriter.py22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/_pytest/_io/terminalwriter.py b/src/_pytest/_io/terminalwriter.py
index 6e77f2ebf..c11eb9aba 100644
--- a/src/_pytest/_io/terminalwriter.py
+++ b/src/_pytest/_io/terminalwriter.py
@@ -96,7 +96,6 @@ class TerminalWriter:
self.encoding = encoding or getattr(file, "encoding", "utf-8")
self._file = file
self.hasmarkup = should_do_markup(file)
- self._lastlen = 0
self._chars_on_current_line = 0
self._width_of_current_line = 0
@@ -114,11 +113,6 @@ class TerminalWriter:
def chars_on_current_line(self):
"""Return the number of characters written so far in the current line.
- Please note that this count does not produce correct results after a reline() call,
- see #164.
-
- .. versionadded:: 1.5.0
-
:rtype: int
"""
return self._chars_on_current_line
@@ -127,8 +121,6 @@ class TerminalWriter:
def width_of_current_line(self):
"""Return an estimate of the width so far in the current line.
- .. versionadded:: 1.6.0
-
:rtype: int
"""
return self._width_of_current_line
@@ -200,22 +192,8 @@ class TerminalWriter:
def line(self, s: str = "", **kw):
self.write(s, **kw)
- self._checkfill(s)
self.write("\n")
- def reline(self, line: str, **kw):
- if not self.hasmarkup:
- raise ValueError("cannot use rewrite-line without terminal")
- self.write(line, **kw)
- self._checkfill(line)
- self.write("\r")
- self._lastlen = len(line)
-
- def _checkfill(self, line: str) -> None:
- diff2last = self._lastlen - len(line)
- if diff2last > 0:
- self.write(" " * diff2last)
-
class WriteFile:
def __init__(self, writemethod, encoding=None):