Mercurial > libervia-backend
changeset 856:7ea7053dda88
test: skip the test for markdown syntax if the module is not installed
author | souliane <souliane@mailoo.org> |
---|---|
date | Thu, 20 Feb 2014 16:37:05 +0100 (2014-02-20) |
parents | 03addfe98b64 |
children | 3c270d691e56 |
files | src/test/test_plugin_misc_text_syntaxes.py |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/test/test_plugin_misc_text_syntaxes.py Sun Feb 23 23:59:02 2014 +0100 +++ b/src/test/test_plugin_misc_text_syntaxes.py Thu Feb 20 16:37:05 2014 +0100 @@ -21,6 +21,7 @@ from sat.test import helpers from sat.plugins import plugin_misc_text_syntaxes +from twisted.trial.unittest import SkipTest import re @@ -91,7 +92,10 @@ By default lines are truncated after the 79th characters.""" source = "<img src=\"http://sat.goffi.org/static/images/screenshots/libervia/libervia_discussions.png\" alt=\"sat\"/>" expected = "![sat](http://sat.goffi.org/static/images/screenshots/libervia/libervia_discussions.png)" - d = self.text_syntaxes.convert(source, self.text_syntaxes.SYNTAX_XHTML, self.text_syntaxes.SYNTAX_MARKDOWN) + try: + d = self.text_syntaxes.convert(source, self.text_syntaxes.SYNTAX_XHTML, self.text_syntaxes.SYNTAX_MARKDOWN) + except plugin_misc_text_syntaxes.UnknownSyntax: + raise SkipTest("Markdown syntax is not available.") d.addCallback(self.assertEqual, expected) return d