diff options
-rw-r--r-- | tests/test_examplefiles.py | 5 |
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(), |