[Buildbot-commits] buildbot/buildbot/test test_p4poller.py, 1.7, 1.8

Brian Warner warner at users.sourceforge.net
Thu Nov 22 01:04:28 UTC 2007


Update of /cvsroot/buildbot/buildbot/buildbot/test
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv32459/buildbot/test

Modified Files:
	test_p4poller.py 
Log Message:
[project @ test_p4poller.py: update test to match ignore-failures change in #135]

Original author: warner at lothar.com
Date: 2007-11-22 01:03:07+00:00

Index: test_p4poller.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_p4poller.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- test_p4poller.py	17 Apr 2007 06:38:51 -0000	1.7
+++ test_p4poller.py	22 Nov 2007 01:04:26 -0000	1.8
@@ -153,22 +153,21 @@
         return when
 
     def testFailedChanges(self):
-        """'p4 changes' failure is properly reported"""
+        """'p4 changes' failure is properly ignored"""
         self.t = MockP4Source(p4changes=['Perforce client error:\n...'],
                               p4change={},
                               p4port=None, p4user=None)
         self.t.parent = self
         d = self.t.checkp4()
-        d.addBoth(self._testFailedChanges2)
+        d.addCallback(self._testFailedChanges2)
         return d
 
     def _testFailedChanges2(self, f):
-        self.assert_(isinstance(f, failure.Failure))
-        self.failUnlessIn('Perforce client error', str(f))
+        self.failUnlessEqual(f, None)
         self.assert_(not self.t.working)
 
     def testFailedDescribe(self):
-        """'p4 describe' failure is properly reported"""
+        """'p4 describe' failure is properly ignored"""
         c = dict(p4change)
         c[3] = 'Perforce client error:\n...'
         self.t = MockP4Source(p4changes=[first_p4changes, second_p4changes],
@@ -180,11 +179,10 @@
 
     def _testFailedDescribe2(self, res):
         # first time finds nothing; check again.
-        return self.t.checkp4().addBoth(self._testFailedDescribe3)
+        return self.t.checkp4().addCallback(self._testFailedDescribe3)
 
     def _testFailedDescribe3(self, f):
-        self.assert_(isinstance(f, failure.Failure))
-        self.failUnlessIn('Perforce client error', str(f))
+        self.failUnlessEqual(f, None)
         self.assert_(not self.t.working)
         self.assertEquals(self.t.last_change, 2)
 





More information about the Commits mailing list