Skip to content

Commit

Permalink
check for pylint version
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Aug 23, 2016
1 parent e39eb93 commit 9ef4050
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions utils/python/tests/scripts_regression_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1088,6 +1088,15 @@ class B_CheckCode(unittest.TestCase):
###########################################################################
def test_check_code(self):
###########################################################################
from distutils.spawn import find_executable
pylint = find_executable("pylint")
if pylint is not None:
stat, output, _ = run_cmd("pylint --version")
pylintver = re.search(r"pylint\s+(\d+)\.(\d+).(\d+)", output)
major = pylintver.group(1)
minor = pylintver.group(2)
if pylint is None or (major <= 1 and minor <= 5):
self.skipTest("pylint version 1.5 or newer not found")
stat, output, _ = run_cmd(os.path.join(TOOLS_DIR, "code_checker -d 2>&1"))
self.assertEqual(stat, 0, msg=output)

Expand Down

0 comments on commit 9ef4050

Please sign in to comment.