Pylint: fix false negative results

1. Disable cyclic imports scan due to false-negative result on new tests
2. Disable no-member check on methods library and factory on new tests

Change-Id: I00172fef100bc859d994131679c897402630fddf
Related-bug: #1556791
This commit is contained in:
Alexey Stepanov 2016-03-21 14:38:04 +03:00
parent 7db9c16684
commit bd567ec420
9 changed files with 15 additions and 2 deletions

View File

@ -126,6 +126,7 @@ enable = E0106,C1001,E1001,E1002,E1004,E1601,E1602,E1603,E1604,E1605,E1606,E1607
# RP0402: Modules dependencies graph
# RP0801: Duplication
# R0801: Duplication
# cyclic-import (R0401) - produces false-negative results
# Disabling messages:
# pointless-string-statement (W0105)
@ -158,7 +159,7 @@ enable = E0106,C1001,E1001,E1002,E1004,E1601,E1602,E1603,E1604,E1605,E1606,E1607
# too-many-locals (R0914)
# too-many-statements (R0915)
disable=RP0401,RP0402,RP0801,R0801,W0141,W1618,W0621,W1202,W1401,W0703,W0702,C0111,W0640,C0122,W0511, W0613, C0103, R0903, C0330, C0302, R0915, R0914, R0912, W0105, R0904, R0911, W0108, W0110, R0913, R0901
disable=RP0401,RP0402,RP0801,R0801,W0141,W1618,W0621,W1202,W1401,W0703,W0702,C0111,W0640,C0122,W0511, W0613, C0103, R0903, C0330, C0302, R0915, R0914, R0912, W0105, R0904, R0911, W0108, W0110, R0913, R0901, R0401
[REPORTS]

View File

@ -126,6 +126,7 @@ enable = E0106,C1001,E1001,E1002,E1004,E1601,E1602,E1603,E1604,E1605,E1606,E1607
# RP0402: Modules dependencies graph
# RP0801: Duplication
# R0801: Duplication
# cyclic-import (R0401) - produces false-negative results
# Disabling messages:
# pointless-string-statement (W0105)
@ -159,7 +160,7 @@ enable = E0106,C1001,E1001,E1002,E1004,E1601,E1602,E1603,E1604,E1605,E1606,E1607
# too-many-locals (R0914)
# too-many-statements (R0915)
disable=RP0401,RP0402,RP0801,R0801, W0141,W1618,W0621,W1202,W1401,W0703,W0702,C0111,W0640,C0122,W0511, W0613, C0103, R0903, C0330, W0212, C0302, R0915, R0914, R0912, W0105, R0904, R0911, W0108, W0110, R0913, R0901
disable=RP0401,RP0402,RP0801,R0801, W0141,W1618,W0621,W1202,W1401,W0703,W0702,C0111,W0640,C0122,W0511, W0613, C0103, R0903, C0330, W0212, C0302, R0915, R0914, R0912, W0105, R0904, R0911, W0108, W0110, R0913, R0901, R0401
[REPORTS]

View File

@ -36,6 +36,7 @@ from system_test.core.discover import load_yaml
from system_test.helpers.decorators import make_snapshot_if_step_fail
# pylint: disable=no-member
class PrepareActions(object):
"""Base class with prepare actions

View File

@ -19,6 +19,7 @@ from system_test import logger
from system_test.helpers.decorators import make_snapshot_if_step_fail
# pylint: disable=no-member
class FuelMasterActions(object):
"""Actions specific only to Fuel Master node

View File

@ -20,6 +20,7 @@ from system_test import action
from system_test.helpers.decorators import make_snapshot_if_step_fail
# pylint: disable=no-member
class HealthCheckActions(object):
"""Basic actions for OSTF tests

View File

@ -25,6 +25,7 @@ from system_test import nested_action
from system_test.helpers.decorators import make_snapshot_if_step_fail
# pylint: disable=no-member
class PluginsActions(object):
plugin_name = None

View File

@ -30,6 +30,7 @@ from system_test import action
from system_test.helpers.decorators import make_snapshot_if_step_fail
# pylint: disable=no-member
class StrengthActions(object):
destroyed_devops_nodes = []

View File

@ -21,6 +21,7 @@ from system_test import action
from system_test.helpers.decorators import make_snapshot_if_step_fail
# pylint: disable=no-member
class VMwareActions(object):
"""VMware vCenter/DVS related actions"""

View File

@ -78,6 +78,8 @@ class ActionsFactory(object):
actions_method = cls.get_actions()
linear_order = []
# pylint: disable=no-member
for action in cls.actions_order:
try:
action_method = actions_method[action]
@ -104,6 +106,7 @@ class ActionsFactory(object):
linear_order.extend(action_method())
else:
linear_order.append(action)
# pylint: enable=no-member
steps = [{"action": step, "method": actions_method[step]} for
step in linear_order]
@ -198,8 +201,10 @@ class ActionsFactory(object):
runs_after=[teardown_method] if teardown_method else [])
# Generate test case groups
# pylint: disable=no-member
groups = ['{}({})'.format(g, case_group) for g in cls._base_groups]
groups = cls._base_groups + groups
# pylint: enable=no-member
# Generate test case docstring
test_steps["__doc__"] = "{}\n\n{}\n\nDuration {}".format(