Browse Source

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 <gouthampravi@gmail.com>
changes/57/681557/3
Goutham Pacha Ravi 11 months ago
parent
commit
fba472e3a6
5 changed files with 8 additions and 8 deletions
  1. +0
    -0
      manila/tests/hacking/__init__.py
  2. +0
    -0
      manila/tests/hacking/checks.py
  3. +7
    -6
      manila/tests/test_hacking.py
  4. +1
    -1
      tox.ini
  5. +0
    -1
      zuul.d/project.yaml

manila/hacking/__init__.py → manila/tests/hacking/__init__.py View File


manila/hacking/checks.py → manila/tests/hacking/checks.py View File


+ 7
- 6
manila/tests/test_hacking.py View File

@@ -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.


+ 1
- 1
tox.ini View File

@@ -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 =


+ 0
- 1
zuul.d/project.yaml View File

@@ -67,7 +67,6 @@
- ^.*\.rst$
- ^api-ref/.*$
- ^doc/.*$
- ^manila/hacking/.*$
- ^manila/tests/.*$
- ^releasenotes/.*$
- ^setup.cfg$


Loading…
Cancel
Save