mailr10118 - in /branches/multi_processor_merge: ./ test_suite/relax_test_runner.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on January 06, 2010 - 19:02:
Author: bugman
Date: Wed Jan  6 19:02:34 2010
New Revision: 10118

URL: http://svn.gna.org/viewcvs/relax?rev=10118&view=rev
Log:
Merged revisions 10117 via svnmerge from 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/1.3

........
  r10117 | bugman | 2010-01-06 18:57:55 +0100 (Wed, 06 Jan 2010) | 6 lines
  
  Modified the IO redirection methods.
  
  The original IO streams are stored and then restore instead of 
sys.__stdout__ and sys.__stderr__.
  This might help in the multi-processor branch where IO redirection has gone 
haywire.
........

Modified:
    branches/multi_processor_merge/   (props changed)
    branches/multi_processor_merge/test_suite/relax_test_runner.py

Propchange: branches/multi_processor_merge/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Jan  6 19:02:34 2010
@@ -1,1 +1,1 @@
-/1.3:1-10112
+/1.3:1-10117

Modified: branches/multi_processor_merge/test_suite/relax_test_runner.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/multi_processor_merge/test_suite/relax_test_runner.py?rev=10118&r1=10117&r2=10118&view=diff
==============================================================================
--- branches/multi_processor_merge/test_suite/relax_test_runner.py (original)
+++ branches/multi_processor_merge/test_suite/relax_test_runner.py Wed Jan  6 
19:02:34 2010
@@ -42,6 +42,10 @@
         The start of STDOUT and STDERR capture occurs here.
         """
 
+        # Store the original STDOUT and STDERR for restoring later on.
+        self.orig_stdout = sys.stdout
+        self.orig_stderr = sys.stderr
+
         # Catch stdout and stderr.
         self.capt = StringIO()
         sys.stdout = self.capt
@@ -57,9 +61,9 @@
         The end of STDOUT and STDERR capture occurs here.
         """
 
-        # Restore stdout and stderr.
-        sys.stdout = sys.__stdout__
-        sys.stderr = sys.__stderr__
+        # Restore the IO streams.
+        sys.stdout = self.orig_stdout
+        sys.stderr = self.orig_stderr
 
 
     def addError(self, test, err):




Related Messages


Powered by MHonArc, Updated Wed Jan 06 19:20:02 2010