summaryrefslogtreecommitdiff
path: root/tests/test_examplefiles.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2012-02-04 10:20:38 +0100
committerGeorg Brandl <georg@python.org>2012-02-04 10:20:38 +0100
commit65d896a9194903062cb6f131cef5624165e2de19 (patch)
tree89e2fba58eb49bca7c441e1cbd843d231a8db4fc /tests/test_examplefiles.py
parentd3515a13a28b35df9e9cfe8d743968d37d419b4f (diff)
downloadpygments-65d896a9194903062cb6f131cef5624165e2de19.tar.gz
Show more info about error token failures.
Diffstat (limited to 'tests/test_examplefiles.py')
-rw-r--r--tests/test_examplefiles.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_examplefiles.py b/tests/test_examplefiles.py
index e5dbcf4c..9326660c 100644
--- a/tests/test_examplefiles.py
+++ b/tests/test_examplefiles.py
@@ -60,8 +60,9 @@ def check_lexer(lx, absfn, outfn):
tokens = []
for type, val in lx.get_tokens(text):
ntext.append(val)
- assert type != Error, 'lexer %s generated error token for %s' % \
- (lx, absfn)
+ assert type != Error, \
+ 'lexer %s generated error token for %s: %r at position %d' % \
+ (lx, absfn, val, len(u''.join(ntext)))
tokens.append((type, val))
if u''.join(ntext) != text:
print '\n'.join(difflib.unified_diff(u''.join(ntext).splitlines(),