fix errors

This commit is contained in:
Tim Bentley 2017-12-24 07:11:30 +00:00
commit 9e6ecb7272
8 changed files with 18 additions and 17 deletions

View File

@ -57,16 +57,17 @@ class OpenLPJobs(object):
This class holds any jobs we have on jenkins and we actually need in this script. This class holds any jobs we have on jenkins and we actually need in this script.
""" """
Branch_Pull = 'Branch-01-Pull' Branch_Pull = 'Branch-01-Pull'
Branch_Functional = 'Branch-02-Functional-Tests' Branch_Linux_Tests = 'Branch-02a-Linux-Tests'
Branch_Interface = 'Branch-03-Interface-Tests' Branch_macOS_Tests = 'Branch-02b-macOS-Tests'
Branch_PEP = 'Branch-04a-Code_Analysis' Branch_Build_Source = 'Branch-03a-Build-Source'
Branch_Coverage = 'Branch-04b-Test_Coverage' Branch_Build_macOS = 'Branch-03b-Build-macOS'
Branch_Pylint = 'Branch-04c-Code_Analysis2' Branch_Code_Analysis = 'Branch-04a-Code-Analysis'
Branch_AppVeyor = 'Branch-05-AppVeyor-Tests' Branch_Test_Coverage = 'Branch-04b-Test-Coverage'
Branch_macOS = 'Branch-07-macOS-Tests' Branch_Lint_Check = 'Branch-04c-Lint-Check'
Branch_AppVeyor_Tests = 'Branch-05-AppVeyor-Tests'
Jobs = [Branch_Pull, Branch_Functional, Branch_Interface, Branch_PEP, Branch_Coverage, Branch_Pylint, Jobs = [Branch_Pull, Branch_Linux_Tests, Branch_macOS_Tests, Branch_Build_Source, Branch_Build_macOS,
Branch_AppVeyor, Branch_macOS] Branch_Code_Analysis, Branch_Test_Coverage, Branch_AppVeyor_Tests]
class Colour(object): class Colour(object):

View File

@ -117,10 +117,10 @@ class TestLib(TestCase, TestMixin):
# THEN: A match should be returned, and the book and reference should match the # THEN: A match should be returned, and the book and reference should match the
# expected result # expected result
assert match is not None, '{text} should provide a match'.format(text=reference_text) assert match is not None, '{text} should provide a match'.format(text=reference_text)
assert book_result, match.group('book') == \ assert book_result == match.group('book'), \
'{text} does not provide the expected result for the book group.'\ '{text} does not provide the expected result for the book group.'\
.format(text=reference_text) .format(text=reference_text)
assert ranges_result, match.group('ranges') == \ assert ranges_result == match.group('ranges'), \
'{text} does not provide the expected result for the ranges group.' \ '{text} does not provide the expected result for the ranges group.' \
.format(text=reference_text) .format(text=reference_text)

View File

@ -747,7 +747,7 @@ class TestMediaItem(TestCase, TestMixin):
self.media_item.on_style_combo_box_index_changed(2) self.media_item.on_style_combo_box_index_changed(2)
# THEN: The layout_style setting should have been set # THEN: The layout_style setting should have been set
assert self.media_item.settings.layout_style, 2 assert self.media_item.settings.layout_style == 2
self.media_item.settings.layout_style_combo_box.setCurrentIndex.assert_called_once_with(2) self.media_item.settings.layout_style_combo_box.setCurrentIndex.assert_called_once_with(2)
self.mocked_settings_instance.setValue.assert_called_once_with('bibles/verse layout style', 2) self.mocked_settings_instance.setValue.assert_called_once_with('bibles/verse layout style', 2)

View File

@ -92,7 +92,7 @@ class TestPdfController(TestCase, TestMixin):
controller = PdfController(plugin=self.mock_plugin) controller = PdfController(plugin=self.mock_plugin)
# THEN: The name of the presentation controller should be correct # THEN: The name of the presentation controller should be correct
assert'Pdf' == controller.name, 'The name of the presentation controller should be correct' assert 'Pdf' == controller.name, 'The name of the presentation controller should be correct'
def test_load_pdf(self): def test_load_pdf(self):
""" """

View File

@ -249,7 +249,7 @@ class TestPowerpointDocument(TestCase, TestMixin):
doc.goto_slide(1) doc.goto_slide(1)
# THEN: next_step() should be call to try to advance to the next effect. # THEN: next_step() should be call to try to advance to the next effect.
assert doc.next_step.called, 'next_step() should have been called!' is True assert doc.next_step.called is True, 'next_step() should have been called!'
def test_blank_screen(self): def test_blank_screen(self):
""" """

View File

@ -67,7 +67,7 @@ class TestPptviewController(TestCase, TestMixin):
controller = PptviewController(plugin=self.mock_plugin) controller = PptviewController(plugin=self.mock_plugin)
# THEN: The name of the presentation controller should be correct # THEN: The name of the presentation controller should be correct
assert'Powerpoint Viewer' == controller.name, 'The name of the presentation controller should be correct' assert 'Powerpoint Viewer' == controller.name, 'The name of the presentation controller should be correct'
def test_check_available(self): def test_check_available(self):
""" """

View File

@ -166,7 +166,7 @@ class TestEasyWorshipSongImport(TestCase):
# THEN: # THEN:
assert field_desc_entry is not None, 'Import should not be none' assert field_desc_entry is not None, 'Import should not be none'
assert field_desc_entry.name, name == 'FieldDescEntry.name should be the same as the name argument' assert field_desc_entry.name == name, 'FieldDescEntry.name should be the same as the name argument'
assert field_desc_entry.field_type == field_type, 'FieldDescEntry.type should be the same as the type argument' assert field_desc_entry.field_type == field_type, 'FieldDescEntry.type should be the same as the type argument'
assert field_desc_entry.size == size, 'FieldDescEntry.size should be the same as the size argument' assert field_desc_entry.size == size, 'FieldDescEntry.size should be the same as the size argument'

View File

@ -390,7 +390,7 @@ class TestSongSelectImport(TestCase, TestMixin):
assert 2 == mocked_find_all.call_count, 'The find_all() method should have been called twice' assert 2 == mocked_find_all.call_count, 'The find_all() method should have been called twice'
assert [call('div', 'song-viewer lyrics'), call('div', 'song-viewer lyrics')] == \ assert [call('div', 'song-viewer lyrics'), call('div', 'song-viewer lyrics')] == \
mocked_lyrics_page.find.call_args_list, 'The find() method should have been called with the right arguments' mocked_lyrics_page.find.call_args_list, 'The find() method should have been called with the right arguments'
assert [call('p'), call('h3')], mocked_find_all.call_args_list == \ assert [call('p'), call('h3')] == mocked_find_all.call_args_list, \
'The find_all() method should have been called with the right arguments' 'The find_all() method should have been called with the right arguments'
assert 'copyright' in result, 'The returned song should have a copyright' assert 'copyright' in result, 'The returned song should have a copyright'
assert 'ccli_number' in result, 'The returned song should have a CCLI number' assert 'ccli_number' in result, 'The returned song should have a CCLI number'