summaryrefslogtreecommitdiff
path: root/HACKING.rst
diff options
context:
space:
mode:
authorIhar Hrachyshka <ihrachys@redhat.com>2016-08-30 10:42:41 +0000
committerIhar Hrachyshka <ihrachys@redhat.com>2016-09-15 18:42:45 +0000
commit31e1aeb66b2d8abb0d8424e9550693fad6f37c1c (patch)
treef30a78a5ba79eed42ea678542d1eef1444c74ab4 /HACKING.rst
parent67f751f6df2cb269b7d8d6d099f16b96666043e0 (diff)
downloadneutron-31e1aeb66b2d8abb0d8424e9550693fad6f37c1c.tar.gz
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
Diffstat (limited to 'HACKING.rst')
-rw-r--r--HACKING.rst1
1 files changed, 1 insertions, 0 deletions
diff --git a/HACKING.rst b/HACKING.rst
index 5554ca9262..80d58701c6 100644
--- a/HACKING.rst
+++ b/HACKING.rst
@@ -29,6 +29,7 @@ Neutron Specific Commandments
- [N340] Check usage of <module>.i18n (and neutron.i18n)
- [N341] Check usage of _ from python builtins
- [N342] String interpolation should be delayed at logging calls.
+- [N343] Production code must not import from neutron.tests.*
- [N344] Python 3: Do not use filter(lambda obj: test(obj), data). Replace it
with [obj for obj in data if test(obj)].