[Buildbot-commits] buildbot/buildbot/test test_scheduler.py,1.8,1.9
Brian Warner
warner at users.sourceforge.net
Sun Nov 27 03:58:50 UTC 2005
Update of /cvsroot/buildbot/buildbot/buildbot/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32305/buildbot/test
Modified Files:
test_scheduler.py
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-448
Creator: Brian Warner <warner at lothar.com>
fix AnyBranchScheduler to handle branch==None, merge release--0.7.1
* buildbot/scheduler.py (AnyBranchScheduler.addChange): don't
explode when branch==None, thanks to Kevin Turner for the catch
* buildbot/test/test_scheduler.py (Scheduling.testAnyBranch): test
it
* buildbot/__init__.py (version): bump to 0.7.1+ while between
releases
* docs/buildbot.texinfo: same
Index: test_scheduler.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_scheduler.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- test_scheduler.py 26 Nov 2005 02:09:24 -0000 1.8
+++ test_scheduler.py 27 Nov 2005 03:58:48 -0000 1.9
@@ -142,26 +142,36 @@
c4 = Change("carol", ["important"], "other branch", branch="branch2")
s.addChange(c4)
+ c5 = Change("carol", ["important"], "default branch", branch=None)
+ s.addChange(c5)
+
d = defer.Deferred()
reactor.callLater(2, d.callback, None)
d.addCallback(self._testAnyBranch_1)
return maybeWait(d)
def _testAnyBranch_1(self, res):
- self.failUnlessEqual(len(self.master.sets), 2)
+ self.failUnlessEqual(len(self.master.sets), 3)
self.master.sets.sort(lambda a,b: cmp(a.source.branch,
b.source.branch))
+
s1 = self.master.sets[0].source
- self.failUnlessEqual(s1.branch, "branch1")
+ self.failUnlessEqual(s1.branch, None)
self.failUnlessEqual(s1.revision, None)
- self.failUnlessEqual(len(s1.changes), 3)
+ self.failUnlessEqual(len(s1.changes), 1)
self.failUnlessEqual(s1.patch, None)
s2 = self.master.sets[1].source
- self.failUnlessEqual(s2.branch, "branch2")
+ self.failUnlessEqual(s2.branch, "branch1")
self.failUnlessEqual(s2.revision, None)
- self.failUnlessEqual(len(s2.changes), 1)
+ self.failUnlessEqual(len(s2.changes), 3)
self.failUnlessEqual(s2.patch, None)
+ s3 = self.master.sets[2].source
+ self.failUnlessEqual(s3.branch, "branch2")
+ self.failUnlessEqual(s3.revision, None)
+ self.failUnlessEqual(len(s3.changes), 1)
+ self.failUnlessEqual(s3.patch, None)
+
def testAnyBranch2(self):
# like testAnyBranch but without fileIsImportant
s = scheduler.AnyBranchScheduler("b1", None, 2, ["a","b"])
@@ -178,6 +188,7 @@
c4 = Change("carol", ["important"], "other branch", branch="branch2")
s.addChange(c4)
+
d = defer.Deferred()
reactor.callLater(2, d.callback, None)
d.addCallback(self._testAnyBranch2_1)
More information about the Commits
mailing list