def test_main2(self):
input_gct_path = os.path.join(FUNCTIONAL_TESTS_DIR,
"test_introspect_main.gct")
output_gct_path = os.path.join(FUNCTIONAL_TESTS_DIR,
"test_introspect_main_out2.gct")
expected_gct_path = os.path.join(FUNCTIONAL_TESTS_DIR,
"test_introspect_main_expected2.gct")
args_string = "-i {} -o {} -fa moa".format(input_gct_path, output_gct_path)
args = introspect.build_parser().parse_args(args_string.split())
introspect.main(args)
# Read in output and expected gcts and confirm that they're equal
output_gct = parse(output_gct_path)
expected_gct = parse(expected_gct_path)
pd.util.testing.assert_almost_equal(expected_gct.data_df, output_gct.data_df, check_less_precise=True)
pd.util.testing.assert_frame_equal(expected_gct.row_metadata_df, output_gct.row_metadata_df)
pd.util.testing.assert_frame_equal(expected_gct.col_metadata_df, output_gct.col_metadata_df)
# Clean up
os.remove(output_gct_path)
评论列表
文章目录