[py-svn] py-trunk commit 803fa9a79e67: name CollectOnlyReporter's output attribute "_tw" for consistency with TerminalReporter

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Mon Jun 28 01:22:15 CEST 2010


# HG changeset patch -- Bitbucket.org
# Project py-trunk
# URL http://bitbucket.org/hpk42/py-trunk/overview
# User Benjamin Peterson <benjamin at python.org>
# Date 1277680667 18000
# Node ID 803fa9a79e67f26bdcb233227e573ff4dcf43b7c
# Parent  ccea760d64fe1b086f4fb3d8481f73b320af7e59
name CollectOnlyReporter's output attribute "_tw" for consistency with TerminalReporter

This fixes #92.

--- 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):



More information about the pytest-commit mailing list