Only run pylint tests if specified.

This commit is contained in:
Tomas Groth 2016-08-01 20:00:58 +02:00
parent 189b2dd400
commit 76be31fee1
1 changed files with 9 additions and 1 deletions

View File

@ -23,8 +23,8 @@
Package to test for proper bzr tags. Package to test for proper bzr tags.
""" """
import os import os
import logging
import platform import platform
import sys
from unittest import TestCase, SkipTest from unittest import TestCase, SkipTest
try: try:
@ -35,6 +35,14 @@ except ImportError:
from openlp.core.common import is_win 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'], TOLERATED_ERRORS = {'registryproperties.py': ['access-member-before-definition'],
'opensong.py': ['no-name-in-module'], 'opensong.py': ['no-name-in-module'],
'maindisplay.py': ['no-name-in-module']} 'maindisplay.py': ['no-name-in-module']}