#NEWLINE# def test_ngram_stream_error_on_multiple_sources( ) : #NEWLINE# #INDENT# sentences = [ list ( numpy . random . randint ( 10 , size = sentence_length ) ) for sentence_length in [ 3 , 5 , 7 ] ] #NEWLINE# stream = DataStream ( IterableDataset ( sentences ) ) #NEWLINE# stream . sources = ( '1' , '2' ) #NEWLINE# assert_raises ( ValueError , NGrams , 4 , sentences )