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.
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
(cherry picked from commit 31e1aeb66b2d8abb0d8424e9550693fad6f37c1c)
Reviewed: https:/ /review. openstack. org/372822 /git.openstack. org/cgit/ openstack/ neutron/ commit/ ?id=ea8a1451b83 090c2c6a21c6059 22d16820e64b30
Committed: https:/
Submitter: Jenkins
Branch: stable/newton
commit ea8a1451b83090c 2c6a21c605922d1 6820e64b30
Author: Ihar Hrachyshka <email address hidden>
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 neutron- tests package). It made the tool
may be not present on some systems (f.e. RDO splits neutron/tests/
subtree in a separate python-
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 common. utils to fulfill the need requirement. They were moved
neutron.
using debtcollector, no current consumers should be affected.
Closes-Bug: #1621782 2218b3db54ae3d5 c931d72d4fa b0d8424e9550693 fad6f37c1c)
Change-Id: I790777ddcbd1b0
(cherry picked from commit 31e1aeb66b2d8ab