diff --git a/tests/test_build_html.py b/tests/test_build_html.py index 41ebf0556..5f4dea0ff 100644 --- a/tests/test_build_html.py +++ b/tests/test_build_html.py @@ -11,7 +11,6 @@ import os import re -import difflib import htmlentitydefs from StringIO import StringIO @@ -285,8 +284,8 @@ def test_html(app): html_warnings_exp = HTML_WARNINGS % {'root': re.escape(app.srcdir)} assert re.match(html_warnings_exp + '$', html_warnings), \ 'Warnings don\'t match:\n' + \ - '\n'.join(difflib.ndiff(html_warnings_exp.splitlines(), - html_warnings.splitlines())) + '--- Expected (regex):\n' + html_warnings_exp + \ + '--- Got:\n' + html_warnings for fname, paths in HTML_XPATH.iteritems(): parser = NslessParser() diff --git a/tests/test_build_latex.py b/tests/test_build_latex.py index 6a20746b6..4405395a0 100644 --- a/tests/test_build_latex.py +++ b/tests/test_build_latex.py @@ -12,7 +12,6 @@ import os import re import sys -import difflib from StringIO import StringIO from subprocess import Popen, PIPE @@ -42,8 +41,9 @@ def test_latex(app): latex_warnings_exp = LATEX_WARNINGS % {'root': app.srcdir} assert re.match(latex_warnings_exp + '$', latex_warnings), \ 'Warnings don\'t match:\n' + \ - '\n'.join(difflib.ndiff(latex_warnings_exp.splitlines(), - latex_warnings.splitlines())) + '--- Expected (regex):\n' + latex_warnings_exp + \ + '--- Got:\n' + latex_warnings + # file from latex_additional_files assert (app.outdir / 'svgimg.svg').isfile()