summaryrefslogtreecommitdiff
path: root/tests/utils/base_unittest.py
diff options
context:
space:
mode:
authorJensDiemer <git@jensdiemer.de>2011-05-26 18:00:03 +0200
committerJensDiemer <git@jensdiemer.de>2011-05-26 18:00:03 +0200
commit5549d55cf548f3b500f677638674655117dffa72 (patch)
treebf71163a684b2e395258c1da3e91ce8320bdd7f7 /tests/utils/base_unittest.py
parent9c8396bbeb859c4dc030a8b9848b14147b126d88 (diff)
downloadcreole-restructure.tar.gz
* remove the support for callable macros. Only dict and modules are allowed.restructure
* No macros used as default in creole2html converting. * macros gets arguments as real keyword arguments and not only the string as \"args\"
Diffstat (limited to 'tests/utils/base_unittest.py')
-rw-r--r--tests/utils/base_unittest.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/utils/base_unittest.py b/tests/utils/base_unittest.py
index c7d6aed..2ee0bc6 100644
--- a/tests/utils/base_unittest.py
+++ b/tests/utils/base_unittest.py
@@ -36,7 +36,7 @@ class BaseCreoleTest(MarkupTest):
print "-" * 79
def assert_Creole2html(self, source_string, should_string, \
- verbose=1, stderr=sys.stderr, debug=False):
+ verbose=1, stderr=sys.stderr, debug=False, macros=None):
"""
compare the generated html code from the markup string >source_string<
with the >should_string< reference.
@@ -54,7 +54,8 @@ class BaseCreoleTest(MarkupTest):
# convert creole markup into html code
out_string = creole2html(
- markup_string, verbose=verbose, stderr=stderr, debug=debug
+ markup_string, verbose=verbose, stderr=stderr, \
+ debug=debug, macros=macros
)
if debug:
self._debug_text("assert_Creole2html() creole2html", out_string)
@@ -93,7 +94,7 @@ class BaseCreoleTest(MarkupTest):
# compare
self.assertEqual(out_string, markup)
- def assertCreole(self, source_string, should_string, debug=False):
+ def assertCreole(self, source_string, should_string, debug=False, macros=None):
"""
Cross compare with creol2html _and_ html2creole with the same given
refenrece strings.
@@ -103,7 +104,11 @@ class BaseCreoleTest(MarkupTest):
source_string = unicode(source_string)
should_string = unicode(should_string)
self.assertNotEqual(source_string, should_string)
- self.assert_Creole2html(source_string, should_string, debug)
+
+ self.assert_Creole2html(
+ source_string, should_string, debug, macros=macros
+ )
+
self.assert_html2Creole(
source_string, should_string, debug,
unknown_emit=use_html_macro