From fba472e3a61aaa791c71be394668875471e01858 Mon Sep 17 00:00:00 2001 From: Goutham Pacha Ravi Date: Wed, 11 Sep 2019 10:32:24 -0700 Subject: [PATCH] Move hacking checks to tests dir The test code isn't part of the service. Corresponding cinder change: I7b18453269cfc57bfbc9bd143d72948e88e60836 Change-Id: I71cc8b3154828f4aeea0afdf3fb59a79b8a8e707 Signed-off-by: Goutham Pacha Ravi --- manila/{ => tests}/hacking/__init__.py | 0 manila/{ => tests}/hacking/checks.py | 0 manila/tests/test_hacking.py | 13 +++++++------ tox.ini | 2 +- zuul.d/project.yaml | 1 - 5 files changed, 8 insertions(+), 8 deletions(-) rename manila/{ => tests}/hacking/__init__.py (100%) rename manila/{ => tests}/hacking/checks.py (100%) diff --git a/manila/hacking/__init__.py b/manila/tests/hacking/__init__.py similarity index 100% rename from manila/hacking/__init__.py rename to manila/tests/hacking/__init__.py diff --git a/manila/hacking/checks.py b/manila/tests/hacking/checks.py similarity index 100% rename from manila/hacking/checks.py rename to manila/tests/hacking/checks.py diff --git a/manila/tests/test_hacking.py b/manila/tests/test_hacking.py index 36b74e98dc..b5bb03ef8b 100644 --- a/manila/tests/test_hacking.py +++ b/manila/tests/test_hacking.py @@ -20,19 +20,20 @@ from unittest import mock import ddt import pycodestyle -from manila.hacking import checks from manila import test +from manila.tests.hacking import checks @ddt.ddt class HackingTestCase(test.TestCase): """Hacking test cases - This class tests the hacking checks in manila.hacking.checks by passing - strings to the check methods like the pep8/flake8 parser would. The parser - loops over each line in the file and then passes the parameters to the - check method. The parameter names in the check method dictate what type of - object is passed to the check method. The parameter types are:: + This class tests the hacking checks in manila.tests.hacking.checks by + passing strings to the check methods like the pep8/flake8 parser would. + The parser loops over each line in the file and then passes the + parameters to the check method. The parameter names in the check method + dictate what type of object is passed to the check method. The + parameter types are:: logical_line: A processed line with the following modifications: - Multi-line statements converted to a single line. diff --git a/tox.ini b/tox.ini index 5430b86f25..a054b841c9 100644 --- a/tox.ini +++ b/tox.ini @@ -161,7 +161,7 @@ extension = M339 = checks:no_third_party_mock M354 = checks:check_uuid4 M359 = checks:no_translate_logs -paths = ./manila/hacking +paths = ./manila/tests/hacking [testenv:lower-constraints] deps = diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml index 40321be52b..2b2f29aa11 100644 --- a/zuul.d/project.yaml +++ b/zuul.d/project.yaml @@ -67,7 +67,6 @@ - ^.*\.rst$ - ^api-ref/.*$ - ^doc/.*$ - - ^manila/hacking/.*$ - ^manila/tests/.*$ - ^releasenotes/.*$ - ^setup.cfg$