[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.
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user