[py-svn] r52707 - py/trunk/py/test

fijal at codespeak.net fijal at codespeak.net
Tue Mar 18 21:57:45 CET 2008


Author: fijal
Date: Tue Mar 18 21:57:43 2008
New Revision: 52707

Modified:
   py/trunk/py/test/reporter.py
Log:
Allow some mocking.


Modified: py/trunk/py/test/reporter.py
==============================================================================
--- py/trunk/py/test/reporter.py	(original)
+++ py/trunk/py/test/reporter.py	Tue Mar 18 21:57:43 2008
@@ -49,12 +49,15 @@
         return self.flag
 
 class AbstractReporter(object):
-    def __init__(self, config, hosts):
+    def __init__(self, config, hosts, out=None):
         self.config = config
         self.hosts = hosts
         self.failed_tests_outcome = []
         self.skipped_tests_outcome = []
-        self.out = getout(py.std.sys.stdout)
+        if out is None:
+            self.out = getout(py.std.sys.stdout)
+        else:
+            self.out = out
         self.presenter = Presenter(self.out, config)
         self.to_rsync = {}
 


More information about the py-svn mailing list