Update of /cvsroot/happydoc/HappyDoc/happydoclib
In directory usw-pr-cvs1:/tmp/cvs-serv12410/happydoclib
Modified Files:
StreamFlushTest.py
Log Message:
Only capture stdout and stderr if we've been given the name of a
directory to receive the files.
Index: StreamFlushTest.py
===================================================================
RCS file: /cvsroot/happydoc/HappyDoc/happydoclib/StreamFlushTest.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** StreamFlushTest.py 12 May 2002 20:17:06 -0000 1.4
--- StreamFlushTest.py 4 Aug 2002 10:47:06 -0000 1.5
***************
*** 137,151 ****
try:
unittest.TestCase.__call__(self, result)
! except:
self.popStreams()
! raise
! self.popStreams()
! sys.stdout.flush()
! sys.stderr.flush()
return
def pushStreams(self):
"Substitute files for the sys streams"
! if verboseLevel < 2:
output_dir = os.path.join(self.output_dir, self.name)
self.saved_sys_stdout = sys.stdout
--- 137,149 ----
try:
unittest.TestCase.__call__(self, result)
! finally:
self.popStreams()
! sys.stdout.flush()
! sys.stderr.flush()
return
def pushStreams(self):
"Substitute files for the sys streams"
! if verboseLevel < 2 and self.output_dir:
output_dir = os.path.join(self.output_dir, self.name)
self.saved_sys_stdout = sys.stdout
***************
*** 160,164 ****
def popStreams(self):
"Replace the real sys streams"
! if verboseLevel < 2:
sys.stdout.close()
sys.stderr.close()
--- 158,162 ----
def popStreams(self):
"Replace the real sys streams"
! if verboseLevel < 2 and self.output_dir:
sys.stdout.close()
sys.stderr.close()
|