diff --git a/openlp/core/lib/screen.py b/openlp/core/lib/screen.py index e7b4c0b97..31ff3d725 100644 --- a/openlp/core/lib/screen.py +++ b/openlp/core/lib/screen.py @@ -167,7 +167,7 @@ class ScreenList(object): :param number: The screen number (int). """ - log.info('remove_screen {number:d}'.forma(number=number)) + log.info('remove_screen {number:d}'.format(number=number)) for screen in self.screen_list: if screen['number'] == number: self.screen_list.remove(screen) diff --git a/openlp/plugins/songs/lib/openlyricsxml.py b/openlp/plugins/songs/lib/openlyricsxml.py index 5adffb300..e2964661d 100644 --- a/openlp/plugins/songs/lib/openlyricsxml.py +++ b/openlp/plugins/songs/lib/openlyricsxml.py @@ -458,7 +458,7 @@ class OpenLyrics(object): self._add_tag_to_formatting(tag, tags_element) # Replace end tags. for tag in end_tags: - text = text.replace('{/{tag}}}'.format(tag=tag), '') + text = text.replace('{{{tag}}}'.format(tag=tag), '') # Replace \n with
. text = text.replace('\n', '
') element = etree.XML('{text}'.format(text=text)) @@ -643,7 +643,7 @@ class OpenLyrics(object): # Append text from tail and add formatting end tag. # TODO: Verify format() with template variables if element.tag == NSMAP % 'tag' and use_endtag: - text += '{/{name}}}'.format(name=element.get('name')) + text += '{{{name}}}'.format(name=element.get('name')) # Append text from tail. if element.tail: text += element.tail diff --git a/scripts/jenkins_script.py b/scripts/jenkins_script.py index 61f74986a..0711d1257 100755 --- a/scripts/jenkins_script.py +++ b/scripts/jenkins_script.py @@ -63,9 +63,10 @@ class OpenLPJobs(object): Branch_Windows_Interface = 'Branch-04b-Windows_Interface_Tests' Branch_PEP = 'Branch-05a-Code_Analysis' Branch_Coverage = 'Branch-05b-Test_Coverage' + Branch_Pylint = 'Branch-05c-Code_Analysis2' Jobs = [Branch_Pull, Branch_Functional, Branch_Interface, Branch_Windows_Functional, Branch_Windows_Interface, - Branch_PEP, Branch_Coverage] + Branch_PEP, Branch_Coverage, Branch_Pylint] class Colour(object): diff --git a/tests/utils/test_pylint.py b/tests/utils/test_pylint.py index dc6c83909..48c9e1393 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: @@ -46,9 +46,18 @@ class TestPylint(TestCase): """ Test for pylint errors """ + # Test if this file is specified in the arguments, if not skip the test. + in_argv = False + for arg in sys.argv: + if arg.endswith('test_pylint.py') or arg.endswith('test_pylint'): + in_argv = True + break + if not in_argv: + raise SkipTest('test_pylint.py not specified in arguments - skipping tests using pylint.') + # GIVEN: Some checks to disable and enable, and the pylint script disabled_checks = 'import-error,no-member' - enabled_checks = 'missing-format-argument-key,unused-format-string-argument' + enabled_checks = 'missing-format-argument-key,unused-format-string-argument,bad-format-string' if is_win() or 'arch' in platform.dist()[0].lower(): pylint_script = 'pylint' else: @@ -84,6 +93,9 @@ class TestPylint(TestCase): # Filter out PyQt related errors elif ('no-name-in-module' in line or 'no-member' in line) and 'PyQt5' in line: continue + # Filter out distutils related errors + elif 'distutils' in line: + continue elif self._is_line_tolerated(line): continue else: