yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #71636
[Bug 1754409] Re: invalid raise construct in test_build_resources_instance_not_found_before_yield
Reviewed: https://review.openstack.org/550914
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=c52d34f1b46f88ae2786cfb873f9b12a1a01b629
Submitter: Zuul
Branch: master
commit c52d34f1b46f88ae2786cfb873f9b12a1a01b629
Author: Balazs Gibizer <balazs.gibizer@xxxxxxxxxxxx>
Date: Thu Mar 8 17:53:16 2018 +0100
Raise a proper exception in unit test
Using the raise statement without parameter outside of an except block
is not a valid python constuct. The original intention was to simulate
a failure to see if the context manager handles it properly. This patch
replaces that invalid statement with a proper exception raise.
TrivialFix
Change-Id: I3c6fc0ab617796c70bac2a853504f46ae2adb536
Closes-Bug: #1754409
** Changed in: nova
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1754409
Title:
invalid raise construct in
test_build_resources_instance_not_found_before_yield
Status in OpenStack Compute (nova):
Fix Released
Bug description:
The test code in [1] uses `raise` statement without any parameter. It
is not a valid python construct if used outside of an `expect` block.
The test does not fail on this as this codepath never executed.
[1]
https://github.com/openstack/nova/blob/93a985d33662723872ec5eedd1a173dc397f96fa/nova/tests/unit/compute/test_compute_mgr.py#L5686
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1754409/+subscriptions
References