[Buildbot-commits] buildbot/buildbot/test test_bonsaipoller.py, 1.2, 1.3
Brian Warner
warner at users.sourceforge.net
Sat Sep 29 20:47:26 UTC 2007
Update of /cvsroot/buildbot/buildbot/buildbot/test
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv22011/buildbot/test
Modified Files:
test_bonsaipoller.py
Log Message:
[project @ bonsaipoller: apply bugfixes from the mozilla folks. Closes #61.]
Original author: warner at lothar.com
Date: 2007-09-29 20:46:34+00:00
Index: test_bonsaipoller.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_bonsaipoller.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- test_bonsaipoller.py 24 Nov 2006 07:19:33 -0000 1.2
+++ test_bonsaipoller.py 29 Sep 2007 20:47:24 -0000 1.3
@@ -4,7 +4,6 @@
from buildbot.changes.bonsaipoller import FileNode, CiNode, BonsaiResult, \
BonsaiParser, BonsaiPoller, InvalidResultError, EmptyResult
-from StringIO import StringIO
from copy import deepcopy
import re
@@ -116,7 +115,7 @@
class TestBonsaiPoller(unittest.TestCase):
def testFullyFormedResult(self):
- br = BonsaiParser(StringIO(goodUnparsedResult))
+ br = BonsaiParser(goodUnparsedResult)
result = br.getData()
# make sure the result is a BonsaiResult
self.failUnless(isinstance(result, BonsaiResult))
@@ -126,49 +125,49 @@
def testBadUnparsedResult(self):
try:
- BonsaiParser(StringIO(badUnparsedResult))
+ BonsaiParser(badUnparsedResult)
self.fail(badResultMsgs["badUnparsedResult"])
except InvalidResultError:
pass
def testInvalidDateResult(self):
try:
- BonsaiParser(StringIO(invalidDateResult))
+ BonsaiParser(invalidDateResult)
self.fail(badResultMsgs["invalidDateResult"])
except InvalidResultError:
pass
def testMissingRevisionResult(self):
try:
- BonsaiParser(StringIO(missingRevisionResult))
+ BonsaiParser(missingRevisionResult)
self.fail(badResultMsgs["missingRevisionResult"])
except InvalidResultError:
pass
def testMissingFilenameResult(self):
try:
- BonsaiParser(StringIO(missingFilenameResult))
+ BonsaiParser(missingFilenameResult)
self.fail(badResultMsgs["missingFilenameResult"])
except InvalidResultError:
pass
def testDuplicateLogResult(self):
try:
- BonsaiParser(StringIO(duplicateLogResult))
+ BonsaiParser(duplicateLogResult)
self.fail(badResultMsgs["duplicateLogResult"])
except InvalidResultError:
pass
def testDuplicateFilesResult(self):
try:
- BonsaiParser(StringIO(duplicateFilesResult))
+ BonsaiParser(duplicateFilesResult)
self.fail(badResultMsgs["duplicateFilesResult"])
except InvalidResultError:
pass
def testMissingCiResult(self):
try:
- BonsaiParser(StringIO(missingCiResult))
+ BonsaiParser(missingCiResult)
self.fail(badResultMsgs["missingCiResult"])
except EmptyResult:
pass
@@ -177,6 +176,6 @@
"Make sure a change is not submitted if the BonsaiParser fails"
poller = FakeBonsaiPoller()
lastChangeBefore = poller.lastChange
- poller._process_changes(StringIO(badUnparsedResult))
+ poller._process_changes(badUnparsedResult)
# self.lastChange will not be updated if the change was not submitted
self.failUnlessEqual(lastChangeBefore, poller.lastChange)
More information about the Commits
mailing list