#NEWLINE# def test_writelines( self ) : #NEWLINE# #INDENT# buf = self . buftype ( '1234567890' ) #NEWLINE# memio = self . ioclass ( ) #NEWLINE# self . assertEqual ( memio . writelines ( ( [ buf ] * 100 ) ) , None ) #NEWLINE# self . assertEqual ( memio . getvalue ( ) , ( buf * 100 ) ) #NEWLINE# memio . writelines ( [ ] ) #NEWLINE# self . assertEqual ( memio . getvalue ( ) , ( self * 100 ) ) #NEWLINE# memio = self . ioclass ( ) #NEWLINE# self . assertRaises ( TypeError , memio . writelines , ( [ buf ] + [ 1 ] ) ) #NEWLINE# self . assertEqual ( memio . getvalue ( ) , buf ) #NEWLINE# self . assertRaises ( TypeError , memio . writelines , None ) #NEWLINE# memio . close ( ) #NEWLINE# self . assertRaises ( ValueError , memio . writelines , [ ] )