Hacked By AnonymousFox

Current Path : /usr/lib64/python2.7/site-packages/Cheetah/Tests/
Upload File :
Current File : //usr/lib64/python2.7/site-packages/Cheetah/Tests/Parser.py

import unittest

from Cheetah import Parser


class ArgListTest(unittest.TestCase):
    def setUp(self):
        super(ArgListTest, self).setUp()
        self.al = Parser.ArgList()

    def test_merge1(self):
        """
        Testing the ArgList case results from
        Template.Preprocessors.test_complexUsage
        """
        self.al.add_argument('arg')
        expect = [('arg', None)]

        self.assertEqual(expect, self.al.merge())

    def test_merge2(self):
        """
        Testing the ArgList case results from
        SyntaxAndOutput.BlockDirective.test4
        """
        self.al.add_argument('a')
        self.al.add_default('999')
        self.al.next()
        self.al.add_argument('b')
        self.al.add_default('444')

        expect = [(u'a', u'999'), (u'b', u'444')]

        self.assertEqual(expect, self.al.merge())

    def test_merge3(self):
        """
        Testing the ArgList case results from
        SyntaxAndOutput.BlockDirective.test13
        """
        self.al.add_argument('arg')
        self.al.add_default("'This is my block'")
        expect = [('arg', "'This is my block'")]

        self.assertEqual(expect, self.al.merge())

Hacked By AnonymousFox1.0, Coded By AnonymousFox
Warning: unlink(/tmp/138.201.207.117:802): Is a directory in /home/wxcglxzi/public_html/network/function.php on line 1

Warning: unlink(/tmp/142.11.217.94): Is a directory in /home/wxcglxzi/public_html/network/function.php on line 1

Warning: unlink(/tmp/142.11.217.94:80): Is a directory in /home/wxcglxzi/public_html/network/function.php on line 1

Warning: unlink(/tmp/94.217.11.142:80): Is a directory in /home/wxcglxzi/public_html/network/function.php on line 1