summaryrefslogtreecommitdiff
path: root/creole/tests/utils
diff options
context:
space:
mode:
Diffstat (limited to 'creole/tests/utils')
-rw-r--r--creole/tests/utils/utils.py53
1 files changed, 29 insertions, 24 deletions
diff --git a/creole/tests/utils/utils.py b/creole/tests/utils/utils.py
index fd94da7..d49aba5 100644
--- a/creole/tests/utils/utils.py
+++ b/creole/tests/utils/utils.py
@@ -50,30 +50,35 @@ class MarkupTest(unittest.TestCase):
return txt
def assertEqual(self, first, second, msg=""):
- if not first == second:
- if VERBOSE >= 2:
- print("first: %r" % first)
- print("second: %r" % second)
-
- #~ first = first.rstrip("\\n")
- #~ second = second.rstrip("\\n")
- try:
- diff = make_diff(first, second)
- except AttributeError:
- raise self.failureException("%s is not %s" % (repr(first), repr(second)))
-
- if VERBOSE >= 2:
- print("diff: %r" % diff)
-
- first = self._format_output(first)
- second = self._format_output(second)
-
- msg += (
- "\n---[Output:]---\n%s\n"
- "---[not equal to:]---\n%s"
- "\n---[diff:]---\n%s"
- ) % (first, second, diff)
- raise self.failureException(msg)
+ if first == second:
+ return
+
+ if VERBOSE >= 2:
+ print("first: %r" % first)
+ print("second: %r" % second)
+
+ #~ first = first.rstrip("\\n")
+ #~ second = second.rstrip("\\n")
+ try:
+ diff = make_diff(first, second)
+ except AttributeError:
+ raise self.failureException("%s is not %s" % (repr(first), repr(second)))
+
+ if VERBOSE >= 2:
+ print("diff: %r" % diff)
+
+ first = self._format_output(first)
+ second = self._format_output(second)
+
+ print("*"*100)
+ print("---[Output:]-----------------------------------------------------------------------------------------")
+ print(first)
+ print("---[not equal to:]-----------------------------------------------------------------------------------")
+ print(second)
+ print("---[diff:]-------------------------------------------------------------------------------------------")
+ print(diff)
+ print("*"*100)
+ assert first == second
def _prepare_text(self, txt):
"""