Change in vdsm[master]: tests: Add assertNotRaises assertion
nsoffer at redhat.com
nsoffer at redhat.com
Mon Jun 9 05:30:43 UTC 2014
Nir Soffer has posted comments on this change.
Change subject: tests: Add assertNotRaises assertion
......................................................................
Patch Set 1:
(2 comments)
http://gerrit.ovirt.org/#/c/28177/1/tests/testrunnerTests.py
File tests/testrunnerTests.py:
Line 34:
Line 35:
Line 36: class TestRunnerTests(VdsmTestCase):
Line 37:
Line 38: def test_context_failure(self):
> test_assertNotRaises is a bad name, mixing underscore_andMixedCase - the wo
Will rename to test_contextmanager_failure
Line 39: with self.assertRaises(self.failureException):
Line 40: with self.assertNotRaises(Error):
Line 41: raise Error("generated error")
Line 42:
Line 41: raise Error("generated error")
Line 42:
Line 43: def test_context_pass(self):
Line 44: with self.assertNotRaises(Error):
Line 45: raise OtherError("generated error")
> Will remove.
Ignore previous comment - will rename to test_contextmanager_pass, and will not raise anyting in the block.
Line 46:
Line 47: def test_inline_failure(self):
Line 48: def func():
Line 49: raise Error("generated error")
--
To view, visit http://gerrit.ovirt.org/28177
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I33c96ca855753a75ffe2f82bdecab2e1612da08a
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: Xavi Francisco <xfrancis at redhat.com>
Gerrit-Reviewer: Yoav Kleinberger <ykleinbe at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list