forked from openlp/openlp
pep8
This commit is contained in:
parent
8e69c65b09
commit
d87d8181df
@ -425,8 +425,7 @@ class TestSystemPlayer(TestCase):
|
|||||||
assert expected_position_calls == mocked_display.media_player.position.call_args_list
|
assert expected_position_calls == mocked_display.media_player.position.call_args_list
|
||||||
mocked_set_visible.assert_called_once_with(mocked_display, False)
|
mocked_set_visible.assert_called_once_with(mocked_display, False)
|
||||||
mocked_display.controller.seek_slider.isSliderDown.assert_called_once_with()
|
mocked_display.controller.seek_slider.isSliderDown.assert_called_once_with()
|
||||||
assert expected_block_signals_calls == \
|
assert expected_block_signals_calls == mocked_display.controller.seek_slider.blockSignals.call_args_list
|
||||||
mocked_display.controller.seek_slider.blockSignals.call_args_list
|
|
||||||
mocked_display.controller.seek_slider.setSliderPosition.assert_called_once_with(2)
|
mocked_display.controller.seek_slider.setSliderPosition.assert_called_once_with(2)
|
||||||
|
|
||||||
def test_get_media_display_css(self):
|
def test_get_media_display_css(self):
|
||||||
|
@ -104,7 +104,7 @@ class TestFileDialogPatches(TestCase):
|
|||||||
result = FileDialog.getOpenFileName()
|
result = FileDialog.getOpenFileName()
|
||||||
|
|
||||||
# THEN: getOpenFileName() should return a tuple with the second value set to a the selected filter
|
# THEN: getOpenFileName() should return a tuple with the second value set to a the selected filter
|
||||||
assert result[1] == 'selected filter'
|
assert result[1] == 'selected filter'
|
||||||
|
|
||||||
def test_get_open_file_names_user_abort(self):
|
def test_get_open_file_names_user_abort(self):
|
||||||
"""
|
"""
|
||||||
|
@ -150,7 +150,7 @@ class TestListPreviewWidget(TestCase):
|
|||||||
|
|
||||||
# THEN: setRowHeight() should not be called, while resizeRowsToContents() should be called twice
|
# THEN: setRowHeight() should not be called, while resizeRowsToContents() should be called twice
|
||||||
# (once each in __recalculate_layout and replace_service_item)
|
# (once each in __recalculate_layout and replace_service_item)
|
||||||
assert mocked_resizeRowsToContents.call_count == 2, 'Should be called'
|
assert mocked_resizeRowsToContents.call_count == 2, 'Should be called'
|
||||||
assert mocked_setRowHeight.call_count == 0, 'Should not be called'
|
assert mocked_setRowHeight.call_count == 0, 'Should not be called'
|
||||||
|
|
||||||
@patch(u'openlp.core.widgets.views.ListPreviewWidget.resizeRowsToContents')
|
@patch(u'openlp.core.widgets.views.ListPreviewWidget.resizeRowsToContents')
|
||||||
@ -439,7 +439,7 @@ class TestListPreviewWidget(TestCase):
|
|||||||
assert mocked_scrollToItem.call_count == 0, 'Should not be called'
|
assert mocked_scrollToItem.call_count == 0, 'Should not be called'
|
||||||
assert mocked_selectRow.call_count == 0, 'Should not be called'
|
assert mocked_selectRow.call_count == 0, 'Should not be called'
|
||||||
assert mocked_item.call_count == 0, 'Should not be called'
|
assert mocked_item.call_count == 0, 'Should not be called'
|
||||||
|
|
||||||
@patch(u'openlp.core.widgets.views.ListPreviewWidget.selectRow')
|
@patch(u'openlp.core.widgets.views.ListPreviewWidget.selectRow')
|
||||||
@patch(u'openlp.core.widgets.views.ListPreviewWidget.scrollToItem')
|
@patch(u'openlp.core.widgets.views.ListPreviewWidget.scrollToItem')
|
||||||
@patch(u'openlp.core.widgets.views.ListPreviewWidget.item')
|
@patch(u'openlp.core.widgets.views.ListPreviewWidget.item')
|
||||||
|
Loading…
Reference in New Issue
Block a user