Change in vdsm[master]: tests: Add assertNotRaises assertion
asegurap at redhat.com
asegurap at redhat.com
Thu May 29 21:22:28 UTC 2014
Antoni Segura Puimedon has posted comments on this change.
Change subject: tests: Add assertNotRaises assertion
......................................................................
Patch Set 1: Code-Review-1
(3 comments)
http://gerrit.ovirt.org/#/c/28177/1/tests/testrunner.py
File tests/testrunner.py:
Line 1: #
Line 2: # Copyright 2012 Red Hat, Inc.
Since I asked for a change, do you mind updating the copyright?
Line 3: #
Line 4: # This program is free software; you can redistribute it and/or modify
Line 5: # it under the terms of the GNU General Public License as published by
Line 6: # the Free Software Foundation; either version 2 of the License, or
Line 333: def not_raises(unexpected, test_case):
Line 334: try:
Line 335: yield
Line 336: except unexpected as e:
Line 337: raise test_case.failureException("Excption raised: %s" % e)
typo s/xcp/xcep/
Line 338: except:
Line 339: pass
Line 340:
Line 341:
Line 335: yield
Line 336: except unexpected as e:
Line 337: raise test_case.failureException("Excption raised: %s" % e)
Line 338: except:
Line 339: pass
Here it should raise. Otherwise when raising other things that the one that shouldn't be raised you are swallowing test errors.
Line 340:
Line 341:
Line 342: # FIXME: This is a forward port of the assertIn from python
Line 343: # 2.7, remove when no loger supporting earlier versions
--
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: 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