Change in vdsm[master]: utils: Introduce CallbackChain

asegurap at redhat.com asegurap at redhat.com
Thu Nov 21 23:25:19 UTC 2013


Antoni Segura Puimedon has posted comments on this change.

Change subject: utils: Introduce CallbackChain
......................................................................


Patch Set 11:

(1 comment)

....................................................
File tests/utilsTests.py
Line 160:         self.assertFalse(chain.callbacks)
Line 161:         chain.start()
Line 162:         chain.join()
Line 163:         # assert exception isn't thrown in start on empty chain
Line 164:         self.assertTrue(True)
What is this test checking? That there is no exception raised? If that is the case, shouldn't it be enough without the assertTrue?

If you really want a more meaningful error when there is exception, i.e., your own string, you'd have to make something equivalent of the assertRaises but for the negative case.
Line 165: 
Line 166:     def testAllCallbacksAreInvokedIfTheyReturnFalse(self):
Line 167:         n = 10
Line 168:         counter = [n]


-- 
To view, visit http://gerrit.ovirt.org/19228
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I5b35eeb3c7865945458801d13615c5dc92ebb5dd
Gerrit-PatchSet: 11
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Martin Betak <mbetak at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Martin Betak <mbetak at redhat.com>
Gerrit-Reviewer: Martin Sivák <msivak at redhat.com>
Gerrit-Reviewer: Michal Skrivanek <michal.skrivanek at redhat.com>
Gerrit-Reviewer: Peter V. Saveliev <peet at redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list