#NEWLINE# def test_images_from_bytes_batch_stream( self ) : #NEWLINE# #INDENT# stream = ImagesFromBytes ( self . batch_stream , which_sources = ( 'source1' , 'source2' ) , color_mode = None ) #NEWLINE# ( s1 , s2 ) = list ( zip ( * list ( stream . get_epoch_iterator ( ) ) ) ) #NEWLINE# s1 = sum ( s1 , [ ] ) #NEWLINE# s2 = sum ( s2 , [ ] ) #NEWLINE# s1_shape = set ( ( s . shape for s in s1 ) ) #NEWLINE# s2_shape = set ( ( s . shape for s in s2 ) ) #NEWLINE# actual_s1 = set ( ( reorder_axes ( s ) for s in self . shapes [ : 3 ] ) ) #NEWLINE# actual_s2 = set ( ( reorder_axes ( s1_shape ) for s in self . shapes [ 3 : ] ) ) #NEWLINE# assert ( actual_s1 == s1_shape ) #NEWLINE# assert ( actual_s2 == s2_shape )