[Buildbot-commits] buildbot/buildbot/test test_runner.py,1.7,1.8 test_config.py,1.20,1.21 test_status.py,1.19,1.20
Brian Warner
warner at users.sourceforge.net
Sun May 22 02:16:16 UTC 2005
Update of /cvsroot/buildbot/buildbot/buildbot/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6844/buildbot/test
Modified Files:
test_runner.py test_config.py test_status.py
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-214
Creator: Brian Warner <warner at monolith.lothar.com>
fix tests to run without a full Twisted-2.0.0 (Sumo) installation
* buildbot/test/test_runner.py (Create.testMaster): match the
rawstring change in runner.py:masterTAC
* buildbot/test/test_config.py (ConfigTest.testIRC): skip unless
TwistedWords is installed
* buildbot/test/test_status.py: same, with TwistedMail
* buildbot/master.py: remove old IRC/Waterfall imports (used by
some old, deprecated, and removed config keys). This should enable
you to use the base buildbot functionality with Twisted-2.0.0 when
you don't also have TwistedWeb and TwistedWords installed
Index: test_config.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_config.py,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- test_config.py 17 May 2005 10:14:10 -0000 1.20
+++ test_config.py 22 May 2005 02:16:13 -0000 1.21
@@ -24,7 +24,11 @@
from buildbot.process.factory import BasicBuildFactory
from buildbot.process.interlock import Interlock
from buildbot.process import step
-from buildbot.status import words, html, builder
+from buildbot.status import html, builder
+try:
+ from buildbot.status import words
+except ImportError:
+ words = None
import sys
from twisted.python import log
@@ -677,6 +681,8 @@
self.failUnlessEqual(ircs, expected)
def testIRC(self):
+ if not words:
+ raise unittest.SkipTest("Twisted Words package is not installed")
master = self.buildmaster
master.loadChanges()
d = master.loadConfig(emptyCfg)
Index: test_runner.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_runner.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- test_runner.py 18 May 2005 01:59:53 -0000 1.7
+++ test_runner.py 22 May 2005 02:16:13 -0000 1.8
@@ -63,7 +63,7 @@
self.failUnless(os.path.exists(tac))
tacfile = open(tac,"rt").read()
self.failUnlessIn("basedir", tacfile)
- self.failUnlessIn("configfile = 'master.cfg'", tacfile)
+ self.failUnlessIn("configfile = r'master.cfg'", tacfile)
self.failUnlessIn("BuildMaster(basedir, configfile)", tacfile)
cfg = os.path.join(basedir, "master.cfg")
Index: test_status.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_status.py,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- test_status.py 17 May 2005 10:14:10 -0000 1.19
+++ test_status.py 22 May 2005 02:16:13 -0000 1.20
@@ -8,7 +8,11 @@
from buildbot import interfaces
from buildbot.twcompat import implements, providedBy
-from buildbot.status import mail, builder
+from buildbot.status import builder
+try:
+ from buildbot.status import mail
+except ImportError:
+ mail = None
from buildbot.status import progress, client # NEEDS COVERAGE
class MyStep:
@@ -53,9 +57,10 @@
def finish(self):
self.finished = True
-class MyMailer(mail.MailNotifier):
- def sendMessage(self, m, recipients):
- self.parent.messages.append((m, recipients))
+if mail:
+ class MyMailer(mail.MailNotifier):
+ def sendMessage(self, m, recipients):
+ self.parent.messages.append((m, recipients))
class MyStatus:
def getBuildbotURL(self):
@@ -322,6 +327,9 @@
reactor.callLater(0.1, d.callback, None)
dr(d)
+if not mail:
+ Mail.skip = "the Twisted Mail package is not installed"
+
class Progress(unittest.TestCase):
def testWavg(self):
bp = progress.BuildProgress([])
More information about the Commits
mailing list