From 76be31fee1f71221b4c38885404b61d354ec855f Mon Sep 17 00:00:00 2001 From: Tomas Groth Date: Mon, 1 Aug 2016 20:00:58 +0200 Subject: [PATCH] Only run pylint tests if specified. --- tests/utils/test_pylint.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/utils/test_pylint.py b/tests/utils/test_pylint.py index 1675a41ee..3d1333967 100644 --- a/tests/utils/test_pylint.py +++ b/tests/utils/test_pylint.py @@ -23,8 +23,8 @@ Package to test for proper bzr tags. """ import os -import logging import platform +import sys from unittest import TestCase, SkipTest try: @@ -35,6 +35,14 @@ except ImportError: from openlp.core.common import is_win +in_argv = False +for arg in sys.argv: + if arg.endswith('test_pylint.py'): + in_argv = True + break +if not in_argv: + raise SkipTest('test_pylint.py not specified in arguments - skipping tests using pylint.') + TOLERATED_ERRORS = {'registryproperties.py': ['access-member-before-definition'], 'opensong.py': ['no-name-in-module'], 'maindisplay.py': ['no-name-in-module']}