[py-svn] r37936 - py/trunk/py/test/rsession

hpk at codespeak.net hpk at codespeak.net
Mon Feb 5 00:21:37 CET 2007


Author: hpk
Date: Mon Feb  5 00:21:35 2007
New Revision: 37936

Modified:
   py/trunk/py/test/rsession/hostmanage.py
   py/trunk/py/test/rsession/master.py
   py/trunk/py/test/rsession/rsession.py
Log:
minor cleanups


Modified: py/trunk/py/test/rsession/hostmanage.py
==============================================================================
--- py/trunk/py/test/rsession/hostmanage.py	(original)
+++ py/trunk/py/test/rsession/hostmanage.py	Mon Feb  5 00:21:35 2007
@@ -105,10 +105,10 @@
         dist_remotepython = self.config.getvalue("dist_remotepython")
         for host in self.sshhosts:
             host.initgateway(python=dist_remotepython)
-            host.gw.host = host # XXX would like to avoid it
+            host.gw.host = host
 
     def init_rsync(self, reporter):
-        # send each rsync roots  
+        # send each rsync root  
         roots = self.config.getvalue_pathlist("dist_rsync_roots")
         if roots is None:
             roots = [self.config.topdir]

Modified: py/trunk/py/test/rsession/master.py
==============================================================================
--- py/trunk/py/test/rsession/master.py	(original)
+++ py/trunk/py/test/rsession/master.py	Mon Feb  5 00:21:35 2007
@@ -33,8 +33,10 @@
             self.reporter(report.SendItem(self.channel, item))
 
 def itemgen(colitems, reporter, keyword, reporterror):
+    def rep(x):
+        reporterror(reporter, x)
     for x in colitems:
-        for y in x._tryiter(reporterror = lambda x: reporterror(reporter, x), keyword = keyword):
+        for y in x._tryiter(reporterror=rep, keyword=keyword):
             yield y
 
 def dispatch_loop(masternodes, itemgenerator, shouldstop, 

Modified: py/trunk/py/test/rsession/rsession.py
==============================================================================
--- py/trunk/py/test/rsession/rsession.py	(original)
+++ py/trunk/py/test/rsession/rsession.py	Mon Feb  5 00:21:35 2007
@@ -68,13 +68,13 @@
         return reporter, startserverflag
     
     def reporterror(reporter, data):
-            excinfo, item = data
-            if excinfo is None:
-                reporter(report.ItemStart(item))
-            elif excinfo.type is Skipped:
-                reporter(report.SkippedTryiter(excinfo, item))
-            else:
-                reporter(report.FailedTryiter(excinfo, item))
+        excinfo, item = data
+        if excinfo is None:
+            reporter(report.ItemStart(item))
+        elif excinfo.type is Skipped:
+            reporter(report.SkippedTryiter(excinfo, item))
+        else:
+            reporter(report.FailedTryiter(excinfo, item))
     reporterror = staticmethod(reporterror)
 
     def kill_server(self, startserverflag):



More information about the pytest-commit mailing list