Skip to content

Commit bffbcb3

Browse files
committed
tests: skip math tests if latex is not available
Signed-off-by: James Knight <[email protected]>
1 parent 377f2b2 commit bffbcb3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/unit-tests/test_rst_math.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,18 @@
55
from tests.lib.testcase import ConfluenceTestCase
66
from tests.lib.testcase import setup_builder
77
from tests.lib.testcase import setup_editor
8+
import shutil
9+
import unittest
810

911

1012
class TestConfluenceRstMath(ConfluenceTestCase):
1113
@classmethod
1214
def setUpClass(cls):
15+
# math images need latex to create
16+
if not shutil.which('latex'):
17+
msg = 'latex not installed'
18+
raise unittest.SkipTest(msg)
19+
1320
super().setUpClass()
1421

1522
cls.dataset = cls.datasets / 'rst' / 'math'

0 commit comments

Comments
 (0)