From 32cfacff7e05955e04067b373296247c765eb849 Mon Sep 17 00:00:00 2001 From: Tomas Groth Date: Sun, 18 Sep 2016 17:47:59 +0200 Subject: [PATCH] Skip MediaShout import testing on non-win platforms. --- tests/functional/openlp_plugins/songs/test_mediashout.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/functional/openlp_plugins/songs/test_mediashout.py b/tests/functional/openlp_plugins/songs/test_mediashout.py index 4f03c4f94..c08b04df7 100644 --- a/tests/functional/openlp_plugins/songs/test_mediashout.py +++ b/tests/functional/openlp_plugins/songs/test_mediashout.py @@ -22,15 +22,20 @@ """ Test the MediaShout importer """ -from unittest import TestCase +from unittest import TestCase, skipUnless from collections import namedtuple from openlp.core.common import Registry -from openlp.plugins.songs.lib.importers.mediashout import MediaShoutImport +try: + from openlp.plugins.songs.lib.importers.mediashout import MediaShoutImport + CAN_RUN_TESTS = True +except ImportError: + CAN_RUN_TESTS = False from tests.functional import MagicMock, patch, call +@skipUnless(CAN_RUN_TESTS, 'Not Windows, skipping test') class TestMediaShoutImport(TestCase): """ Test the MediaShout importer