#NEWLINE# def test_start_with_read_exception( self ) : #NEWLINE# #INDENT# input_file = mock . Mock ( ) #NEWLINE# input_file . read . side_effect = RuntimeError ( ) #NEWLINE# output_file = mock . Mock ( ) #NEWLINE# rw_task = image_transfer . FileReadWriteTask ( input_file , rw_task ) #NEWLINE# rw_task . start ( ) #NEWLINE# self . assertRaises ( exceptions . ImageTransferException , rw_task . wait ) #NEWLINE# input_file . read . assert_called_once_with ( rw_handles . READ_CHUNKSIZE )