From e09e867ad1b89f7a5b56eee891d55b6331d1aa77 Mon Sep 17 00:00:00 2001 From: Ian Knight Date: Fri, 20 May 2016 23:07:23 +0930 Subject: [PATCH] Pep8 Errors --- openlp/core/ui/advancedtab.py | 4 ++-- tests/functional/openlp_core_common/test_actions.py | 2 +- tests/functional/openlp_core_lib/test_lib.py | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/openlp/core/ui/advancedtab.py b/openlp/core/ui/advancedtab.py index ed720b5df..10e6056d1 100644 --- a/openlp/core/ui/advancedtab.py +++ b/openlp/core/ui/advancedtab.py @@ -91,8 +91,8 @@ class AdvancedTab(SettingsTab): self.slide_max_height_combo_box.addItem('', userData=0) self.slide_max_height_combo_box.addItem('', userData=-4) # Generate numeric values for combo box dynamically - for px in range(60,801,5): - self.slide_max_height_combo_box.addItem(str(px)+'px', userData=px) + for px in range(60, 801, 5): + self.slide_max_height_combo_box.addItem(str(px) + 'px', userData=px) self.slide_max_height_combo_box.setObjectName('slide_max_height_combo_box') self.ui_layout.addRow(self.slide_max_height_label, self.slide_max_height_combo_box) self.autoscroll_label = QtWidgets.QLabel(self.ui_group_box) diff --git a/tests/functional/openlp_core_common/test_actions.py b/tests/functional/openlp_core_common/test_actions.py index 92f030df2..afdc89c34 100644 --- a/tests/functional/openlp_core_common/test_actions.py +++ b/tests/functional/openlp_core_common/test_actions.py @@ -118,7 +118,7 @@ class TestCategoryActionList(TestCase): # GIVEN: The list including two actions self.list.add(self.action1) self.list.add(self.action2) - + # WHEN: Iterating over the list l = [a for a in self.list] # THEN: Make sure they are returned in correct order diff --git a/tests/functional/openlp_core_lib/test_lib.py b/tests/functional/openlp_core_lib/test_lib.py index c8493d005..d519837bf 100644 --- a/tests/functional/openlp_core_lib/test_lib.py +++ b/tests/functional/openlp_core_lib/test_lib.py @@ -431,7 +431,6 @@ class TestLib(TestCase): thumb_size = QtCore.QSize(-1, 100) expected_size_1 = QtCore.QSize(88, 88) expected_size_2 = QtCore.QSize(100, 100) - # Remove the thumb so that the test actually tests if the thumb will be created. Maybe it was not deleted in the # last test. @@ -458,7 +457,7 @@ class TestLib(TestCase): with patch('openlp.core.lib.QtGui.QImageReader.size') as mocked_size: mocked_size.return_value = QtCore.QSize(0, 0) icon = create_thumb(image_path, thumb_path, size=thumb_size) - + # THEN: Check if the thumb was created with aspect ratio of 1. self.assertIsInstance(icon, QtGui.QIcon, 'The icon should be a QIcon') self.assertFalse(icon.isNull(), 'The icon should not be null')