mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-01 06:41:26 -07:00
Fix ansible-test unicode and sanity tests. (#29743)
* Show warning when using pylint on Python 2.6. * Add pylint disable entries for Python 2. * Fix unicode handling in ansible-test. * Add missing documentation.
This commit is contained in:
parent
b5eca624d0
commit
79bc49e150
7 changed files with 22 additions and 6 deletions
|
@ -9,11 +9,13 @@ from lib.sanity import (
|
|||
SanityMessage,
|
||||
SanityFailure,
|
||||
SanitySuccess,
|
||||
SanitySkipped,
|
||||
)
|
||||
|
||||
from lib.util import (
|
||||
SubprocessError,
|
||||
run_command,
|
||||
display,
|
||||
)
|
||||
|
||||
from lib.ansible_util import (
|
||||
|
@ -30,6 +32,10 @@ from lib.test import (
|
|||
|
||||
PYLINT_SKIP_PATH = 'test/sanity/pylint/skip.txt'
|
||||
|
||||
UNSUPPORTED_PYTHON_VERSIONS = (
|
||||
'2.6',
|
||||
)
|
||||
|
||||
|
||||
class PylintTest(SanitySingleVersion):
|
||||
"""Sanity test using pylint."""
|
||||
|
@ -39,6 +45,10 @@ class PylintTest(SanitySingleVersion):
|
|||
:type targets: SanityTargets
|
||||
:rtype: SanityResult
|
||||
"""
|
||||
if args.python_version in UNSUPPORTED_PYTHON_VERSIONS:
|
||||
display.warning('Skipping pylint on unsupported Python version %s.' % args.python_version)
|
||||
return SanitySkipped(self.name)
|
||||
|
||||
with open(PYLINT_SKIP_PATH, 'r') as skip_fd:
|
||||
skip_paths = skip_fd.read().splitlines()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue