Pylint: add fuel_tests
1. Add fuel_tests target 2. Fix failures of Pylint(it's voting for now) Change-Id: I6c7f560e70bc555d22ab342d48723642c9df8e25
This commit is contained in:
parent
bacf0c2f9c
commit
f34477a748
|
@ -12,6 +12,10 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
# pylint: disable=redefined-builtin
|
||||
from six.moves import xrange
|
||||
# pylint: enable=redefined-builtin
|
||||
|
||||
from fuelweb_test import logger
|
||||
from fuelweb_test import settings
|
||||
from fuelweb_test.helpers.decorators import create_diagnostic_snapshot
|
||||
|
@ -36,6 +40,7 @@ class Manager(Basic):
|
|||
if config_file:
|
||||
self._load_config()
|
||||
self._context = cls
|
||||
self.assigned_slaves = set()
|
||||
|
||||
def _cluster_from_template(self):
|
||||
"""Create cluster from template file."""
|
||||
|
@ -241,12 +246,10 @@ class Manager(Basic):
|
|||
self.env.make_snapshot(snapshot_name, is_make=True)
|
||||
self.env.resume_environment()
|
||||
return True
|
||||
else:
|
||||
logger.error("Can't bootstrap nodes because release "
|
||||
"snapshot didn't revert")
|
||||
return False
|
||||
raise RuntimeError("Can't bootstrap nodes because release "
|
||||
"snapshot didn't revert")
|
||||
logger.error(
|
||||
"Can't bootstrap nodes because release snapshot didn't revert")
|
||||
raise RuntimeError(
|
||||
"Can't bootstrap nodes because release snapshot didn't revert")
|
||||
|
||||
def get_ready_cluster(self, config=None):
|
||||
"""Create and deploy cluster."""
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from __future__ import division
|
||||
|
||||
import time
|
||||
|
||||
|
@ -24,6 +25,9 @@ from fuelweb_test import settings
|
|||
from system_test.core.discover import config_filter
|
||||
|
||||
|
||||
# pylint: disable=no-member
|
||||
|
||||
|
||||
@pytest.fixture(scope='session')
|
||||
def config_file(request):
|
||||
"""Fixture which provide config for test."""
|
||||
|
@ -126,7 +130,9 @@ def pytest_runtest_teardown(item):
|
|||
step_name = item.function.__name__
|
||||
spent_time = time.time() - item._start_time
|
||||
minutes = spent_time // 60
|
||||
# pylint: disable=round-builtin
|
||||
seconds = int(round(spent_time)) % 60
|
||||
# pylint: enable=round-builtin
|
||||
finish_step = "FINISH {} STEP TOOK {} min {} sec".format(
|
||||
step_name, minutes, seconds)
|
||||
foot = "\n" + "<" * 5 + "#" * 30 + "[ {} ]" + "#" * 30 + ">" * 5
|
||||
|
|
|
@ -20,6 +20,9 @@ from fuelweb_test.helpers import checkers
|
|||
from fuelweb_test.helpers.ssh_manager import SSHManager
|
||||
|
||||
|
||||
# pylint: disable=no-member
|
||||
|
||||
|
||||
ssh_manager = SSHManager()
|
||||
|
||||
|
||||
|
|
|
@ -21,6 +21,9 @@ from fuelweb_test.helpers import os_actions
|
|||
from fuelweb_test.helpers.ssh_manager import SSHManager
|
||||
|
||||
|
||||
# pylint: disable=no-member
|
||||
|
||||
|
||||
ssh_manager = SSHManager()
|
||||
|
||||
|
||||
|
|
11
tox.ini
11
tox.ini
|
@ -5,7 +5,7 @@
|
|||
|
||||
[tox]
|
||||
skipsdist = True
|
||||
envlist = pep8, py27, pylint, docs, pep8-py{34,35}, pylint-py{27}-{fuelweb,system,gates}
|
||||
envlist = pep8, py27, pylint, docs, pep8-py{34,35}, pylint-py{27}-{fuelweb,system,gates,fuel}
|
||||
skip_missing_interpreters = True
|
||||
|
||||
[testenv]
|
||||
|
@ -47,7 +47,7 @@ deps=
|
|||
-r{toxinidir}/fuelweb_test/requirements.txt
|
||||
pylint
|
||||
commands=
|
||||
pylint --rcfile=.pylintrc_gerrit fuelweb_test system_test gates_tests
|
||||
pylint --rcfile=.pylintrc_gerrit fuelweb_test system_test gates_tests fuel_tests
|
||||
|
||||
|
||||
[testenv:pylint-py27-fuelweb]
|
||||
|
@ -68,6 +68,13 @@ deps=
|
|||
pylint
|
||||
commands=pylint gates_tests
|
||||
|
||||
[testenv:pylint-py27-fuel]
|
||||
deps=
|
||||
-r{toxinidir}/fuelweb_test/requirements.txt
|
||||
pylint
|
||||
commands=pylint fuel_tests
|
||||
|
||||
|
||||
[testenv:docs]
|
||||
changedir = doc
|
||||
deps =
|
||||
|
|
Loading…
Reference in New Issue