summaryrefslogtreecommitdiff
path: root/creole/tests/test_macros.py
diff options
context:
space:
mode:
Diffstat (limited to 'creole/tests/test_macros.py')
-rw-r--r--creole/tests/test_macros.py12
1 files changed, 2 insertions, 10 deletions
diff --git a/creole/tests/test_macros.py b/creole/tests/test_macros.py
index c596a81..1a69b36 100644
--- a/creole/tests/test_macros.py
+++ b/creole/tests/test_macros.py
@@ -1,13 +1,10 @@
-# coding: utf-8
-
-
"""
Creole unittest macros
~~~~~~~~~~~~~~~~~~~~~~
Note: all mecro functions must return unicode!
- :copyleft: 2008-2011 by python-creole team, see AUTHORS for more details.
+ :copyleft: 2008-2020 by python-creole team, see AUTHORS for more details.
:license: GNU GPL v3 or above, see LICENSE for more details.
"""
@@ -26,7 +23,7 @@ def unittest_macro1(**kwargs):
>>> unittest_macro1(a=1,b=2)
'[test macro1 - kwargs: a=1,b=2]'
"""
- kwargs = ','.join(['%s=%s' % (k, json.dumps(v)) for k, v in sorted(kwargs.items())])
+ kwargs = ','.join('{}={}'.format(k, json.dumps(v)) for k, v in sorted(kwargs.items()))
return f"[test macro1 - kwargs: {kwargs}]"
@@ -36,8 +33,3 @@ def unittest_macro2(char, text):
'a|b'
"""
return char.join(text.split())
-
-
-if __name__ == '__main__':
- import doctest
- print(doctest.testmod())