From d2a4a9213581965fd76ab92f8e832a5e2c2ccadf Mon Sep 17 00:00:00 2001 From: Matt Molyneaux Date: Sun, 6 Dec 2020 03:58:38 +0000 Subject: [PATCH] Pandoc: Markdown output can be one or the other (#89) Fixes #88 --- exhibition/tests/test_filters.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/exhibition/tests/test_filters.py b/exhibition/tests/test_filters.py index 524bc99..1e00107 100644 --- a/exhibition/tests/test_filters.py +++ b/exhibition/tests/test_filters.py @@ -271,6 +271,10 @@ def test_pandoc_filter(self): ) def test_pandoc_filter_no_argument(self): + possible_markdown_outputs = [ + "\nHello\n=====\n\nThis *is* **text**\n", + "\n# Hello\n\nThis *is* **text**\n", + ] meta = {"templates": []} node = Node(mock.Mock(), None, meta=meta) node.is_leaf = False @@ -285,7 +289,7 @@ def test_pandoc_filter_no_argument(self): node.meta["pandoc_config"] = {"format": "org", "to": "markdown"} result = jinja_filter(node, PANDOC_TEMPLATE_WITHOUT_ARG) - self.assertEqual(result, "\nHello\n=====\n\nThis *is* **text**\n") + self.assertIn(result, possible_markdown_outputs) def test_typogrify_filter(self): node = Node(mock.Mock(), None, meta={"templates": []})