[Zope3-checkins] SVN: Zope3/trunk/src/zdaemon/tests/testzdrun.py Renamed run() method to _run(). Python 2.4's unittest.TestCase class

Derrick Hudson dman at dman13.dyndns.org
Wed Jan 19 19:33:01 EST 2005


Log message for revision 28881:
  Renamed run() method to _run().  Python 2.4's unittest.TestCase class
  defines all of the test logic in the run() method instead of in __call__()
  (as 2.3 did).  The rename prevents overriding the base implementation and
  causing the tests to fail.
  

Changed:
  U   Zope3/trunk/src/zdaemon/tests/testzdrun.py

-=-
Modified: Zope3/trunk/src/zdaemon/tests/testzdrun.py
===================================================================
--- Zope3/trunk/src/zdaemon/tests/testzdrun.py	2005-01-19 22:19:34 UTC (rev 28880)
+++ Zope3/trunk/src/zdaemon/tests/testzdrun.py	2005-01-20 00:33:00 UTC (rev 28881)
@@ -90,7 +90,7 @@
         ##os.system("PYTHONPATH=%s %s %s -s %s %s &" %
         ##    (self.ppath, self.python, self.zdrun, self.zdsock, args))
 
-    def run(self, args, cmdclass=None):
+    def _run(self, args, cmdclass=None):
         if type(args) is type(""):
             args = args.split()
         try:
@@ -102,7 +102,7 @@
         class MyCmd(zdctl.ZDCmd):
             def do_sproing(self, rest):
                 print rest
-        self.run("-p echo sproing expected", cmdclass=MyCmd)
+        self._run("-p echo sproing expected", cmdclass=MyCmd)
         self.expect = "expected\n"
 
     def testSystem(self):
@@ -110,27 +110,27 @@
         self.expect = ""
 
 ##     def testInvoke(self):
-##         self.run("echo -n")
+##         self._run("echo -n")
 ##         self.expect = ""
 
 ##     def testControl(self):
 ##         self.rundaemon(["sleep", "1000"])
 ##         time.sleep(1)
-##         self.run("stop")
+##         self._run("stop")
 ##         time.sleep(1)
-##         self.run("exit")
+##         self._run("exit")
 ##         self.expect = "Sent SIGTERM\nExiting now\n"
 
 ##     def testStop(self):
 ##         self.rundaemon([self.python, self.nokill])
 ##         time.sleep(1)
-##         self.run("stop")
+##         self._run("stop")
 ##         time.sleep(1)
-##         self.run("exit")
+##         self._run("exit")
 ##         self.expect = "Sent SIGTERM\nSent SIGTERM; will exit later\n"
 
     def testHelp(self):
-        self.run("-h")
+        self._run("-h")
         import __main__
         self.expect = __main__.__doc__
 



More information about the Zope3-Checkins mailing list