test_introspect.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:psp 作者: cmap 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号