From f8d3a80af57a2865f1fbba8f901df3860cac4629 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Sun, 27 Jun 2010 18:17:47 -0500 Subject: [PATCH] name CollectOnlyReporter's output attribute "_tw" for consistency with TerminalReporter This fixes #92. --HG-- branch : trunk --- py/_plugin/pytest_terminal.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/py/_plugin/pytest_terminal.py b/py/_plugin/pytest_terminal.py index 84f3d505e..e94338b18 100644 --- a/py/_plugin/pytest_terminal.py +++ b/py/_plugin/pytest_terminal.py @@ -448,16 +448,16 @@ class CollectonlyReporter: self.config = config if out is None: out = py.std.sys.stdout - self.out = py.io.TerminalWriter(out) + self._tw = py.io.TerminalWriter(out) self.indent = "" self._failed = [] def outindent(self, line): - self.out.line(self.indent + str(line)) + self._tw.line(self.indent + str(line)) def pytest_internalerror(self, excrepr): for line in str(excrepr).split("\n"): - self.out.line("INTERNALERROR> " + line) + self._tw.line("INTERNALERROR> " + line) def pytest_collectstart(self, collector): self.outindent(collector) @@ -474,9 +474,9 @@ class CollectonlyReporter: def pytest_sessionfinish(self, session, exitstatus): if self._failed: - self.out.sep("!", "collection failures") + self._tw.sep("!", "collection failures") for rep in self._failed: - rep.toterminal(self.out) + rep.toterminal(self._tw) def repr_pythonversion(v=None):