From e34a9ba58f4792bb9e8c121ce8586dfd7a9d833b Mon Sep 17 00:00:00 2001 From: Andreas Perhab <38032588+ap-wtioit@users.noreply.github.com> Date: Tue, 12 Jun 2018 10:12:09 +0200 Subject: [PATCH] [FIX] test_pylint: incompatibility between pylint 1.6 and python 3.6 reference: https://github.com/PyCQA/pylint/issues/1349 pylint 1.6 and python 3.5 (and below) should work fine, so no need to force people to upgrade there. --- odoo/addons/test_pylint/tests/test_pylint.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/odoo/addons/test_pylint/tests/test_pylint.py b/odoo/addons/test_pylint/tests/test_pylint.py index 5681e013d38..e067c87a5fe 100644 --- a/odoo/addons/test_pylint/tests/test_pylint.py +++ b/odoo/addons/test_pylint/tests/test_pylint.py @@ -10,6 +10,7 @@ import subprocess from distutils.version import LooseVersion import os from os.path import join +import sys from odoo.tests.common import TransactionCase from odoo import tools @@ -114,8 +115,11 @@ class TestPyLint(TransactionCase): def test_pylint(self): if pylint is None: self._skip_test('please install pylint') - if LooseVersion(getattr(pylint, '__version__', '0.0.1')) < LooseVersion('1.6.4'): - self._skip_test('please upgrade pylint to >= 1.6.4') + required_pylint_version = LooseVersion('1.6.4') + if sys.version_info >= (3, 6): + required_pylint_version = LooseVersion('1.7.0') + if LooseVersion(getattr(pylint, '__version__', '0.0.1')) < required_pylint_version: + self._skip_test('please upgrade pylint to >= %s' % required_pylint_version) paths = [tools.config['root_path']] for module in get_modules():