/usr/lib/python2.7/dist-packages/chameleon/tests/test_exc.py is in python-chameleon 2.16-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 | from unittest import TestCase
class TestTemplateError(TestCase):
def test_keep_token_location_info(self):
# tokens should not lose information when passed to a TemplateError
from chameleon import exc, tokenize, utils
token = tokenize.Token('stuff', 5, 'more\nstuff', 'mystuff.txt')
error = exc.TemplateError('message', token)
s = str(error)
self.assertTrue(
'- Location: (line 2: col 0)' in s,
'No location data found\n%s' % s)
|