forked from openlp/openlp
Skip tests on windows.
This commit is contained in:
parent
87e7310e2b
commit
7980231273
@ -43,7 +43,16 @@ from PyQt4 import QtCore, QtGui
|
||||
from openlp.core.common import translate
|
||||
from openlp.plugins.media.forms.mediaclipselectordialog import Ui_MediaClipSelector
|
||||
from openlp.core.lib.ui import critical_error_message_box
|
||||
from openlp.core.ui.media.vendor import vlc
|
||||
try:
|
||||
from openlp.core.ui.media.vendor import vlc
|
||||
except (ImportError, NameError, NotImplementedError):
|
||||
pass
|
||||
except OSError as e:
|
||||
if sys.platform.startswith('win'):
|
||||
if not isinstance(e, WindowsError) and e.winerror != 126:
|
||||
raise
|
||||
else:
|
||||
raise
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
@ -278,6 +278,7 @@ class MediaMediaItem(MediaManagerItem, RegistryProperties):
|
||||
check_directory_exists(self.service_path)
|
||||
self.load_list(Settings().value(self.settings_section + '/media files'))
|
||||
self.rebuild_players()
|
||||
if VLC_AVAILABLE:
|
||||
self.media_clip_selector_form = MediaClipSelectorForm(self, self.main_window, None)
|
||||
|
||||
def rebuild_players(self):
|
||||
|
@ -29,7 +29,13 @@
|
||||
"""
|
||||
Module to test the MediaClipSelectorForm.
|
||||
"""
|
||||
from unittest import TestCase
|
||||
|
||||
import os
|
||||
from unittest import TestCase, SkipTest
|
||||
from openlp.core.ui.media.vlcplayer import VLC_AVAILABLE
|
||||
|
||||
if os.name == 'nt' and not VLC_AVAILABLE:
|
||||
raise SkipTest('Windows without VLC, skipping this test since it cannot run without vlc')
|
||||
|
||||
from PyQt4 import QtGui, QtTest, QtCore
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user