[Buildbot-commits] buildbot/buildbot/test test_svnpoller.py, 1.4, 1.5 test_vc.py, 1.86, 1.87
Brian Warner
warner at users.sourceforge.net
Sun Mar 30 01:30:03 UTC 2008
Update of /cvsroot/buildbot/buildbot/buildbot/test
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26618/buildbot/test
Modified Files:
test_svnpoller.py test_vc.py
Log Message:
[project @ #208:update-tests.patch]
Update unit tests to expect strings rather than ints for revisions.
Original author: dustin at v.igoro.us
Date: 2008-03-28 14:28:57+00:00
Index: test_svnpoller.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_svnpoller.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- test_svnpoller.py 6 Dec 2006 08:46:11 -0000 1.4
+++ test_svnpoller.py 30 Mar 2008 01:30:00 -0000 1.5
@@ -277,10 +277,10 @@
changes = s.create_changes(logentries)
self.failUnlessEqual(len(changes), 2)
self.failUnlessEqual(changes[0].branch, "branch")
- self.failUnlessEqual(changes[0].revision, 2)
+ self.failUnlessEqual(changes[0].revision, '2')
self.failUnlessEqual(changes[1].branch, "branch")
self.failUnlessEqual(changes[1].files, ["main.c"])
- self.failUnlessEqual(changes[1].revision, 3)
+ self.failUnlessEqual(changes[1].revision, '3')
# and now pull in r4
doc = s.parse_logs(make_changes_output(4))
@@ -290,7 +290,7 @@
changes = s.create_changes(logentries)
self.failUnlessEqual(len(changes), 1)
self.failUnlessEqual(changes[0].branch, None)
- self.failUnlessEqual(changes[0].revision, 4)
+ self.failUnlessEqual(changes[0].revision, '4')
self.failUnlessEqual(changes[0].files, ["version.c"])
def testFirstTime(self):
@@ -379,7 +379,7 @@
c = s.finished_changes[0]
self.failUnlessEqual(c.branch, "branch")
- self.failUnlessEqual(c.revision, 2)
+ self.failUnlessEqual(c.revision, '2')
self.failUnlessEqual(c.files, [''])
# TODO: this is what creating the branch looks like: a Change with a
# zero-length file. We should decide if we want filenames like this
@@ -412,13 +412,13 @@
c3 = s.finished_changes[1]
self.failUnlessEqual(c3.branch, "branch")
- self.failUnlessEqual(c3.revision, 3)
+ self.failUnlessEqual(c3.revision, '3')
self.failUnlessEqual(c3.files, ["main.c"])
self.failUnlessEqual(c3.comments, "commit_on_branch")
c4 = s.finished_changes[2]
self.failUnlessEqual(c4.branch, None)
- self.failUnlessEqual(c4.revision, 4)
+ self.failUnlessEqual(c4.revision, '4')
self.failUnlessEqual(c4.files, ["version.c"])
self.failUnlessEqual(c4.comments, "revised_to_2")
self.failUnless(abs(c4.when - time.time()) < 60)
Index: test_vc.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_vc.py,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -d -r1.86 -r1.87
--- test_vc.py 23 Mar 2008 03:41:01 -0000 1.86
+++ test_vc.py 30 Mar 2008 01:30:00 -0000 1.87
@@ -483,7 +483,7 @@
def checkGotRevision(self, bs, expected):
if self.has_got_revision:
- self.failUnlessEqual(bs.getProperty("got_revision"), expected)
+ self.failUnlessEqual(bs.getProperty("got_revision"), str(expected))
def checkGotRevisionIsLatest(self, bs):
expected = self.helper.trunk[-1]
More information about the Commits
mailing list