Exemplo n.º 1
0
 def test_finish_1(self):
     """
     Finishing a build with non-zero means the build failed.
     """
     b = Build()
     
     def cb_done(res):
         self.assertEqual(res, b)
     b.done.addCallback(cb_done)
     
     b._finish(1)
     self.assertEqual(b.status, 1)
     
     return b.done
Exemplo n.º 2
0
 def test_finish_0(self):
     """
     Finishing a build with 0 means the build succeeded.
     """
     b = Build()
     
     def cb_done(res):
         self.assertEqual(res, b)
     b.done.addCallback(cb_done)
     
     b._finish(0)
     self.assertEqual(b.status, 0)
     
     return b.done