yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #56775
[Bug 1621782] Re: Production code must not import from neutron.tests.*
Reviewed: https://review.openstack.org/367340
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=31e1aeb66b2d8abb0d8424e9550693fad6f37c1c
Submitter: Jenkins
Branch: master
commit 31e1aeb66b2d8abb0d8424e9550693fad6f37c1c
Author: Ihar Hrachyshka <ihrachys@xxxxxxxxxx>
Date: Tue Aug 30 10:42:41 2016 +0000
Forbid importing neutron.tests.* from outside tests subtree
neutron-sanity-check tool was importing neutron.tests.base module, which
may be not present on some systems (f.e. RDO splits neutron/tests/
subtree in a separate python-neutron-tests package). It made the tool
not usable in some setups.
https://bugzilla.redhat.com/show_bug.cgi?id=1374282
This is not the first time when we by mistake import from
neutron.tests.* and break distributions. It's time to stop it by
proactively forbidding that pattern via a new hacking check.
Some functions were moved from neutron.tests.base to
neutron.common.utils to fulfill the need requirement. They were moved
using debtcollector, no current consumers should be affected.
Closes-Bug: #1621782
Change-Id: I790777ddcbd1b02218b3db54ae3d5c931d72d4fa
** Changed in: neutron
Status: In Progress => Fix Released
** Bug watch added: Red Hat Bugzilla #1374282
https://bugzilla.redhat.com/show_bug.cgi?id=1374282
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1621782
Title:
Production code must not import from neutron.tests.*
Status in neutron:
Fix Released
Bug description:
sanity-check tool for one imports some util functions from
neutron.tests.base. This makes distributions that split out tests
subtree in a separate package somewhat broken.
It's my belief we should really enforce the requirement via hacking
check, otherwise we will hit similar issues in the future.
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1621782/+subscriptions
References