forked from openlp/openlp
Fix OS X test which wasn't being skipped on non-OS X platforms
This commit is contained in:
parent
607371a6d7
commit
51eefc84d9
@ -22,7 +22,7 @@
|
||||
"""
|
||||
Package to test the openlp.core.ui.slidecontroller package.
|
||||
"""
|
||||
from unittest import TestCase
|
||||
from unittest import TestCase, skipUnless
|
||||
|
||||
from PyQt5 import QtCore
|
||||
|
||||
@ -141,13 +141,14 @@ class TestMainDisplay(TestCase, TestMixin):
|
||||
mocked_songs_plugin.refresh_css.assert_called_with(main_display.frame)
|
||||
mocked_bibles_plugin.refresh_css.assert_called_with(main_display.frame)
|
||||
|
||||
@patch('openlp.core.ui.maindisplay.is_macosx')
|
||||
@skipUnless(is_macosx(), 'Can only run test on Mac OS X due to pyobjc dependency.')
|
||||
def macosx_display_window_flags_state_test(self, is_macosx):
|
||||
"""
|
||||
Test that on Mac OS X we set the proper window flags
|
||||
"""
|
||||
if not is_macosx():
|
||||
self.skipTest('Can only run test on Mac OS X due to pyobjc dependency.')
|
||||
# GIVEN: A new SlideController instance on Mac OS X.
|
||||
is_macosx.return_value = True
|
||||
self.screens.set_current_display(0)
|
||||
display = MagicMock()
|
||||
|
||||
@ -159,12 +160,11 @@ class TestMainDisplay(TestCase, TestMixin):
|
||||
main_display.windowFlags(),
|
||||
'The window flags should be Qt.Window, and Qt.FramelessWindowHint.')
|
||||
|
||||
@skipUnless(is_macosx(), 'Can only run test on Mac OS X due to pyobjc dependency.')
|
||||
def macosx_display_test(self):
|
||||
"""
|
||||
Test display on Mac OS X
|
||||
"""
|
||||
if not is_macosx():
|
||||
self.skipTest('Can only run test on Mac OS X due to pyobjc dependency.')
|
||||
# GIVEN: A new SlideController instance on Mac OS X.
|
||||
self.screens.set_current_display(0)
|
||||
display = MagicMock()
|
||||
|
Loading…
Reference in New Issue
Block a user