#NEWLINE# def test_str( self ) : #NEWLINE# #INDENT# exp = "Ordination results:\n\tMethod: Correspondance Analysis (CA)\n\tEigvals: 2\n\tProportion explained: N/A\n\tFeatures: 3x2\n\tSamples: 3x2\n\tBiplot Scores: N/A\n\tSample constraints: N/A\n\tFeature IDs: 'Species1', 'Species2', 'Species3'\n\tSample IDs: 'Site1', 'Site2', 'Site3'" #NEWLINE# obs = str ( self . ordination_results ) #NEWLINE# self . assertEqual ( obs , exp ) #NEWLINE# exp = 'Ordination results:\n\tMethod: Principal Coordinate Analysis (PCoA)\n\tEigvals: 1\n\tProportion explained: N/A\n\tFeatures: N/A\n\tSamples: 2x1\n\tBiplot Scores: N/A\n\tSample constraints: N/A\n\tFeature IDs: N/A\n\tSample IDs: 0, 1' #NEWLINE# samples_df = pd . DataFrame ( np . array ( [ [ 1 ] , [ 2 ] ] ) ) #NEWLINE# obs = str ( OrdinationResults ( 'PCoA' , 'Principal Coordinate Analysis' , pd . Series ( np . array ( [ 4.2 ] ) ) , samples_df ) ) #NEWLINE# self . assertEqual ( obs . split ( '\n' ) , exp . split ( '\n' ) )