Skip pysword tests is pysword isn't installed.

This commit is contained in:
Tomas Groth 2016-04-20 21:29:04 +02:00
parent 6f975654cc
commit 89ce4131e7
1 changed files with 5 additions and 2 deletions

View File

@ -25,10 +25,13 @@ This module contains tests for the SWORD Bible importer.
import os
import json
from unittest import TestCase
from unittest import TestCase, SkipTest
from tests.functional import MagicMock, patch
from openlp.plugins.bibles.lib.sword import SwordBible
try:
from openlp.plugins.bibles.lib.sword import SwordBible
except ImportError:
raise SkipTest('PySword is not installed, skipping SWORD test.')
from openlp.plugins.bibles.lib.db import BibleDB
TEST_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__),