From b464b5613c40a3d62f3fff8637a075ae2cb3aa07 Mon Sep 17 00:00:00 2001 From: Phill Ridout Date: Sun, 2 Nov 2014 17:19:02 +0000 Subject: [PATCH] pep fixes --- tests/functional/openlp_core_lib/test_color_button.py | 10 ++++------ tests/functional/openlp_core_lib/test_file_dialog.py | 3 ++- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/functional/openlp_core_lib/test_color_button.py b/tests/functional/openlp_core_lib/test_color_button.py index 297bde82f..a7b743918 100644 --- a/tests/functional/openlp_core_lib/test_color_button.py +++ b/tests/functional/openlp_core_lib/test_color_button.py @@ -109,8 +109,6 @@ class TestColorDialog(TestCase): # THEN: The value set in _color should be returned self.assertEqual(value, '#000000', 'The value returned should be equal to the one we set') - #self.init_patcher.stop() - def color_test(self): """ Test that the color property method returns the set color @@ -158,9 +156,9 @@ class TestColorDialog(TestCase): # THEN: change_color should not have been called and the colorChanged signal should not have been emitted self.assertEqual( - self.mocked_change_color.call_count, 0,'change_color should not have been called with an invalid color') + self.mocked_change_color.call_count, 0, 'change_color should not have been called with an invalid color') self.assertEqual( - self.mocked_color_changed.emit.call_count, 0, \ + self.mocked_color_changed.emit.call_count, 0, 'colorChange signal should not have been emitted with an invalid color') def on_clicked_same_color_test(self): @@ -181,10 +179,10 @@ class TestColorDialog(TestCase): # THEN: change_color should not have been called and the colorChanged signal should not have been emitted self.assertEqual( - self.mocked_change_color.call_count, 0, \ + self.mocked_change_color.call_count, 0, 'change_color should not have been called when the color has not changed') self.assertEqual( - self.mocked_color_changed.emit.call_count, 0, \ + self.mocked_color_changed.emit.call_count, 0, 'colorChange signal should not have been emitted when the color has not changed') def on_clicked_new_color_test(self): diff --git a/tests/functional/openlp_core_lib/test_file_dialog.py b/tests/functional/openlp_core_lib/test_file_dialog.py index ad4d852d7..6cfb356b6 100644 --- a/tests/functional/openlp_core_lib/test_file_dialog.py +++ b/tests/functional/openlp_core_lib/test_file_dialog.py @@ -70,6 +70,7 @@ class TestFileDialog(TestCase): call_list = [call('/Valid File'), call('/url%20encoded%20file%20%231'), call('/url encoded file #1'), call('/non-existing'), call('/non-existing')] self.mocked_os.path.exists.assert_has_calls(call_list) - self.mocked_qt_gui.QMessageBox.information.assert_called_with(self.mocked_parent, 'File Not Found', + self.mocked_qt_gui.QMessageBox.information.assert_called_with( + self.mocked_parent, 'File Not Found', 'File /non-existing not found.\nPlease try selecting it individually.') self.assertEqual(result, ['/Valid File', '/url encoded file #1'], 'The returned file list is incorrect')