fix pep8.5

This commit is contained in:
Tim Bentley 2019-03-27 18:59:03 +00:00
parent b7bb59a837
commit ae2109e509
3 changed files with 8 additions and 12 deletions

View File

@ -22,13 +22,11 @@
""" """
The :mod:`~openlp.core.ui.media.playertab` module holds the configuration tab for the media stuff. The :mod:`~openlp.core.ui.media.playertab` module holds the configuration tab for the media stuff.
""" """
import platform
from PyQt5 import QtCore, QtWidgets from PyQt5 import QtWidgets
from openlp.core.common import is_linux, is_win from openlp.core.common import is_linux, is_win
from openlp.core.common.i18n import UiStrings, translate from openlp.core.common.i18n import translate
from openlp.core.common.registry import Registry
from openlp.core.common.settings import Settings from openlp.core.common.settings import Settings
from openlp.core.lib.settingstab import SettingsTab from openlp.core.lib.settingstab import SettingsTab
from openlp.core.ui.icons import UiIcons from openlp.core.ui.icons import UiIcons

View File

@ -373,7 +373,7 @@ class TestVLCPlayer(TestCase, TestMixin):
assert mocked_vlc_media == mocked_display.vlc_media assert mocked_vlc_media == mocked_display.vlc_media
mocked_display.vlc_media_player.set_media.assert_called_with(mocked_vlc_media) mocked_display.vlc_media_player.set_media.assert_called_with(mocked_vlc_media)
mocked_vlc_media.parse.assert_called_with() mocked_vlc_media.parse.assert_called_with()
# mocked_volume.assert_called_with(mocked_display, 100) mocked_volume.assert_called_with(mocked_display, 100)
assert result is True assert result is True
@patch('openlp.core.ui.media.vlcplayer.is_win') @patch('openlp.core.ui.media.vlcplayer.is_win')
@ -962,15 +962,13 @@ class TestVLCPlayer(TestCase, TestMixin):
vlc_player = VlcPlayer(None) vlc_player = VlcPlayer(None)
# WHEN: update_ui() is called # WHEN: update_ui() is called
with patch.object(vlc_player, 'stop') as mocked_stop, \ with patch.object(vlc_player, 'stop') as mocked_stop:
patch.object(vlc_player, 'set_visible') as mocked_set_visible:
vlc_player.update_ui(mocked_controller, mocked_display) vlc_player.update_ui(mocked_controller, mocked_display)
# THEN: Certain methods should be called # THEN: Certain methods should be called
mocked_stop.assert_called_with(mocked_display) mocked_stop.assert_called_with(mocked_display)
assert 1 == mocked_stop.call_count assert 1 == mocked_stop.call_count
mocked_display.vlc_media_player.get_time.assert_called_with() mocked_display.vlc_media_player.get_time.assert_called_with()
# mocked_set_visible.assert_called_with(mocked_display, False)
mocked_controller.seek_slider.setSliderPosition.assert_called_with(300) mocked_controller.seek_slider.setSliderPosition.assert_called_with(300)
expected_calls = [call(True), call(False)] expected_calls = [call(True), call(False)]
assert expected_calls == mocked_controller.seek_slider.blockSignals.call_args_list assert expected_calls == mocked_controller.seek_slider.blockSignals.call_args_list