Now that the expected warnings are regexes, diffing them with the actual output makes no sense anymore.

This commit is contained in:
Georg Brandl 2010-07-27 19:07:51 +02:00
parent e8f2d8f8e4
commit 3b64ec2a2e
2 changed files with 5 additions and 6 deletions

View File

@ -11,7 +11,6 @@
import os import os
import re import re
import difflib
import htmlentitydefs import htmlentitydefs
from StringIO import StringIO from StringIO import StringIO
@ -285,8 +284,8 @@ def test_html(app):
html_warnings_exp = HTML_WARNINGS % {'root': re.escape(app.srcdir)} html_warnings_exp = HTML_WARNINGS % {'root': re.escape(app.srcdir)}
assert re.match(html_warnings_exp + '$', html_warnings), \ assert re.match(html_warnings_exp + '$', html_warnings), \
'Warnings don\'t match:\n' + \ 'Warnings don\'t match:\n' + \
'\n'.join(difflib.ndiff(html_warnings_exp.splitlines(), '--- Expected (regex):\n' + html_warnings_exp + \
html_warnings.splitlines())) '--- Got:\n' + html_warnings
for fname, paths in HTML_XPATH.iteritems(): for fname, paths in HTML_XPATH.iteritems():
parser = NslessParser() parser = NslessParser()

View File

@ -12,7 +12,6 @@
import os import os
import re import re
import sys import sys
import difflib
from StringIO import StringIO from StringIO import StringIO
from subprocess import Popen, PIPE from subprocess import Popen, PIPE
@ -42,8 +41,9 @@ def test_latex(app):
latex_warnings_exp = LATEX_WARNINGS % {'root': app.srcdir} latex_warnings_exp = LATEX_WARNINGS % {'root': app.srcdir}
assert re.match(latex_warnings_exp + '$', latex_warnings), \ assert re.match(latex_warnings_exp + '$', latex_warnings), \
'Warnings don\'t match:\n' + \ 'Warnings don\'t match:\n' + \
'\n'.join(difflib.ndiff(latex_warnings_exp.splitlines(), '--- Expected (regex):\n' + latex_warnings_exp + \
latex_warnings.splitlines())) '--- Got:\n' + latex_warnings
# file from latex_additional_files # file from latex_additional_files
assert (app.outdir / 'svgimg.svg').isfile() assert (app.outdir / 'svgimg.svg').isfile()