test_unvhandler.py 文件源码

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

项目:PyGeM 作者: mathLab 项目源码 文件源码
def test_unv_write_comparison_2(self):
        unv_handler = uh.UnvHandler()
        mesh_points = unv_handler.parse('tests/test_datasets/test_square.unv')

        mesh_points[0][0] = 2.2
        mesh_points[5][1] = 4.3
        mesh_points[9][2] = 0.5
        mesh_points[45][0] = 7.2
        mesh_points[132][1] = -1.2
        mesh_points[255][2] = -3.6

        outfilename = 'tests/test_datasets/test_square_out.unv'
        outfilename_expected = 'tests/test_datasets/test_square_out_true.unv'

        unv_handler.write(mesh_points, outfilename)
        self.assertTrue(filecmp.cmp(outfilename, outfilename_expected))
        self.addCleanup(os.remove, outfilename)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号