[testlib] repreprocess content so contextual display has a chance to show the proper line. Closes #2869481
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Mon, 06 May 2013 17:16:45 +0200
changeset 8975 045e449617ad
parent 8974 c8520188eb4b
child 8976 aeb7d400ee92
[testlib] repreprocess content so contextual display has a chance to show the proper line. Closes #2869481 the context is calculated using position information relative to a preprocessed content, not the original source
devtools/testlib.py
--- a/devtools/testlib.py	Mon May 06 15:58:52 2013 +0200
+++ b/devtools/testlib.py	Mon May 06 17:16:45 2013 +0200
@@ -938,6 +938,7 @@
                     # define filter
                     if isinstance(content, str):
                         content = unicode(content, sys.getdefaultencoding(), 'replace')
+                    content = validator.preprocess_data(content)
                     content = content.splitlines()
                     width = int(log(len(content), 10)) + 1
                     line_template = " %" + ("%i" % width) + "i: %s"