openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #28360
[Merge] lp:~springermac/openlp/fix-tests into lp:openlp
Jonathan Springer has proposed merging lp:~springermac/openlp/fix-tests into lp:openlp.
Requested reviews:
OpenLP Core (openlp-core)
For more details, see:
https://code.launchpad.net/~springermac/openlp/fix-tests/+merge/282138
Fix Mac OS X display flags test
Fix import in pjlink tests
Skip OpenOffice test if uno isn't available, e.g., on Mac OS X
--
Your team OpenLP Core is requested to review the proposed merge of lp:~springermac/openlp/fix-tests into lp:openlp.
=== modified file 'tests/functional/openlp_core_lib/test_projector_pjlink1.py'
--- tests/functional/openlp_core_lib/test_projector_pjlink1.py 2016-01-09 17:46:20 +0000
+++ tests/functional/openlp_core_lib/test_projector_pjlink1.py 2016-01-11 06:18:27 +0000
@@ -25,10 +25,9 @@
from unittest import TestCase
-from mock import MagicMock, patch
-
from openlp.core.lib.projector.pjlink1 import PJLink1
+from tests.functional import patch
from tests.resources.projector.data import TEST_PIN, TEST_SALT, TEST_CONNECT_AUTHENTICATE
pjlink_test = PJLink1(name='test', ip='127.0.0.1', pin=TEST_PIN, no_poll=True)
=== modified file 'tests/functional/openlp_core_ui/test_maindisplay.py'
--- tests/functional/openlp_core_ui/test_maindisplay.py 2016-01-06 20:00:51 +0000
+++ tests/functional/openlp_core_ui/test_maindisplay.py 2016-01-11 06:18:27 +0000
@@ -142,12 +142,10 @@
mocked_bibles_plugin.refresh_css.assert_called_with(main_display.frame)
@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):
+ def macosx_display_window_flags_state_test(self):
"""
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.
self.screens.set_current_display(0)
display = MagicMock()
=== modified file 'tests/functional/openlp_plugins/songs/test_openoffice.py'
--- tests/functional/openlp_plugins/songs/test_openoffice.py 2015-12-31 22:46:06 +0000
+++ tests/functional/openlp_plugins/songs/test_openoffice.py 2016-01-11 06:18:27 +0000
@@ -22,10 +22,13 @@
"""
This module contains tests for the OpenOffice/LibreOffice importer.
"""
-from unittest import TestCase
+from unittest import TestCase, SkipTest
from openlp.core.common import Registry
-from openlp.plugins.songs.lib.importers.openoffice import OpenOfficeImport
+try:
+ from openlp.plugins.songs.lib.importers.openoffice import OpenOfficeImport
+except ImportError:
+ raise SkipTest('Could not import OpenOfficeImport probably due to unavailability of uno')
from tests.functional import MagicMock, patch
from tests.helpers.testmixin import TestMixin
Follow ups