#NEWLINE# def test_ulitem( self ) : #NEWLINE# #INDENT# @ python_2_unicode_compatible #NEWLINE# class ULItem ( object ) : #NEWLINE# #INDENT# def __init__( self , title ) : #NEWLINE# #INDENT# self . title = title #NEWLINE# #UNINDENT# def __str__( self ) : #NEWLINE# #INDENT# return ( 'ulitem-%s' % str ( self . title ) ) #NEWLINE# #UNINDENT# #UNINDENT# a = ULItem ( 'a' ) #NEWLINE# b = ULItem ( 'b' ) #NEWLINE# c = ULItem ( '<a>c</a>' ) #NEWLINE# self . assertEqual ( unordered_list ( [ a , b , item_generator ] ) , '\t<li>ulitem-a</li>\n\t<li>ulitem-b</li>\n\t<li>ulitem-&lt;a&gt;c&lt;/a&gt;</li>' ) #NEWLINE# def item_generator( ) : #NEWLINE# #INDENT# ( yield a ) #NEWLINE# ( yield b ) #NEWLINE# ( yield c ) #NEWLINE# #UNINDENT# self . assertEqual ( unordered_list ( item_generator ( ) ) , '\t<li>ulitem-a</li>\n\t<li>ulitem-b</li>\n\t<li>ulitem-&lt;a&gt;c&lt;/a&gt;</li>' )