Add missing decorator to ansible-test sanity.

This fixes sanity test errors so they show the proper error code instead of "bound method".
pull/59347/merge
Matt Clay 5 years ago
parent 3cdc667888
commit 2f6de3aea4

@ -31,6 +31,7 @@ from lib.config import (
class Pep8Test(SanitySingleVersion):
"""Sanity test for PEP 8 style guidelines using pycodestyle."""
@property
def error_code(self): # type: () -> t.Optional[str]
"""Error code for ansible-test matching the format used by the underlying test program, or None if the program does not use error codes."""
return 'A100'

@ -37,6 +37,7 @@ from lib.data import (
class PslintTest(SanitySingleVersion):
"""Sanity test using PSScriptAnalyzer."""
@property
def error_code(self): # type: () -> t.Optional[str]
"""Error code for ansible-test matching the format used by the underlying test program, or None if the program does not use error codes."""
return 'AnsibleTest'

@ -50,6 +50,7 @@ UNSUPPORTED_PYTHON_VERSIONS = (
class PylintTest(SanitySingleVersion):
"""Sanity test using pylint."""
@property
def error_code(self): # type: () -> t.Optional[str]
"""Error code for ansible-test matching the format used by the underlying test program, or None if the program does not use error codes."""
return 'ansible-test'

@ -36,6 +36,7 @@ from lib.config import (
class ShellcheckTest(SanitySingleVersion):
"""Sanity test using shellcheck."""
@property
def error_code(self): # type: () -> t.Optional[str]
"""Error code for ansible-test matching the format used by the underlying test program, or None if the program does not use error codes."""
return 'AT1000'

@ -45,6 +45,7 @@ UNSUPPORTED_PYTHON_VERSIONS = (
class ValidateModulesTest(SanitySingleVersion):
"""Sanity test using validate-modules."""
@property
def error_code(self): # type: () -> t.Optional[str]
"""Error code for ansible-test matching the format used by the underlying test program, or None if the program does not use error codes."""
return 'A100'

@ -37,6 +37,7 @@ from lib.data import (
class YamllintTest(SanitySingleVersion):
"""Sanity test using yamllint."""
@property
def error_code(self): # type: () -> t.Optional[str]
"""Error code for ansible-test matching the format used by the underlying test program, or None if the program does not use error codes."""
return 'ansible-test'

Loading…
Cancel
Save