/usr/share/pyshared/Cheetah/Tests/Cheps.py is in python-cheetah 2.4.4-2ubuntu3.
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 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | #!/usr/bin/env python
import unittest
import Cheetah
import Cheetah.Parser
import Cheetah.Template
class Chep_2_Conditionalized_Import_Behavior(unittest.TestCase):
def test_ModuleLevelImport(self):
''' Verify module level (traditional) import behavior '''
pass
def test_InlineImport(self):
''' Verify (new) inline import behavior works '''
template = '''
#def funky($s)
#try
#import urllib
#except ImportError
#pass
#end try
#return urllib.quote($s)
#end def
'''
try:
template = Cheetah.Template.Template.compile(template)
except Cheetah.Parser.ParseError, ex:
self.fail('Failed to properly generate code %s' % ex)
template = template()
rc = tepmlate.funky('abc def')
assert rc == 'abc+def'
def test_LegacyMode(self):
''' Verify disabling of CHEP #2 works '''
pass
if __name__ == '__main__':
unittest.main()
|