Changeset 3467:67eb46edffeb in livinglogic.python.xist

Show
Ignore:
Timestamp:
07/08/08 17:49:19 (11 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Message:

Add a test for Template.str and Template.unicode.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • test/test_ul4.py

    r3459 r3467  
    9090    else: 
    9191        py.test.fail("Didn't raise exception") 
     92 
     93 
     94def test_format(): 
     95    tmpl = ul4c.compile("<?for (i, item) in enumerate(data)?><?print (i+1).format('>3d')?>. <?print item[0].format('.<10')?> <?print item[1]?>\n<?end for?>") 
     96    assert str(tmpl) == unicode(tmpl) 
    9297 
    9398