#NEWLINE# def test_lcs( self ) : #NEWLINE# #INDENT# 'Test the longest common substring function.' #NEWLINE# test1 = 'the longest common sub str plus extra' #NEWLINE# test2 = 'the longest common sub str and something else' #NEWLINE# lcs = 'the longest common sub str ' #NEWLINE# result = classifier . longest_common_substr ( test1 , test2 ) #NEWLINE# result2 = classifier . longest_common_substr ( test1 , test1 ) #NEWLINE# assert ( result == lcs ) #NEWLINE# assert ( result2 == lcs )