[py-svn] r37032 - py/branch/config/py/test/terminal

fijal at codespeak.net fijal at codespeak.net
Fri Jan 19 18:50:28 CET 2007


Author: fijal
Date: Fri Jan 19 18:50:17 2007
New Revision: 37032

Modified:
   py/branch/config/py/test/terminal/out.py
Log:
Change the behaviour to always call get_terminal_width, this should make TerminalSession adapt to terminal size changes.


Modified: py/branch/config/py/test/terminal/out.py
==============================================================================
--- py/branch/config/py/test/terminal/out.py	(original)
+++ py/branch/config/py/test/terminal/out.py	Fri Jan 19 18:50:17 2007
@@ -10,8 +10,9 @@
     def __init__(self, file):
         self.file = py.io.dupfile(file)
 
-    def sep(self, sepchar, title=None):
-        fullwidth = self.fullwidth
+    def sep(self, sepchar, title=None, fullwidth=None):
+        if not fullwidth:
+            fullwidth = self.fullwidth
         # the goal is to have the line be as long as possible
         # under the condition that len(line) <= fullwidth
         if title is not None:
@@ -37,7 +38,10 @@
     tty = True
     def __init__(self, file):
         super(TerminalOut, self).__init__(file)
-        self.fullwidth = terminal_helper.get_terminal_width()
+
+    def sep(self, sepchar, title=None):
+        super(TerminalOut, self).sep(sepchar, title,
+                                     terminal_helper.get_terminal_width())
 
     def write(self, s):
         self.file.write(str(s))



More information about the pytest-commit mailing list