#NEWLINE# def test_format_exceptions( self ) : #NEWLINE# #INDENT# estream = Random2DRotation ( self . example_stream , which_sources = ( 'source2' , ) ) #NEWLINE# bstream = Random2DRotation ( self . batch_stream , which_sources = ( 'source2' , ) ) #NEWLINE# assert_raises ( ValueError , estream . transform_source_example , numpy . empty ( ( 5 , 6 ) ) , 'source2' ) #NEWLINE# assert_raises ( ValueError , bstream . transform_source_batch , [ numpy . empty ( ( 7 , 6 ) ) ] , 'source2' ) #NEWLINE# assert_raises ( ValueError , bstream . transform_source_batch , [ numpy . empty ( ( 8 , 6 ) ) ] , 'source2' )