Pep8 Errors

This commit is contained in:
Ian Knight 2016-05-20 23:07:23 +09:30
parent 2c1c7810b9
commit e09e867ad1
3 changed files with 4 additions and 5 deletions

View File

@ -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)

View File

@ -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

View File

@ -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')