Move hacking checks to tests dir

This is not cinder service code, would be better
to move it into "tests".

Change-Id: I7b18453269cfc57bfbc9bd143d72948e88e60836
This commit is contained in:
Eric Harney 2019-09-11 13:10:00 -04:00
parent 1ffcbedc31
commit 3855eaca27
6 changed files with 7 additions and 7 deletions

View File

@ -18,8 +18,8 @@
irrelevant-files: &functional-irrelevant-files
- ^.*\.rst$
- ^api-ref/.*$
- ^cinder/hacking/.*$
- ^cinder/locale/.*$
- ^cinder/tests/hacking/.*$
- ^cinder/tests/unit.*$
- ^contrib/block-box.*$
- ^doc/.*$
@ -38,9 +38,9 @@
- ^.*\.rst$
- ^api-ref/.*$
- ^cinder/cmd/status\.py$
- ^cinder/hacking/.*$
- ^cinder/locale/.*$
- ^cinder/tests/functional.*$
- ^cinder/tests/hacking/.*$
- ^cinder/tests/unit.*$
- ^contrib/block-box.*$
- ^doc/.*$

View File

@ -27,7 +27,7 @@ Guidelines for writing new hacking checks
on the N3xx value.
- List the new rule in the top level HACKING.rst file
- Add test cases for each new rule to
cinder/tests/test_hacking.py
cinder/tests/unit/test_hacking.py
"""

View File

@ -18,13 +18,13 @@ import textwrap
import mock
import pycodestyle
from cinder.hacking import checks
from cinder import test
from cinder.tests.hacking import checks
@ddt.ddt
class HackingTestCase(test.TestCase):
"""This class tests the hacking checks in cinder.hacking.checks
"""This class tests cinder's hacking checks.
This class ensures that Cinder's hacking checks are working by passing
strings to the check methods like the pep8/flake8 parser would. The parser

View File

@ -106,7 +106,7 @@ if __name__ == "__main__":
for atree in dir_trees_list:
if atree in ["tools/config/generate_cinder_opts.py",
"cinder/hacking/checks.py",
"cinder/tests/hacking/checks.py",
"cinder/volume/configuration.py",
"cinder/test.py",
"cinder/cmd/status.py"]:

View File

@ -207,7 +207,7 @@ exclude = .git,.venv,.tox,dist,tools,doc/ext,*egg,build
max-complexity=30
[hacking]
local-check-factory = cinder.hacking.checks.factory
local-check-factory = cinder.tests.hacking.checks.factory
import_exceptions = cinder.i18n
[doc8]