@@ -293,9 +293,9 @@ def test_q_metadata_concat_and_split(self):
293293 entries = {'Test_Single_Short' : ['L6S93' , 'L6S95' ],
294294 'Test_Paired' : ['L6S98' , 'L6S99' ]}
295295 paths = {'Test_Single_Short' :
296- '/home/runner/mmeds_server_data/ studies/ testuser_Test_Single_Short_0/ full_metadata.tsv' ,
296+ Path ( fig . DATABASE_DIR ) / " studies" / " testuser_Test_Single_Short_0" / " full_metadata.tsv" ,
297297 'Test_Paired' :
298- '/home/runner/mmeds_server_data/ studies/ testuser_Test_Paired_0/ full_metadata.tsv' }
298+ Path ( fig . DATABASE_DIR ) / " studies" / " testuser_Test_Paired_0" / " full_metadata.tsv" }
299299
300300 df = util .concatenate_metadata_subsets (entries , paths )
301301 subj_df , spec_df = util .split_metadata (df , 'human' , new_study_name = "New_Test_Study" )
@@ -313,7 +313,6 @@ def test_r_format_to_lefse(self):
313313 # Assert created file is equal to test example
314314 self .assertTrue (filecmp .cmp (test_true_result , test_out_result , shallow = False ))
315315
316-
317316 def test_s_format_to_humann (self ):
318317 """ Test converting to format readable for humann_barplot functions """
319318 tmpdir = Path (gettempdir ())
@@ -322,7 +321,12 @@ def test_s_format_to_humann(self):
322321 test_true_result = fig .TEST_FORMAT_HUMANN_RESULT
323322 test_out_result = tmpdir / "test_humann_format_out.tsv"
324323
325- util .format_table_to_humann (test_table , test_map , ["Stage" , "MASLDstatus" ], test_out_result , True , True )
324+ util .format_table_to_humann (test_table , test_map , ["MASLDstatus" , "Stage" ], test_out_result , True , True )
325+
326+ with open (test_out_result , "r" ) as f1 , open (test_true_result , "r" ) as f2 :
327+ for r1 , r2 in zip (f1 , f2 ):
328+ if r1 != r2 :
329+ print (f"{ r1 } \n IS NOT EQUAL TO\n { r2 } " )
326330
327331 # Assert created file is equal to test example
328332 self .assertTrue (filecmp .cmp (test_true_result , test_out_result , shallow = False ))
0 commit comments