#NEWLINE# def test_sinkstate_yield( self ) : #NEWLINE# #INDENT# def gen( ) : #NEWLINE# #INDENT# for i in range ( 5 ) : #NEWLINE# #INDENT# ( yield i ) #NEWLINE# #UNINDENT# #UNINDENT# b = gen ( ) #NEWLINE# self . assertEqual ( list ( b ) , list ( range ( 5 ) ) ) #NEWLINE# self . assertEqual ( list ( self ) , [ ] )