From fcc9871002360bf6c1a6afce13395a4f8ad0c232 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 27 Nov 2006 00:36:14 +0000 Subject: we have liftoff (finally....) --- test/lexer.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'test/lexer.py') diff --git a/test/lexer.py b/test/lexer.py index c673332..07e964b 100644 --- a/test/lexer.py +++ b/test/lexer.py @@ -94,8 +94,7 @@ class LexerTest(unittest.TestCase): % endif """ node = Lexer(template).parse() - print repr(node) - assert repr(node) == """TemplateNode({}, [Comment('comment', (1, 1)), ControlLine('if', 'if foo:', False, (3, 1)), Text(' hi\n', (4, 1)), ControlLine('if', 'endif', True, (5, 1)), Text(' ', (6, 1)), TextTag('text', {}, (6, 9), []), Text('\n\n ', (14, 17)), DefTag('def', {'name': 'foo'}, (16, 9), ["Text('this is foo', (16, 26))"]), Text('\n', (16, 44)), ControlLine('if', 'if bar:', False, (17, 1)), Text(' code\n', (19, 1)), ControlLine('if', 'endif', True, (20, 1)), Text(' ', (21, 1))])""" + assert repr(node) == r"""TemplateNode({}, [Comment('comment', (1, 1)), ControlLine('if', 'if foo:', False, (3, 1)), Text(' hi\n', (4, 1)), ControlLine('if', 'endif', True, (5, 1)), Text(' ', (6, 1)), TextTag('text', {}, (6, 9), ['Text(\'\\n # more code\\n \\n % more code\\n <%illegal compionent>/>\\n <%def name="laal">def\\n \\n \\n \', (6, 16))']), Text('\n\n ', (14, 17)), DefTag('def', {'name': 'foo'}, (16, 9), ["Text('this is foo', (16, 26))"]), Text('\n', (16, 44)), ControlLine('if', 'if bar:', False, (17, 1)), Text(' code\n', (19, 1)), ControlLine('if', 'endif', True, (20, 1)), Text(' ', (21, 1))])""" def test_def_syntax(self): template = """ -- cgit v1.2.3