[Python-checkins] CVS: python/dist/src/Lib/test regrtest.py,1.52,1.53 test_support.py,1.33,1.34
Guido van Rossum
gvanrossum@users.sourceforge.net
Fri, 21 Sep 2001 13:45:46 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv11637
Modified Files:
regrtest.py test_support.py
Log Message:
Oops. I didn't expect that some tests (test_cookie) have expected
output *and* doctest stuff. Assuming the doctest stuff comes after the
expected output, this fixes that.
Index: regrtest.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/regrtest.py,v
retrieving revision 1.52
retrieving revision 1.53
diff -C2 -d -r1.52 -r1.53
*** regrtest.py 2001/09/21 20:31:52 1.52
--- regrtest.py 2001/09/21 20:45:44 1.53
***************
*** 288,292 ****
cfp = StringIO.StringIO()
try:
! save_stdout = sys.stdout
try:
if cfp:
--- 288,292 ----
cfp = StringIO.StringIO()
try:
! sys.save_stdout = sys.stdout
try:
if cfp:
***************
*** 302,313 ****
indirect_test()
finally:
! sys.stdout = save_stdout
! if cfp and test_support.output_comparison_denied():
! output = cfp.getvalue()
! cfp = None
! s = test + "\n"
! if output.startswith(s):
! output = output[len(s):]
! sys.stdout.write(output)
except (ImportError, test_support.TestSkipped), msg:
if not quiet:
--- 302,306 ----
indirect_test()
finally:
! sys.stdout = sys.save_stdout
except (ImportError, test_support.TestSkipped), msg:
if not quiet:
Index: test_support.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_support.py,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** test_support.py 2001/09/21 20:31:52 1.33
--- test_support.py 2001/09/21 20:45:44 1.34
***************
*** 33,36 ****
--- 33,37 ----
global _output_comparison
_output_comparison = 0
+ sys.stdout = sys.save_stdout
# regrtest's interface to _output_comparison.